Posts Tagged ‘ubuntu’

Why I switched from Ubuntu to Arch Linux

2012/10/16 2 comments

Ubuntu is a great GNU/Linux distribution. I have been using it since 2004, and except for one LTS (long term support) upgrade a couple years back everything was fine. That LTS upgrade a couple years back screwed up the X system, leaving me with the bash shell. Don’t get me wrong: I enjoy dabling with my Linux system, but an LTS upgrade should be safe.

Well, this was years ago.

After upgrading from Ubuntu 11.10 to 12.04 the same thing happened again: No X system.

I have a cheap Nvidia card with dual head setup (dual head means you can plug in 2 monitors). Worked fine with Ubuntu since 2009. So I upgraded to Ubuntu 12.04. And I’m back to: No X system.

I was not amused.

It was not a hardware problem: The old OS (Ubuntu 11.10) worked fine. It was not the fault of Nvidia. I am talking about a video card for 20-50 bucks! Not one of those high-end video cards.

Instead of switching to another deb or rpm based system I decided to switch to one of those “rolling” distributions like Gentoo or Arch. I picked the later and have so far not regrated the decision.

Arch Linux is my home production system of choice.

Categories: linux Tags: , , , ,

Adding Truecrypt to Ubuntu’s Unity panel

2011/05/09 Comments off

To add applications like Truecrypt to Ubuntu’s Unity panel the application has to be “white listed”.

  1. Install dconf-editor (ie sudo aptitude install dconf-editor)
  2. Go to section desktop | unity | panel and add ‘Truecrypt’ to the systray-whitelist variable
  3. Restart Unity (or log out and back in again)
Categories: linux Tags: , , , ,

Configure VirtualBox Windows guest system to use 2 monitors

2011/01/01 Comments off


Our host system for VirtualBox is GNU/Linux. We want our guest system, windows, to use two monitors.
This solution should work for all Linux distributions supported by VirtualBox4.

Required software

  • Ubuntu 10.10 (aka Maverick) as host for VirtualBox4
  • VirtualBox 4
  • VirtualBox guest sytem: Windows XP (incl. VirtualBox guest additions)


  1. Setup virtual guest machine (windows) within vm host system (GNU/Linux) to use two monitors:


    Setting up virtualbox 4 to use 2 monitors for windows xp guest

  2. Within virtual guest (windows): Configure dual monitor setup:


    Setup within virtualbox guest system (windows)

Side note

Upgrading from VirtualBox owned by Sun to VirtualBox owned by Oracle was very smooth. Even for Linux host systems. Oracle, thanks for that!

Emacs: murrine_style_draw_box: assertion `height >= -1′ failed

2010/11/02 Comments off

This nasty bug has been around for over a year: Calling Emacs on Ubuntu from the console outputs

murrine_style_draw_box: assertion `height >= -1′ failed

after every action within Emacs.

The solution is simple, but has not been integrated in the Ubuntu repository yet.

Here it is:

In the file



GtkRange::trough-under-steppers = 0


GtkRange::trough-under-steppers = 1

For details see Bug #538541Bug #550532 and Resolving “murrine_style_draw_box: assertion `height >= -1′”

Categories: IT, linux, Uncategorized Tags: , , ,

Executing a script after mounting a TrueCrypt partition on Ubuntu 9.10 (Karmic Koala)

2009/12/08 Comments off

Goal: Automatically run a script/program of your choice after mounting a TrueCrypt partition on Ubuntu 9.10.

Background info on udev (very short)

  • UDEV listens to certain events. Depending on the event, a certain “rule” can be executed.
  • To see some of the default rules, visit lib/udev/rules.d and study those examples.
  • Many current GNU/Linux distros use the udev system to manage actions that should happen after automounting.


My setup

Your setup might differ! I have a USB stick. Amongst other things, it includes a TrueCrypt partition. I am able to (un)mount the TrueCrypt partition using the TrueCrypt program.

Info required for udev

udev needs a way of identifying your partition. We can use udevadm info (this corresponds to udevinfo in older tutorials) to get this info. I know that my truecrypt partition is always mounted to /media/truecryt1. This is mapped from /dev/mapper/truecrypt1 (have a look at the output of the “mount” command after mounting truecrypt to see these details).

We need unique infos about the truecrypt partition for udev. To aquire this info, use:

$ udevadm info -a -p $(udevadm info -q path -n /dev/mapper/truecrypt1)

On my system the output is:

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device ‘/devices/virtual/block/dm-0’:
ATTR{stat}==” 6521 0 7172 5870 1 0 1 0 0 70 5870″

Not much unique stuff there. The only thing that looks unique is ATTR{size}==”6290941″. Let’s take that.

