Speed up SSH X11 forwarding

I use an Ubuntu server as a work-horse for my calculations and connect from my desktop-pc with ssh to the server. For some applications (gnuplot =) this is really slow altough it’s over LAN. I found on the internet some instructions to improve this situation: instead of the AES cipher the arcfour and blowfish ciphers perform much better and switching on compression also doesn’t hurt. Therefore one should use

ssh -c arcfour,blowfish-cbc -XC host.com

to connect to with ssh. And guess what? This really improves the situation, especially for gnuplot. Thanks Samat!

Same swap partition mounted twice (Ubuntu Feisty)

Yesterday I wrote that my swap partition suddenly vanished, only to find out that suddenly my swap partition was mounted twice. “top” showed twice the amount of swap space available and “cat /proc/swaps” listed two entries to the same swap partition (/dev/sda6 and /dev/mapper/sda6). This seems to be a bug in Ubuntu Feisty and the (temporary) solution is to change the “/etc/fstab”. You’ll find a line “UUID=Your_UUID none            swap    sw”. Replace “UUID=..” with the correct device, e.g. “/dev/sda6”. After a reboot the swap partition should only be mounted once (“cat /proc/swaps”). The system boots now faster btw, sometime it hung during the startup.

Suddenly my swap drive was missing

When checking ‘top’ after I was told that I have no memory anymore I found out that I had no swap drive anymore. Must have gone lost when I switched to Ubuntu Feisty. Anyway, I found a description to re-initiate the swap drive:

  • First find out which partition your swap drive is, e.g. with ‘sudo fdisk -l /dev/sda’ (the important line is ‘/dev/sda6 8391 8645 2048256 82 Linux swap / Solaris’)
  • sudo mkswap /dev/sda6 – a new UUID will be created and printed on the screen (e.g. ‘no label, UUID=16ef6e6c-dd7e-4efd-bacd-8718ebeac568’)
  • create a link in /dev/disks/by-uuid: ‘cd /dev/disks/by-uuid’ and ‘sudo ln -s ../../mapper/sda6 /dev/disk/by-uuid/Your-UUID’
  • sudo swapon -va
  • sudo gedit /etc/fstab and set the correct UUID in the line ‘UUID=Your-UUID none swap sw 0 0’

To keep swap intact after hibernation additionally you need

  • sudo gedit /etc/initramfs-tools/conf.d/resume and add the line ‘RESUME=UUID=Your-UUID’
  • sudo update-initramfs -u

mdadm trouble on Ubuntu Feisty

I kept getting these error message during the boot process and also after issuing the command ‘sudo update-initramfs -u’:

W: mdadm: unchecked configuration file: /etc/mdadm/mdadm.conf
W: mdadm: please read /usr/share/doc/mdadm/README.upgrading-2.5.3.gz .
W: mdadm: no arrays defined in configuration file.
W: mdadm: falling back to emergency procedure in initramfs.

The mdadm-package is needed for software raid array. If you don’t have a raid array you can solve this problem simply by removing the mdadm package: ‘sudo apt-get remove mdadm’. More information is at launchpad.net.

How to remove programs installed from source in Linux

Though you can usually install most programs in Linux comfortably with the package manager of you Linux distribution (rpm, deb, etc.), sometimes you need to compile something from source.

For example gnuplot in Debian/Ubuntu has the readline functionality not compiled in, which makes it rather hard to use. But I’m somewhat reluctant to install these programs with “make install” since they are somewhere copied into system and it’s practically not possible to remove them except with “make uninstall” – but this option is not always available and you have to keep the sources of the program you installed.

But don’t renounce yet. There is paco. This little gem allows one to log the “make install” process. paco is than able to remove all installed files if one decides so. Installing paco is easy.

  • Download and untar it somewhere, cd into new directory
  • sudo apt-get install libgtk2.0-dev (if you don’t have gtk devel installed) or sudo apt-get install libgtkmm-2.4-dev (if you install paco 2.0 or newer)
  • ./configure --prefix=/usr/local
  • make
  • sudo make install
  • sudo make logme

paco is now installed, paco itself is also logged in its database. If you want now to install something if it should be logged with the name of the current directory as the name for the package replace the last “make install” command with

sudo paco -lD make install

to set the name of the package yourself, use

sudo paco -lp foo-1.0 "make -C src install"

In order to see what packages are installed or to remove a package use sudo gpaco.

X11 forwarding with OpenSSH on bare Ubuntu Server Edition

I installed today Ubuntu Server Edition 7.04 on one of my machines and here practically nothing is installed. Therefore for example X11 forwarding doesn’t work if you remotely log in with “ssh -X” (after you installed openssh-server :). So, if you start a X11 program you get e.g.:

xterm Xt error: Can’t open display:
xterm: DISPLAY is not set

I found the solution here. You need to install the program xauth with

sudo apt-get install xauth

and off you go.

This is a sad, sad song …

The new album of Clara LuziaThe long memory” was the Album of the week in FM4 in the first week of May. The song “Morning light” is a very good song, well arranged and produced – it’s just a wonderful song. There is also a video of this song which was published at youtube:



The cool thing about that is that Clara Luzia is actually an Austrian band and it’s not taken for granted that you have a lot of such bands in this country … Visit also their myspace account to listen to other songs.

Install gnuplot on Ubuntu

I once again updated these instructions for Gnuplot 4.4.0 RC1 and newer Ubuntu versions. Find these instructions in this post.

There is an updated Howto for Ubuntu Gutsy Gibbon available.

Though there is gnuplot available in the Ubuntu/Debian repositories, there are reasons to compile gnuplot – first and most important gnu readline support! I don’t know why Debian maintainers don’t compile the GNU readline support into GNUplot – it’s some license issues – but it’s like that and this makes gnuplot practically unusable. Second having the pdf and wxWidgets terminal is not that bad at all 🙂

So here are the instructions: Continue reading Install gnuplot on Ubuntu

Workaround for ‘Black Window Bug’ using Beryl on Kubuntu

I recently installed Beryl on my Kubuntu Feisty Fawn distribution and I run into two problems:

1) The window decorations were missing – here you need to add the line
Option “AddARGBGLXVisuals” “true”
to Section “Screen”.

2) My windows were all black and this is a bug in the NVidia driver which doesn’t seem to be fixed soon or at all – the problem is, that if you have a card with not much memory, like my NVidia Go 6200, windows content gets black since there is no memory available. There is a lengthy discussion about that here.
An easy fix for this problem is, right click on the red diamond (Beryl manager) in the system tray and choose “Advanced Beryl Options->Rendering Path->Copy”. This should have an effect on the performance but at least it works :). Thanks Nil.

More info can be found at these links:
An automatic easy solution for nearly (all) problems
Opening too many windows leaves some of them black

Using \subref in the caption of a figure (LaTeX)

I use the subfig package and when I compiled my thesis in Linux I encountered a problem, when I used the \subref command in the caption of a figure. The compilation was stopped with the error message “Argument of \@tempf has an extra }.”

Scanning the internet I found this forum entry in German where it was proposed to add the command “\protect” before “\subref{fig:1}, which actually did the trick for me. I didn’t have this problem though with MikTeX.