### Welcome to Planet openSUSE

This is a feed aggregator that collects what openSUSE contributors are writing in their respective blogs.

## Saturday30 July, 2016

I’m often approached by people who wish to translate opensuse-guide.org to their respective languages, which is awesome, but managing translations would be too much work for me. So instead I encourage people to create a derivative work of the guide in their own language – it’s licensed under the GNU Free Documentation License with no invariant sections.

Recently derivatives have been created for Arabic and Spanish by Sadig Osman and victorhck respectively.

## Moved to GitHub

I have now made it a whole lot easier for people to fork opensuse-guide.org by putting the guide on github. This also makes it much easier for maintainers of derivative works to keep track of the on-going changes and updates I make to the guide.

The HTML isn’t particularly pretty, and I probably still have some Danish language comments here and there. But please go ahead and fork me.

Just to show a few examples how to combine pdf files. Let us assume we have three pdf  files and now we need to combine them:

• gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=finalcombinedpdf.pdf -dBATCH 1.pdf 2.pdf 3.pdf
• joinpdf myfinalFile.pdf file1.pdf file2.pdf file3.pdf
• pdfmeld file1.pdf, file2.pdf, file3.pdf resultcombinedfile.pdf

Some of the other tools available for merging PDF files include pfdtk, Multivalent, and pdcat.

* Ghostscript - A popular tool for viewing Postscript and PDF documents
* joinPDF - A simple, yet effective, PDF merging tool
* pdfmeld - A powerful tool for combining PDF files

I am using LaTeX and beamer class to make presentations and posters. A short introduction to start with latex is available. Sometimes I am using LaTeX just to produce eps/pdf text boxes and after that Scribus for poster layout. In the last development version of Scribus, which is 1.3.5svn, there is possible to use latex source/expressions directly in document, so is not necessary anymore the aditional step to create eps/pdf text boxes.

For OpenSUSE there is the last version here:

http://software.opensuse.org/ymp/home:mrdocs/openSUSE_11.0/scribus.ymp

but I don't want to replace 1.3.3.12 stable version, so I will install the latest development version in my home directory

Warning: The documents saved in 1.3.5 will not be back compatible with the other versions, more here: http://scribus.info/svn/Scribus/trunk/Scribus/README

Let's install the last development of Scribus (it is very stable for what I need, I didn't have any problems with it):

$mkdir ~/aplic/scribus_135$ mkdir ~/tempsrc
$cd ~/tempsrc$ svn co svn://scribus.info/Scribus/trunk/Scribus
$cd Scribus$ cmake -DCMAKE_INSTALL_PREFIX:PATH=~/aplic/scribus_135


I obtained an error during the compilation because I didn't have "libqt4-devel" so:

$zypper install libqt4-devel :::bash$ make
$make install$ ~/aplic/scribus_135/bin/scribus


Here are two screenshots, the main window and scribus latex editor:

That's all.

References:

I found an interesting video. If you have about a hour to spend and if you work in scientific computing, maybe these talks would be useful for you:

Mod_python is an Apache module that embeds the Python interpreter within the server. Here is step by step what I did to configure it for OpenSUSE 11.0:

1. Install mod_python:

$sudo zypper in apache2-mod_python  2. Enable mod_python: edit /etc/sysconfig/apache2 and add python to the APACHE_MODULES line, so your line will look like: APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user authn_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl suexec userdir php5 python"  3. Run SuSEconfig 4. Configure Apache to handle Python files: $ sudo vim /etc/apache2/conf.d/python.conf  # create python.conf file


Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
PythonHandler mod_python.publisher
PythonDebug On


6. Restart apache server:

$sudo /usr/sbin/rcapache2 restart  7. Create a simple .py file, put it in /srv/www/htdocs/ and test to see if it is working with http://localhost/filename.py: def index(req): return "It Works: mod_python ENABLED";  The other method is to configure the PSP Handler. PSP means Python Server Pages. PSP files have the extension .psp. If you follow this method it will allow you to include Python code directly in HTML code. To do that, I am sure that google can help you, for me the first method is enough. That's all. The above procedure will work also for CentOS, replacing the corresponding commands and the place where the files are. Maybe you saw already my previous post, and you realized that I am using maybe 90% free software also on my windows computers. So, I would like to point out just a few links with free or opensource software for windows: Do you want more? Check out our google friend. I needed to insert tables in wordpress posts, but I found just one plugin for this task WP-Table. But it will not work, it is not compatible with the new wordpress versions. What I did is to use google docs: File -> New Document -> Table -> Insert, populate your table. Now, when you finished the table go to: Edit -> Edit HTML. Copy the HTML source code for the table and paste that html code in your wordpress posts, but in HTML EDIT MODE. I hope that the method will work also for you. If you are working in Scientific Computing, like me, then the next links are for you: I am using FreeNX but here is a solution to access a running X session with x11vnc. * install the package: $ sudo zypper install x11vnc


