Update on Arch Linux

After having started my switch to Arch Linux in June 2011 I have now also switched my main desktop PC and my local server.

The general experience is great, most of the time I don’t miss Ubuntu. The only thing that works great with Ubuntu where I didn’t yet find a good alternative on Arch is vmbuilder to bootstrap virtual machines in a KVM/libvirt environment.

I really like the up to date packages and the rolling releases. The ArchWiki is very helpful and the community is great.

My First Steps with Arch Linux

I’ve been using Ubuntu for quite some time now on my desktop and for my servers. It works well and I like the Debian style apt package manager. However I am less happy with the more recent developments. Ubuntu packages differ more and more from the upstream packages and with their focus on Unity I started wondering whether there is a better fit for my Linux needs.

For my new T420s I decided to give Arch Linux a try after I had a short look at Mint, Debian, Fedora and openSUSE.

The Arch Way makes Arch different as it values simplicity and takes an elegant, minimalist approach. The core installation installs just what you absolutely need so you are greeted by a friendly command line when it’s done. After that you can easily install a graphical environment including Gnome 3 with or without shell, KDE and Xfce along with whatever packages you need. Software patches are kept to a minimum so most Arch packages are identical or at least very close to their upstream counterparts. The difference is similar to the “Google experience” of a Nexus One or Nexus S and the modified Android versions sold by the manufacturers. New versions of upstream software end up in Arch within days.

Arch is a rolling release distro that allows for a one-time installation and perpetual software upgrades. There is no need to reinstall or upgrade the system from one version to the next. Everything in Arch is bleeding edge.

Installation on my T420s did not work as smooth as Ubuntu. The latest official installation ISO is from May 2010 and does not support the network card of the T420s. There are newer testing versions but they have issues setting up full disk encryption. So I went with the official ISO and installed the updates via WLAN which worked well.

If you come from the Debian world you are used to apt for package management. Arch comes with pacman which is similar but a lot faster. Bringing your system up to date just means you have to run pacman -Syu instead of apt-get update && apt-get upgrade. After that you have the latest kernel (2.6.39 as of now). I Installed a few additional packages including XF86, Gnome, Chromium, Thunderbird and Libre Office and had a nice working system. Sound and the Touchpad including scrolling worked out of the box. For the network I decided to use Gnome’s NetworkManager so I installed network-manager-applet and modemmanager and got an easy to manage network setup with support for wired lan, WLAN and wireless broadband. My Ericsson F5521gw was recognized automatically and UMTS worked right away.

The Arch Wiki is a great resource and the home of the excellent documentation of Arch. For each part of the system you have multiple options to choose from and they are well explained.

Up to now I am really happy with Arch.

A few notes:

To setup focus follows mouse in Gnome run

gconf-editor /apps/metacity/general/focus_mode

and change the value from click to sloppy.

To make the massive Gnome 3 title bars a bit less high run

sed -i \
 "/title_vertical_pad/s/value=\"[0-9]\{1,2\}\"/value=\"0\"/g" \

Compression: gzip vs bzip2 vs 7-zip

Today I had a look at the different options to compress files (in this case for backup purposes) on a Ubuntu system. The most common tools to compress files are gzip and bzip2. They have both been around for a long time, are available on most systems by default and are nicely integrated with other utilities like GNU tar (using its -z and -j options).

7-zip and the algorithm it uses (LZMA) is not that common on UNIX-like operating systems. It is well-known as a free alternative for WinZip on Windows systems and was started back in 1998. For Ubuntu p7zip – a port of 7-zip to POSIX – is available in universe (sudo apt-get install p7zip).

My test file was a MySQL dump with a size of 163 MB that contains mostly text. I was interested in the compressed file size and in the time it takes to compress and uncompress the file.

Here are the results:

Compressor Size Ratio Compression Decompression
gzip 89 MB 54 % 0m 13s 0m 05s
bzip2 81 MB 49 % 1m 30s 0m 20s
7-zip 61 MB 37 % 1m 48s 0m 11s

For the test I ran all tools with their default settings, i.e. without providing any special options.

Gzip is still a great tool and provides good compression without consuming a lot of computation power. Bzip2 is much slower and only provides slightly better compression. 7-zip consumes a bit more cycles than bzip2 but results in far smaller compressed files. Speed for decompression is even better for 7-zip than for bzip2.

So if time is important (think of on-the-fly compression) gzip is the tool of choice. If you don’t care too much about processing speed and need very good compression have a look at 7-zip. The only advantage bzip2 has over 7-zip is that bzip2 is part of most default installations and is more common. Let’s hope this will change in the future, especially integration with GNU tar would be great.


Accessing Jira from Ruby

