New Unison (2.40.102) builds available

I recently updated the Unison version in my PPA.

The current version is 2.40.102. This version is taken from the Debian git sources and build without modifications.

The package is available for the following Ubuntu versions:

  • 10.04 LTS (lucid)
  • 12.04 LTS (precise)
  • 12.10 (quantal)
  • 13.04 (raring)

If you encounter any problems please let me know.

Using Cygwin SSH with Putty Pageant

On windows I mostly use Putty as my SSH client. But in some cases for example when I use unison or rsync I use the ssh client from cygwin.

Following good practice I use public key authentication and Putty's Pageant to manage my password protected keys. This works great with Putty and Plink. I thought this would be great if I could use the same agent for cygwin too. As often the solution already existed in the form of ssh-pageant.

Here is a small tutorial how to set it up:

  1. Download the prebuilt version of ssh-pageant from github (direct link).
  2. Upack it and copy the ssh-pageant.exe to your cygwin's /usr/local/bin directory
  3. You need to edit your .bash_profile file in order to start the ssh-pageant on opening a shell
    The method I use is different form the one described in ssh-pageant's readme as it only starts one instance of ssh-pageant and reuses this in subsequent sessions. It is based on the Github Help about ssh keys.

Update: In never versions the --reuse
makes things a lot easier. (Thanks sun for pointing this out)

Add this at the end of your .bashrc

# ssh-pageant
# Cygwin maps /tmp to c:\cygwin\tmp
# MinGW maps /tmp to %TEMP% (%LocalAppData%\Temp)
# Both consume $TEMP (user-specific) from the Windows environment though.
eval $(/usr/local/bin/ssh-pageant -ra $TEMP/.ssh-pageant)


Now you should be able to login using cygwin's ssh.exe with the same comfort of putty.

Use Zentyal Zarafa z-push with an N900

Today I had the problem that my Nokia N900 Mail for Exchange could not sync with my Zentyal server via Active Sync. After some research I found a solution in the Zarafa forum.

It consists of activating LOOSE_PROVISIONING in your z-push config.php.
If you are using Zentyal 2.0 this is located at /usr/share/z-push/config.php and you have to change the line:

define('LOOSE_PROVISIONING', false);


define('LOOSE_PROVISIONING', true);

now it should work.
Unfortunately I'm not sure if this gets overwritten during the next update!

Build Ubuntu/Debian packages from source (and apply a patch)

Sometimes there is a bug in a package from ubuntu that is not yet fixed, or you just want to modify something in the source of a software. Here is an easy way to build your own package from the ubuntu sources.

First you need to install the required tools for building software from source

sudo apt-get install build-essential

Let's assume you want to build a package called foo and apply a patch bar.patch to it.

First you have to download the necessary build dependencies for foo

sudo apt-get build-dep foo