* ssh to remote machine and:

$x11vnc -display :0  * ok, now on local machine: $ vncviewer your_remote_ip:0


For more details and some comments (password option, ...) check the following link and try: man x11vnc

Just a simple method to clone your hdd, doesn't matter if you have also windows on it. I am using OpenSUSE and ddrescue:

I consider:
/dev/sda - old hdd
/dev/sdb - new hdd

    $sudo zypper install ddrescue # install the package$ sudo dd_rescue -v /dev/sda /dev/sdb # "dd_rescue" on OpenSUSE


I am using Kubuntu in Vmware just to play arround with it, so I decided to upgrade from 7.10 to 8.10, and this means that I will have as well KDE4. The upgrade process has been very easy, but I needed to upgrade first to 8.04 and finally to 8.10, so, here are the steps:

7.10 to 8.04

$sudo apt-get update$ sudo apt-get upgrade
$kdesudo "adept_manager --dist-upgrade" # (using ALT+F2 in KDE)  8.04 to 8.10 $ kdesudo "adept_manager --dist-upgrade" # (using ALT+F2 in KDE)


That's all.

"The light art performance photography (briefly LAPP), is a one-shot long time bullb exposure Photography, performed additionally with movement of Light"

Check their website for more and interesting shots (LAPP)

"Mathematics, rightly viewed, possesses not only truth, but supreme beauty -- a beauty cold and austere, like that of sculpture, without appeal to any part of our weaker nature, without the gorgeous trappings of painting or music, yet sublimely pure, and capable of a stern perfection such as only the greatest art can show." - Bertrand Russell (1872-1970), The Study of Mathematics

A few days ago I posted some nice surfaces, a beauty of mathematics. Here I would like to post some interesting fractals.

Fractals

"Mathematics, as much as music or any other art, is one of the means by which we rise to a complete self-consciousness. The significance of Mathematics resides precisely in the fact that it is an art; by informing us of the nature of our own minds it informs us of much that depends on our minds" - J.W.N.Sullivan (1886-1937), Aspects of Science, 1925.

Just some interesting surfaces. The software used is Python and MayaVi. I used the scripting facilities provided by this great visualization tool, called MayaVi.

Surfaces

In my previous post I discussed a "small" but, I would say "complet" template to start your document. If you want to include also movies in your pdf documents, then this post can help you. If you need a good program for bibliographic management check this post.

Below I will post a lot of tips, tricks and useful stuff which helps me when I am using LaTeX, for details check the documentation of coresponding package name, or Google .

\pagestyle{fancy}
% \lfoot{}
% \cfoot{}
% \rfoot{}


More packages

\usepackage{latexsym} % use \Box, \Join
\usepackage{setspace}
\usepackage{subfigure} % include subfigures
\usepackage{amsmath} % equation
\usepackage[titles,subfigure]{tocloft}
\usepackage{lastpage} % total page count
\usepackage{makeidx} % create index


Old Makefile which I used, you can modify it for your needs

dvi: poster.tex
latex poster.tex
bib:
bibtex poster
view:
kdvi poster.dvi
ps:
dvips poster.dvi -o poster.ps
pdf:
ps2pdf poster.ps poster.pdf
mp:
psnup -9 -l -d2 poster.ps multpage.ps
a4:
psresize -H118.9cm -W91.4cm -pa4 poster.ps a4.ps
ps2pdf a4.ps poster_a4.pdf
.PHONY: clean
clean:
@echo Cleaning...

# POSTSCRIPT
open (GNUPLOT, "|gnuplot");
print GNUPLOT <


If you are doing a lot of calculations/simulations, like me, using C or/and Python language, you also need to visualize your simulated data. One way to do it is just to generate/write a "data" file and plot it with your plotting preferred package after the simulation is finished. But maybe, sometimes, you want to see the graph in real time, so, here I would like to show a small C and Python program which calls Gnuplot and save the plot in png format.

C Example:

#include
/*
Author: Ioan Vancea (www.vioan.eu)
*****************************/
int main()
{
FILE *pipe = popen("gnuplot -persist","w");
fprintf(pipe, "set samples 40\n");
fprintf(pipe, "set isosamples 40\n");
fprintf(pipe, "set hidden3d\n");
fprintf(pipe, "set xrange [-8.000:8.000]\n");
fprintf(pipe, "set yrange [-8.000:8.000]\n");
fprintf(pipe, "set zrange [-2.000:2.000]\n");
fprintf(pipe, "set terminal png\n");
fprintf(pipe, "set output 'graph.png'\n");
fprintf(pipe, "set title 'We are plotting from C'\n");
fprintf(pipe, "set xlabel 'Label X'\n");
fprintf(pipe, "set ylabel 'Label Y'\n");
/* fprintf(pipe, "plot 'datafile.dat' using 1:2\n");*/
fprintf(pipe, "splot cos(x)+cos(y)\n");

close(pipe);
return 0;
}


The output:

Python Example (I use Gnuplot.py):

#!/usr/bin/env python

'''
Author: Ioan Vancea (www.vioan.eu)
'''

import math
import Gnuplot
gp = Gnuplot.Gnuplot(persist=1)
x = range(1000)
y = [math.sin(a) + math.cos(a) + math.tan(a) for a in x]
data = Gnuplot.Data(x, y, title='Plotting from Python')
gp('set data style lines')
gp('set xlabel "Label x"')
gp('set ylabel "Label y"')
gp.plot(data);
gp.hardcopy(filename="pyplot.png",terminal="png")


The output:

From project website:

"Munin the monitoring tool surveys all your computers and remembers what it saw. It presents all the information in graphs through a web interface. Its emphasis is on plug and play capabilities. After completing a installation a high number of monitoring plugins will be playing with no more effort.

Using Munin you can easily monitor the performance of your computers, networks, SANs, applications, weather measurements and whatever comes to mind. It makes it easy to determine "what's different today" when a performance problem crops up. It makes it easy to see how you're doing capacity-wise on any resources."

The configuration file is:

/etc/munin/munin.conf


The minimal configuration file for server:

# Configfile for Munin master
dbdir       /var/lib/munin/
htmldir     /var/www/munin/
logdir      /var/log/munin
rundir      /var/run/munin/

[mynode.mydomain.com]


In the configuration file for server I specified only one single node: mynode.mydomain.com

Next step is to configure the node but the default configuration is fine, only  let the server to acces Munin port 4949:

allow ^192\.168\.1\.1$ where 192.168.1.1 is the ip number for server. The final step si to check their website to read the documentation/faq for more configuration options. That's all After you have the domain from Godaddy it't time to change the default parking option in order to put your nameservers for domain. First you need to register your new nameservers with them and only after that to change the nameservers for your domain, otherwise you will see a nice "ERROR DETECTED" message. So, here is what you have to do: Your Account --> Domains --> All My Domains --> (select your domain) --> Host Summary (add)  Enter ns1 and its ip address click OK, and do the same step for ns2 with its ip address. Now you are ready to put and to use your new registered nameservers for your domain. That's all. Wget is a great command line for grabbing things from the web, but it doesn’t ship with macs. So if you want to install it here are a few steps: 1. download the source file: http://ftp.gnu.org/pub/gnu/wget/wget-1.11.tar.gz 2. compile and install it: tar -zxvf wget-1.11.tar.gz cd wget-1.11/ ./configure make sudo make install  Now the binary file is located in /usr/local/bin/. If you use bash as your default shell then you can add: PATH=$PATH:/usr/local/bin; export PATH


Or if you want, you can do a symbolic link to have it in /usr/bin/:

sudo ln -s /usr/local/bin/wget /usr/bin/wget


The Enthought Tool Suite (ETS) is a collection of components developed by Enthought to construct custom scientific applications. It includes a wide variety of components, including:

• an extensible application framework
• application building blocks
• 2-D and 3-D graphics libraries
• scientific and math libraries
• developer tools
• MayaVi Data Visualizer

It is available for Linux, Mac OS X and Windows, but they don't provide binaries for OpenSUSE, I don't now why.

Here are just some steps to get it running on OpenSUSE 10.3. But, you have to install some packages, check here before to proceed:
My system:

ionut@vaio:~> cat /etc/SuSE-release
openSUSE 10.3 (X86-64)
VERSION = 10.3


I installed the suite in /usr/local/lib64/python2.5/site-packages so, let's create the directories:

sudo mkdir -p /usr/local/lib64/python2.5/site-packages


Get the souces for ets tool from their repository:

svn co https://svn.enthought.com/svn/enthought/ETSProjectTools/trunk ETSProjectTools