On Ubuntu I’ve installed ruby, the interactive Ruby shell irb and rubygems through apt-get and performed a gem update:

apt-get install ruby irb rubygems ruby1.8-dev
gem update --system

Gem is to Ruby what apt-get is to Ubuntu and Debian or CPAN to Perl: A package manager with support for dependencies providing and easy way to install extensions.

As with Java I prefer to us the native tools of the language to manage libraries and extensions so I only used apt-get to install the base and added the remaining dependencies through gem:

gem install rake
gem install soap4r

Rake is Ruby’s make or ant and allows to build applications from source. Soap4R is a soap library for Ruby.

Now it’s time to install Jira4R. I’ve used the latest version from their subversion repository:

cd /usr/local/src
svn co http://svn.rubyhaus.org/jira4r/trunk/ jira4r
cd jira4r
gem build jira4r.gemspec
gem install *.gem

Using Jira4R is quite simple:

require 'rubygems'
require 'jira4r/jira_tool'

jira = Jira4R::JiraTool.new(2, "http://jira.atlassian.com")
jira.login("soaptester", "soaptester")

issue = Jira4R::V2::RemoteIssue.new
issue.project = "DEMO"
issue.type = "1"
issue.summary = "Test from Ruby"
issue.assignee = "soaptester"


You can find more examples on the Jira4R page and in Jira’s SOAP API.

If you access your Jira instance through SSL you can add

jira.driver.options["protocol.http.ssl_config.verify_mode"] = nil

before the call to login so that Soap4R does not try to verify the SSL certificate. If you don’t you will encounter errors like

.../httpclient.rb:1039:in `connect': certificate verify failed (OpenSSL::SSL::SSLError)

Empty Windows in Swing Applications on Ubuntu 7.10

Using Java applications on Ubuntu 7.10 (gutsy) sometimes show empty windows. I’ve encountered this mainly with LDAP Browser/Editor and IDEA 7.0. It does not occur too often and mainly with small dialog windows. I guess Java 6 has some problems with Compiz which is enabled by default since gutsy.

The solution is to upgrade to Java 7 which is currently available as an early access version from the JDK 7 project at Sun.

This fixed my problems with LDAP Browser/Editor but IDEA complained with a “Java Version Mismatch” error. IDEA 7.0 officially requires Java 5 or Java 6, but also works with the EA of JDK 7. You can disable the check for the correct Java version by adding the following line to idea.vmoptions:



As eivindw wrote in the comments you may also be able to make IDEA work with Java 6 by setting the following environment variable:

export AWT_TOOLKIT="MToolkit"

MToolkit switches to the Motif implementation of AWT which was removed for Java 7. On my 64-bit version of Gutsy using MToolkit with Java 6 resulted in a core dump.


Ubuntu 7.10 on the IBM Thinkpad T43p

Today I’ve installed Ubuntu 7.10 (gutsy) on my IBM Thinkpad T43p.

I am using Ubuntu on the desktop for a few years now with Windows banned to a virtual machine. On the notebook I’ve stayed with Windows XP which worked fine. In the past using Linux on the notebook meant trouble with encrypted WLAN connections, missing support for hibernate and problems with notebook specific devices.

After booting the Ubuntu live CD the graphical installer was easily launched and ran without problems. The fresh system booted fine and I was a bit surprised when I logged in: It just works – out of the box:

  • Ubuntu recognized the internal WLAN adapter, provided a list of available wireless networks, asked for the WPA key and obtained the network config through DHCP
  • Ubuntu asked to install a few updates it discovered on its update site
  • the new 3D accelerated desktop (compiz) was enabled by default using the open source drivers for ATI cards
  • in Firefox scrolling using the right margin of the touchpad just worked
  • and finally: hibernating to disk and resuming did not cause any trouble.

I’ve kept the original Windows XP installation on a separate disk as I intended to restore it after my short trip to Ubuntu, but it seems I will keep Ubuntu and ban XP to a vmware instance.

Spark on 64bit Linux

Spark RTC Client

Spark is Jive Software’s Java based, Open Source XMPP (Jabber) client. It accompanies Openfire supports Asterisk-IM but also works with any other XMPP server – and it looks quite nice. It’s available for Windows, Mac OS X and Linux.

Well for Linux at least if you are running 32bit as recent versions of Spark are using native JDIC (JDesktop Integration Components) that are only available in binary for 32bit Linux.

You can grab their latest version from CVS and compile it on a 64bit Linux machine which works fine. Copy the shared libraries and jdic.jar to Spark’s linux library directory and it just works.

Or you can just grab my JDIC binaries and put jdic.jar, libjdic.so and libtray.so into ~/Spark/lib/linux.