Now you are ready to download the actual sources of the package (Don't use sudo here!!)

apt-get source foo

This gives you a directory called foo-<version> you can now cd into it apply the patch and build the package

cd foo-<version>
patch -p1 < bar.patch

Now you have a package called foo-<version>.deb in the same directory where you have run apt-get source. You can install it using dpkg.

sudo dpkg -i foo-<version>.deb

Automatically start SCREEN on SSH login

I just found a nice method to invoke screen automatically if after login via SSH. So you don't have to manually start it first.

Put the following at the end of your ~/.bashrc

# Auto-screen invocation. see:
# if we're coming from a remote SSH connection, in an interactive session
# then automatically put us into a screen(1) session.   Only try once
# -- if $STARTED_SCREEN is set, don't try it again, to avoid looping
# if screen fails for some reason.
if [ "$PS1" != "" -a "${STARTED_SCREEN:-x}" = x -a "${SSH_TTY:-x}" != x ]
  [ -d $HOME/lib/screen-logs ] || mkdir -p $HOME/lib/screen-logs
  sleep 1
  screen -RR && exit 0
  # normally, execution of this rc script ends here...
  echo "Screen failed! continuing with normal bash startup"
# [end of auto-screen snippet]

If you want more details and some additional tricks just go to

Bazaar Pro Engineer Helpers 0.3.0 Released

Yesterday I released Bazaar Pro Engineer Helpers 0.3.0 it supports recognizes more file types and does some more cleaning if you use the --purge option.

You can download it on Launchpad or directly form my site.

Installation instructions can be found here.

Additionally is now listed at Softpedia.

Wuala rc.d Script for Archlinux

Recently I published an init.d script for debian/ubuntu to start wuala in headless mode. Since some time now I have a mediacenter running on Archlinux so the debian init.d script needed some change to run properly. I'm currently putting together a package to install wuala on archlinux with via pacman. In the meantime I will publish the rc.d script  in case someone wants to install wuala manually following the instructions found here.

/etc/rc.d/wuala (download)

. /etc/rc.d/functions
case "$1" in
                stat_busy "Starting Wuala"
                cd $WUALADIR
                su $WUALAUSR -c "screen -d -m $WUALADIR/wualacmd"
                add_daemon wuala
                stat_busy "Stopping Wuala"
                cd $WUALADIR
                su $WUALAUSR -c "$WUALADIR/wualacmd exit > /dev/null"
                rm_daemon wuala
                $0 stop
                sleep 1
                $0 start
                cd $WUALADIR
                su $WUALAUSR -c "$WUALADIR/wualacmd showStatus"
                echo "usage: $0 {start|stop|restart|status}"
exit 0

Upadte: Use wualacmd instead of wuala. (Thanks to for the hint)

HP Printer drivers (hpijs) for Mac OS X

Since I switched to Snow Leopard I was not satisfied with the printing drivers for my old HP OfficeJet 95. I used the included Gutenprint drivers. For text they worked ok, but images looked terrible.

Today I decided to do something about it. From Linux I know that HPLIP has some pretty good driver (hpijs) for most HP Devices. Fortunately I can use the same drivers for Mac OS X to. You need three packages to do this. More information can be found on the website of the Linux Foundation.

This should help you get your old HP Printer working.

How to enable ALSA Analog 5.1 Sound on Nvidia ION

I recently had the problem to enable 5.1 Sound with 3 click outputs on an Nvidia ION board. By default Linux configures it with only one plug configured as output. After some research I found a solution in the OpenSUSE Wiki you have to set during module loading to get it working.
Basically you have to add

options snd-hda-intel model=3stack-6ch enable=1 index=0

to your modeprobe.conf to tell the driver to use all its 3 plugs as output. After you loaded the modules like this, alsamixer will show you all the 6 channels, so you can unmute them.

Wuala init.d Script for Debian/Ubuntu (Improved)

I recently wanted to install Wuala on my brand new media center PC running Ubuntu on it. It was not that hard because there is an excellent tutorial on how to setup wuala on a headless machine.

Unfortunately there was no script to start and stop Wuala on system start-up and shutdown. So I decided to create one.

/etc/init.d/wuala (download)

# Provides:          wuala
# Required-Start:    $network $local_fs $remote_fs
# Required-Stop:     $network $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: start Wuala headless (wuala)
if ps -u $WUALAUSR u|grep -v grep|grep loader3.jar >/dev/null;then
echo "Wuala is running"
return 0
echo "Wuala is not running"
return 1
case "${1:-''}" in
        # start commands here
        echo "Starting Wuala..."
        uptest || su $WUALAUSR -c "wualacmd > $WUALALOG 2> $WUALAERR &"
        # stop commands here
        echo "Stopping Wuala..."
        uptest && su $WUALAUSR -c "wualacmd exit > $WUALALOG 2> $WUALAERR"
        # restart commands here
        $0 stop
        sleep 1
        $0 start
        # status commands here
        uptest && su $WUALAUSR -c "wualacmd showStatus"
        uptest && su $WUALAUSR -c "wualacmd connectionInfo"
        uptest && su $WUALAUSR -c "wualacmd showSettings"
        # no parameter specified
        echo "Usage: $SELF start|stop|restart|status"
        exit 1

It is a very early version with not much error checking, so use it at your own risk. I just posted it in case somebody might find it useful.

To use it just save the content to /etc/init.d/wuala and run

$ sudo update-rc.d wuala defaults

Update: Added the necessary LSB informations
Update 2: The file can now be downloaded: /etc/init.d/wuala.
Upadte 3: Use wualacmd instead of wuala. (Thanks to for the hint)
Upadte 4: The new version checks if wuala is already running for the given user.