Build ets (it is a kind of wrapper for their repository), a tool that automates the checkout process.

cd ETSProjectTools
python setup.py install


Get the latest souces for the project files, and build the eggs for the components:

ets co ETS
cd ETS_3.0.0b1
svn export https://svn.enthought.com/svn/enthought/sandbox/egg_builder.py
python egg_builder.py


If the build was successful, you would not have received any errors (though there will be one warning at the end about not building egg.info files) and the built eggs would be residing in a directory called dist

Install the eggs in the directory which we created at the beginning:

sudo easy_install -f dist/ -H dist/ ETS


Now you can try some examples which are included:

• check if Traits is working:
python Traits_3.0.0b1/examples/demo/Applications/converter.py

• check if Mayavi is working:
python Mayavi_3.0.0a1/examples/mayavi/scatter_plot.py
python Mayavi_3.0.0a1/examples/mayavi/streamline.py


or just run mayavi2 command.

In my case everything is working fine, I hope that also for you. Here are some references:

If you are doing a lot of Scientific Computing and you want to use Windows as a platform, then my advice is to switch on Linux/Unix. If you don't agree with me then a good solution for you is Python(x,y).

What is it? From their web site:

"Python(x,y) is a free scientific and engineering development software for numerical computations, data analysis and data visualization based on Python programming language, Qt graphical user interfaces (and development framework) and Eclipse integrated development environment."

"Its purpose is to help scientific programmers used to interpreted languages (such as MATLAB or IDL) or compiled languages (C/C++ or Fortran) to switch to Python. C/C++ or Fortran programmers should appreciate to reuse their code "as is" by wrapping it so it can be called directly from Python scripts."

For some screenshots check here.

"Sage is a huge distribution of free open source mathematical software:

• Algebra and calculus: Maxima, SymPy
• High precision arithmetic: GMP, MPFR, MPFI, quaddouble, Givaro
• Commutative algebra: Singular
• Number theory: PARI, NTL, mwrank, ECM, FLINTQS, GMP-ECM
• Exact linear algebra: LinBox, IML
• Group theory: GAP
• Scientific computation: GSL, SciPy, NumPy, cvxopt
• Statistical computation: R
• Graphics (2d and 3d): Matplotlib, Tachyon3d, Jmol

Sage has a highly developed unified collection of pseudo-tty based interfaces that make it is possible to make extensive use of Maple, Mathematica, Magma, Matlab, GAP, Maxima, Singular, PARI, and many other systems from anywhere within a single Sage program." It is available for Linux, Mac OS X and Windows or you can download the source code.

Check here for a short overview or check Sage webpage for more.

If you are interested in a short overview about what is Scientific Programming and which are the tools used in general, here is a short but very nice article: A case study on large-scale parallel scientific code development. Just a short summary:

"All codes use the message passing interface (MPI) library to achieve parallelism. In addition, each code uses external libraries for features such as

• I/O (HDF, NetCDF, CGNS, or Panda);
• mesh operations, including adaptive mesh refinement (ParaMesh, Mesquite, Metis, MeshSim, or SAMRAI);
• computational geometry (CGAL);
• linear algebra (BLAS, LAPACK), and tools for solving sparse linear systems and systems modeled by partial differential equations (PETSc, Hypre, or Clawpack).

While these codes use parallel libraries that sit atop MPI, developers still had to write raw MPI code to achieve desired functionality."

On 5th of May I asked for a free live cd on their website, and today after about two weeks I received it:

Thanks Sun ...

1. check if you have a processor that supports virtualization:

egrep '^flags.*(svm|vmx)' /proc/cpuinfo


2. create the image to hold the guest OS (10G size in this case):

qemu-img create -f qcow opensuse.img 10G


3. insert KVM kernel modules in the kernel if you compiled them as modules

sudo modprobe kvm
sudo modprobe kvm-intel (for intel processors)
sudo modprobe kvm-amd  (for amd processors)


4. copy opensuse dvd/cd on your hard disk:

dd if=/dev/cdrom of=/home/user/opensuse.iso (for cd)
dd if=/dev/dvd of=/home/user/opensuse.iso (for dvd)


5. install the quest:

qemu-system-x86_64 -boot d -cdrom /home/user/opensuse.iso -hda opensuse.img


6. start your new installed system:

qemu-system-x86_64 opensuse.img


Do you want more?
* use -m parameter to specify the ammount of RAM for virtual machine (default 128MB)
* use -incoming [protocol:params] if you want to move your virtual machine
on the other machine
* check http://kvm.qumranet.com for documentation