udev rule

  • Go to etc/udev/rules.d
  • Create a new file 85-myrules.rules
  • Add the following line (adapted to your needs) 
    ACTION=="add", KERNEL=="dm-[0-9]*", SUBSYSTEM=="block", ATTR{size}=="6290941", RUN+="/usr/bin/touch /home/your-user-name-here/testcrypt.txt"
  • Some notes:
    • == corresponds to a “check” (ie check if kernel equals dm-.., check if subsystem equals block, check if attribute-size equals 6290941)
    • = corresponds to an assignment
    • += corresponds to an assignment


  • Unmount your TrueCrypt volume
  • Reload udev: sudo reload udev
  • Mount your TrueCrypt volume
  • Check your home directory: It should now contain a file testcrypt.txt
Categories: IT, linux Tags: , ,

Emacsclient usage on a GNU/Linux system

2009/10/23 3 comments

Short instructions on how to setup Emacs using the Emacs Server/Emacs Client system on a GNU/Linux machine.

This post is intended for people familiar with GNU/Emacs.


GNU/Emacs 23 or greater (for Ubuntu get the Emacs PPA:

Files to edit:


System settings using Gnome:

System -> Einstellungen -> Startprogramme

For the impatient:

Add this to your ~/.bashrc:

export ALTERNATE_EDITOR=emacs EDITOR=emacsclient VISUAL=emacsclient
## you can always use the command "emacs" instead of "emacsclient -c"
alias emacs='emacsclient -c'

Add this to your ~/.emacs:


Add this to your system startup options:

/path/to/your/emacs --daemon


/usr/bin/emacs --daemon

Gnome panel starter:

/usr/bin/emacsclient -c'

Detailed instructions

Starting Emacs from scratch will always load your init file (default: ~/.emacs). Loading this file can take a few seconds if your init file has grown over the years and if you load many external libraries.

To decrease the load time for situations like this the GNU/Emacs folks have developed the GNU/Emacs daemon and the GNU/Emacs server-client concept.

This concept allows you to attach to an already running session. No matter if you are currently using X or  a TTY session!

Just try it (without changing any settings):

  1. Start GNU/Emacs from a shell under X:
    $ emacs
  2. Now start the Emacs server from within Emacs:
    M-x server-start
  3. Open a file from within Emacs (it does not have to exist):
    C-x C-f ~/deleteme.txt
  4. Because we started the Emacs server, we can now start the Emacs client with close-to-zero load time:
  5. Starting the Emacs client from a new shell:
    $ emacsclient deleteme-from-shell.txt

    This will open the file “deleteme-from-shell.txt” in your running Emacs session. Cool, isn’t it?

    IMPORTANT: To close the attached Emacs client without killing the Emacs server you have to use “C-x #” instead of “C-x C-c”!

  6. Starting the Emacs client from a new shell AND opening a new Emacs frame:Same as step 5, but use “-c”:
    $ emacsclient -c deleteme-from-shell.txt

    Again: Close the client using “C-x #”! This will close the frame (=window) while keeping the server running.

  7. Starting the Emacs client from a new shell AND opening it within the current shell:Same as step 5, but use “-t”:
    $ emacsclient -t deleteme-from-shell.txt

    This will also work for a true TTY session. An example of a true TTY session can be achieved by switching to TTY-0 (Ctrl+Alt+F1; to return to your graphical display: Ctrl+Alt+F7). Try it:


    Login with username and password, then type

    $ emacsclient -t deleteme-from-shell.txt

    We are still attached to the same session! Cool!

    Switch back to your graphical display: Ctrl+Alt+F7

  8. The only drawback so far is that we had to start the Emacs server manually from within an Emacs session using “M-x server-start”. Otherwise “emacsclient” will complain that it has no server to attach to. So let’s include this feature in our Emacs init file (~/.emacs). Add this to your init file:
  9. The previous step still requires us to start Emacs before we can invoke emacsclient. Let’s tell our default shell (ie Bash) to use “emacsclient” as default. If that doesn’t work, our shell should use “emacs”. Add the following the your ~/.bashrc:
    export ALTERNATE_EDITOR=emacs EDITOR=emacsclient VISUAL=emacsclient
  10. I prefer to to only use a single command, “emacs”, and “the computer” should figure out
    IF an Emacs server is running (then I’ll use “emacsclient” to attach to a running Emacs server)

    OR if I have to start a new Emacs session (which, in turn, starts an Emacs server).

    ## you can always use the command "emacs" instead of "emacsclient -c"
    alias emacs='emacsclient -c'
  11. Sugar: To be sure to have an Emacs server running, we can add the Emacs daemon to our system startup options. How to add scripts to your startup options differs strongly between different Linux systems. Here’s how I did it (using Gnome):”System” -> “Einstellungen” -> “Startprogramme”(in English this should correspond to something like “System” -> “Settings” -> “Start programs”)I added a new entry with the following content:
    /path/to/your/emacs --daemon


    /usr/bin/emacs --daemon
  12. Further sugar: To use a Gnome panel starter, just add this program parameter to the starter properties:
    /usr/bin/emacsclient -c

VMware keyboard mapping issues (Alt Gr) solved

2009/07/28 3 comments

If your VMWare keyboard mapping prevents you from using special keys such as Alt Gr, just add the following the your /etc/vmware/config:

xkeymap.keycode.108 = 0x138 # Alt_R
xkeymap.keycode.106 = 0x135 # KP_Divide
xkeymap.keycode.104 = 0x11c # KP_Enter
xkeymap.keycode.111 = 0x148 # Up
xkeymap.keycode.116 = 0x150 # Down
xkeymap.keycode.113 = 0x14b # Left
xkeymap.keycode.114 = 0x14d # Right
xkeymap.keycode.105 = 0x11d # Control_R
xkeymap.keycode.118 = 0x152 # Insert
xkeymap.keycode.119 = 0x153 # Delete
xkeymap.keycode.110 = 0x147 # Home
xkeymap.keycode.115 = 0x14f # End
xkeymap.keycode.112 = 0x149 # Prior
xkeymap.keycode.117 = 0x151 # Next
xkeymap.keycode.78 = 0x46 # Scroll_Lock
xkeymap.keycode.127 = 0x100 # Pause
xkeymap.keycode.133 = 0x15b # Meta_L
xkeymap.keycode.134 = 0x15c # Meta_R
xkeymap.keycode.135 = 0x15d # Menu

I found this solution on the German Ubuntu forum.

This worked with VMware-server-2.0.1-156745 in combination with host OS Ubuntu 9.04 and guest OS Windows XP SP3.

Installing Adobe AIR and TweetDeck on Ubuntu 9.04

2009/06/17 1 comment

This is a short manual on how to install Adobe AIR and Adobe AIR applications such as TweetDeck on Ubuntu 9.04 (This instruction should also work with most up-to-date Linux distributions). Once you have confirmed that everything works (i.e. TweetDeck works), you can delete all downloaded files.

  1. Download Adobe AIR from their homepage:
  2. Make AdobeAIRInstaller.bin executable

    $ chmod +x AdobeAIRInstaller.bin

  3. Install Adobe AIR

    $ sudo ./AdobeAIRInstaller.binThis will install Adobe AIR to /opt/Adobe AIR

  4. Download TweetDeck

    $ wget \

  5. Install TweetDeck using Adobe AIR installer

    $ /opt/Adobe\ AIR/Versions/1.0/airappinstaller

  6. This will open a GUI installer and automatically start TweetDeck. Furthermore, a starter will be created on your desktop.
  7. The desktop starter is just a script. Here’s the content:

    ~/Desktop$ cat \
    [Desktop Entry]
    Comment=Welcome to TweetDeck - a unique way to view your twitter timeline

  8. To uninstall Adobe AIR and Adobe AIR applications, select “Programs” -> “Applications” -> Adobe AIR Uninstaller”. This will also automatically uninstall Adobe AIR applications (i.e. TweetDeck).

New in Ubuntu 9.04: screen-profiles, the enhanced GNU screen

2009/06/05 Comments off

My recent discovery: Ubuntu 9.04 comes with screen-profiles, a command-line “GUI” enhancement based on curses. If you have been using GNU-Screen for a while, but have always been too lazy to configure the display (or any other part of the program), you might enjoy this tool.

Lorna Jane posted a nice summary about screen-profiles.

Side note: This tool was actually developed by Canonical, the company behind Ubuntu.

Problem upgrading VMware Tools (because of JIT-Debugger) solved

2009/05/26 Comments off

After resurrecting an old VMware installation (I started with the first freely available version of VMware.. version 1) and upgrading successfully (see this post), I was not able to update Vmware Tools within my guest OS (Windows XP SP3). I tried the automatic update option as well as the interactive update option. Both resulted in Visual Studio’s JIT (Just-In-Time) Debugger complaining and aborting the upgrade (on the guest OS).

Solution: Within the guest OS (WindowsXP in my case), uninstall VMware Tools and restart the guest OS. After restarting the guest OS the VMware UI “VMware Tools”-section will have changed from “Upgrade VMware Tools” to “Install VMware Tools”. Clicking the latter installed a fresh version of VMware tools without any problems.

This worked with VMware-server-2.0.1-156745 in combination with host OS Ubuntu 9.04 and guest OS Windows XP SP3.