Backup Kmail

We are upgrading desktops 🙂 but I have to back up my archive mails and restore it again in new desktop. To backup the contents of my emails:

  1. cd ~/.kde/share/apps/
  2. tar czvf kmail.tar.gz. kmail
  3. copy kmail.tar.gz to CD or external HD.

Fixing icons and menu in OpenOffice 3.2 Kubuntu Hardy

I am not sure what happened, but when I open Impress, and my mouse is over the icons or menus, they are gone. When the mouse is over a selected icon, that particular icon appear the rest on its sides are not displayed.

Somehow, I managed to find the solution that works from this page: this page. What I did was to:


to my ~/.kde/env/ file.

and then restart the OS

using update-alternatives

I have several version of octave now, and I do not want to remove the older version yet. Debian system provides a nice command called update-alternatives where it can choose from several alternatives the program you want to use. for example in the case of octave. It will create a symbolic link in /usr/bin/octave that points to /etc/alternatives/octave. This in turns link to the choice of octave we want.

To install a new version of octave to the alternative system:

sudo update-alternatives --install /usr/bin/octave octave ~/Programs/Octave-3.2.4/bin/octave 4

The number at the back is the priority number. Now to choose the default octave we want to load:

sudo update-alternatives --config octave

This will display:
There are 4 alternatives which provide `octave’.

Selection Alternative
+ 1 /usr/bin/octave-2.1.73
2 /home/kurniawano/Programs/Octave3.0.1/bin/octave
* 3 /home/kurniawano/local/bin/octave
4 /home/kurniawano/Programs/Octave-3.2.4/bin/octave

Press enter to keep the default[*], or type selection number: 4
Using ‘/home/kurniawano/Programs/Octave-3.2.4/bin/octave’ to provide ‘octave’.

Of course in the above I choose the newly installed version.

to remove an option, you can use:

sudo update-alternatives --remove octave /home/kurniawano/Programs/Octave3.0.1

finding which package should I install in ubuntu/kubuntu

Sometimes, in installing some software from the source, it requires certain file or packages. If you know the package, it is pretty simple in ubuntu, simply type “sudo apt-get install “. But what if you don’t know and you only know xxx.h is required. To find the package, you can use apt-file. To install this,

sudo apt-get install apt-file

Then, to search which package contains xxx.h, simply type

apt-file search xxx.h

apt-file can even list down where this file will be installed,

apt-file list xxx.h

Building OpenCascade 6.3 in Kubuntu Hardy

I tried to install OpenCascade 6.3 in my Kubuntu Hardy desktop. First I downloaded the tar.gz file and untar it. After that, I go to the “ros” folder inside. There you will find the instruction in README.txt.

So the first thing I did was to edit env.csh file and change the CASROOT environtment variable to where I untarred the source code. After that I run env.csh.

The next thing was to run ./configure. This is a bit tricky since a lot of things to set up. I first installed tk8.5 by typing:

sudo apt-get install tk8.5-dev

In the first trial, the configure cannot find Xmu.h, so I installed “libxmu-headers” package. But somehow, it still cannot find my X. So what I did was to create a symbolic link to

sudo ln -s

This fixed the problem and now configure can find my X. But there’s still one thing it cannot find which is java. the configure cannot find jni.h. So I installed sun-java6-jdk from apt-get and run the following configure command:

./configure --prefix=$HOME/Programs/OpenCascade/ --with-gl-include=/usr/include --with-gl-library=/usr/lib --with-xmu-include=/usr/include/X11/Xmu/ --with-xmu-library=/usr/lib/ --with-tcl=/usr/lib/tcl8.5/ --with-tk=/usr/lib/tk8.5 --with-java-include=/usr/lib/jvm/java-6-sun/include/

Now configure can find all that is required.  When I ran make, I encountered this error:

macro `AM_PROG_LIBTOOL' not found in library

From some forum, it was suggested to install libtool, so I install libtool from Adept, and the make can continue, but again it stopped and giving this error: directory should not contain `/'

I tried to run make again and it can continue even to the step of make install. But when I tried to run DRAWEXE application, it cannot find some library:

./DRAWEXE: error while loading shared libraries: libTKDraw.0: cannot open shared object file: No such file or directory

So I decided o try the steps described in:

% aclocal
% libtoolize --force
% autoconf
% automake
% mkdir build
% source
% cd build
% ../configure ${flags}
% make
% make install

where is defined as following:

flags="--prefix=$HOME/Programs/OpenCascade/ "
flags="$flags --with-gl-include=/usr/include --with-gl-library=/usr/lib"
flags="$flags --with-tcl=/usr/lib/tcl8.5/ --with-tk=/usr/lib/tk8.5"
flags="$flags --with-java-include=/usr/lib/jvm/java-6-sun/include/"
flags="$flags --enable-production"

I will update the post once it finishes 🙂

Connecting to Network Printer from Linux desktop

I am using Kubuntu Hardy for my office desktop and the printer is a network printer. To setup a new printer in Kubuntu, I need first to check the properties from a windows PC. In windows XP, go to Printers and Faxes, and right click the installed network printer there, then choose “Properties”. The following information are useful:

  • click “Sharing” tab and take note the “Share name”
  • click on the “Ports” tab and take note the IP address

After this go to your Kubuntu OS, and use the printer wizard. Choose TCP/IP printer, and enter the IP address as you have noted before. Follow the wizard until finish.

Fixing flash and java plugin for Firefox 3.6.2 in Kubuntu Hardy

I just installed firefox 3.6.2 from the ubuntu repository for Hardy. But it turns out that my flash is not working. When I go to Tools->Add-Ons, I noticed that the flash is disabled and the java plugin is no more. So I enabled the flash plugin (version 9) and it works. Now for the java plugin, I followed the instruction given in:

Basically what I did was to remove the plugins from both :

  • /usr/lib/firefox/plugins and
  • /usr/lib/firefox-3.6.2pre/plugins

And then create a symbolic link at these two locations that points to:




This solves my problem.