Tax-on-web met Linux Mint 13

Ieder jaar is het opnieuw wat gepruts om de belastingaangifte te doen met Tax-on-web en Linux. Het is me ook dit jaar gelukt, al is het me niet helemaal duidelijk waarom :-)

Ik gebruik Linux mint 13, de 64-bit Cinnamon editie, en mijn browser is Mozilla Firefox. En het lukte als volgt:

Van downloadde ik de 64-bit debs voor eid-mw en eid-viewer. Ik installeerde ze allebei. eid-viewer is een gui-tool waarmee je de gegevens op je identiteitskaart kunt bekijken, door dit programma te starten kun je makkelijk zien of je kaartlezer werkt.

Het eid-mw pakket installeert een firefox-add-on, maar die werkte bij mij niet out of the box. Ik heb die add-on gedisabled, en dan de add-on geinstalleerd van Dan werkte het wel.

Je kunt testen of alles in orde is op

PS: In de standaardrepo's van Ubuntu zitten pakketten beid-mozilla-plugin en beidgui. Ik heb geen idee of en hoe die werken. Weet jij het wel, laat iets weten.

Installing Mint 13 next to Debian Sid on an already encrypted hard drive

I had a dual boot system with Debian Sid and some proprietary other OS (*cough* wind*cough*s). The Debian installation is installed on 3 encrypted partitions, with LVM on top of them. I installed Linux Mint 13 next to the Debian system (also on the encrypted systems), so that I now have a triple boot setup: Linux Mint 13, Debian Sid and Windows. I thought it would be interesting to document how I did it, and what issues I ran into.

Before I started, I uninstalled all kernel-image-* packages from my debian system, except the one corresponding to the kernel I was actually using. This will eventually reduce the number of choices in the grub boot menu when finished. I backed up all in /boot, to be able to recover the original dual boot configuration in case of something going wrong. (Of course you should backup your whole system, and not only /boot, but hey, we all know how this goes, don't we.)

I downloaded the 64-bit-live-DVD for Linux Mint 13 with Cinnamon, and I put it on an USB-stick using unetbootin. Then I booted from the USB stick.

The first thing to do, was enabling lvm, and decrypting my encrypted partitions:

apt-get install lvm2
modprobe dm-mod
cryptsetup luksOpen /dev/sda6 crypt_sda6
cryptsetup luksOpen /dev/sda7 crypt_sda7
cryptsetup luksOpen /dev/sda8 crypt_sda8

sda6, sda7 and sda8 are my encrypted partitions. The lvscan showed that all my logical volumes were found and active, so I didn't have to vgchange -a y the volume group.

Now I had to create a new partition for the root file system of my Mint installation. I had more than 100 GB left on my volume group, so this was not a problem.

lvcreate -L 20G -n mint-root vg-debian
mkfs.ext4 /dev/vg-debian/mint-root

(My volume group is called 'vg-debian', because it was created this way by the debian installer. This doesn't make sense with multiple distro's installed onto it, but what's in a name anyway.)

To be sure, I ran partprobe, and then I started the mint installer. First I had to choose the partitions to use. For /boot, /home and swap, I took the existing ones from the Debian setup. As root partition, I chose the freshly created mint-root. I marked only the latter to be formatted.

The installer complained about system partitions not being empty, and it told me it might erase them. I guess it was referring to the /boot partition, but as will turn out, most of the files on there will just stay where they are.

After the configuration of the partitions, the installer started copying files, and asked me where I live. I chose 'Brussels', and then the installer froze. Partly. The progress bar of 'copying files' was moving, but for the rest nothing happened. I waited until the progress bar was completely full, but it kept being unresponsive. So I just killed the installation process, and I was left with a half-installed system. Exciting :-)

Luckily I was installing from a live CD, so I got a browser to search for help. On the Mint Forum I found a post which described more or less what the Mint installer actually does. So I could continue the installation process manually. My mint system appeared to be mounted under /target. First of all, I edited /target/etc/crypttab, and put the following in:

crypt_sda6    /dev/sda6       none    luks
crypt_sda7    /dev/sda7       none    luks
crypt_sda8    /dev/sda8       none    luks

This is needed to get the information of the encrypted partitions in the initrd. Then I chrooted into the new system, and installed the necessary packages for encrypted lvm:

chroot /target
mount -t sysfs none /sys
mount -t proc none /proc
mount -t devpts none /dev/pts
apt-get install cryptsetup lvm2

I set the root password:


and created a user.

adduser johan2

Initially I gave my user a different user name (johan2) than on the Debian system (johanv). This will create a new home directory. Then I just rename the new user:

usermod -l johanv johan2

Now I have a user johanv, with home dir /home/johan2. I do this because I typically have the following directory in my /home file system:

  • /home/johan1 (home directory for system 1)
  • /home/johan2 (home directory for system 2)
  • /home/johan-shared (files I share between the two systems)

In johan-shared, there are my settings for e.g. mutt and pidgin, and my develop-subdirectory. In the actual homedirs (johan1 and johan2) I have symlinks to the files in johan-shared. Whenever I switch to another distro, and I notice I need something from my previous homedir, I move these files to johan-shared, and put links in all homedirs.

At last I installed the bootloader: (I just accepted the defaults)

dpkg-reconfigure grub-pc

Moment of the truth: rebooting into the fresh system.

umount /dev/pts
umount /proc
umount /sys
umount /target/dev
umount /target/home
umount /target/boot
umount /target

The grub menu was shown, but when I booted into Mint, my screen showed some noise, and nothing else happened. Apparently the system was waiting for the password of the encrypted disc, but it didn't show a message that told me so. So I just entered the password, and I saw the disc activity indicator flickering. I had to enter the password two more times (because I have 3 encrypted volumes), and finally I had a running Mint system. More or less.

First problem: the mouse wasn't working correctly. When I clicked somewhere, the actually click was registered a little to the left of the mouse pointer. This was an annoying problem, but quickly resolved after installing the software updates. I tend to do this via the command line:

apt-get update
apt-get upgrade
apt-get dist-upgrade

After a while a second problem appeared. The system froze. But this is no new problem for me. I have an NVidia Quadro FX 1800M video card, which makes the free nouveau driver crash from time to time. This is a problem I have noticed on different distributions. So I installed the freedom hating nvidia driver (press the ‘super key’ (AKA the win***-key), enter 'driv', and the menu item 'Additional Drivers' will pop up. This tool will automagically install the driver for you). Installing the evil driver fixed the problem of not prompting for passwords as well.

One last thing left to do: make the old Debian installation available via the grub menu. For this, I needed the backup of my old /boot, to look at the original /boot/grub/grub.cfg file. I copied the Debian GNU/Linux entries in there, and appended them under /etc/grub.d/40_custom. And then:


This appended entries for Debian at the bottem of the grub menu, which now allows me to boot into my old system as well. It also seems to create some extra entries, which claim to start Mint with the old Debian kernel files. I didn't try to boot these (yet).

Screencasts, Istanbul and Youtube

Suppose you want to make a screencast, and upload the video to Youtube. This doesn't sound to hard to do. But I went through a lot of troubles before it actually worked. So I decided to write this down, in case someone else runs into the same problems. I am using Debian Sid.

There are several packages available for creating a screencast, and I first tried xvidcap. But when trying to record the sound as well, I got the message ‘Error accessing sound input from /dev/dsp’. I did some Googling, but I couldn't find an easy workaround.

So for my next attempt, I used Istanbul. This allowed me to create screencasts with sound, but when uploading the file to Youtube, Youtube complained about an unrecognized file format. Damn.

Again, if you Google the problem, you will find some tips, but none of them worked for me.

At last, after some trial and error, it seems that openshot can do the trick. Create a video project with openshot, import the ogg-video from Istanbul, put the video on the first track, and export the result again with the predefined web template. This creates a .mov-file, which youtube will happily show.

Dell Precision M4500, Debian Wheezy en nVidia drivers

Dit weekend installeerde ik Debian Wheezy op mijn Dell Precision M4500 laptop. Deze laptop heeft een nVidia Corporation GT215 [Quadro FX 1800M] grafische kaart, en net zoals bij ongeveer elke mogelijke Linuxdistributie, blijft de nouveau-schermdriver iedere X tijd hangen, waardoor het systeem niet meer reageert. (Zie deze bug in Fedora, maar ik vermoed dat elke distributie een analoge bug zal hebben.)

Dus ben ik wel verplicht om de freedom hating proprietary driver te installeren. Ik haalde de inspiratie op de Debian Wiki; op deze manier werkt het:

apt-get install linux-headers-`uname -r` #dit is misschien niet nodig
apt-get install nvidia-kernel-dkms nvidia-settings

en zet het volgende in /etc/X11/xorg.conf:

Section "Module"
    Load        "glx"
Section "Device"
    Identifier  "Video Card"
    Driver              "nvidia"

Rebooten, en dat is dat.

Setting up a wireless virtualisation host with Debian Squeeze and KVM

At the moment, I have two 'servers' on my attic. A file server, which is an old laptop running Freenas 8, and a server for printing, scanning and backups, which is a 10 year old PC running Ubuntu Server 10.04.

Since I don't have ethernet cables to the attic, the print server is accessable via wifi. I connected the print server to the file server with a cable, and to access the file server, I just route the traffic through the print server.

Now I want to replace those two servers on the attic by one virtualization host, which will at first just run a virtual copy of the servers I have right now.

For this virtual host, I have a 6 year old PC with 64-bit AMD processor, 1 GB ram and 150 GB disk space. This should be enough for my needs atm. I can always add more ram over time if needed.

UPDATE:Freenas used to be a lightweight file server. It isn't any more since version 8. Certainly don't use zfs as file system on your low end machine. Open Media Vault is probably a better file server solution.

UPDATE: I have upgraded to a 3.2-kernel, which makes adding a non-access-point wireless interface to a bridge impossible. So I created another subnet for the virtual machines, as described in the remarks below. Which makes the ebtables thing irrelevant.

UPDATE: Although it worked quite well (at last), I connected my virtual host to the wired network some day ago. Which makes things a lot easier and more stable. See comment below.

I'm not sure wheter it will work. Right now I have one virtual server ready to use, I'm still experiencing some network problems, and I am not sure whether what I am trying will actually work. But I'll keep you updated. This is what I did so far:

Setting up the Debian server

I set up a very basic Debian installation for the virtualization host. I used the 64-bit netinstall CD, to install only the basic system tools. No graphical environment, since the resources of my 'server' are limited. I created a large partition for virtual disk files, which I mounted under /vdisks.

My server has no space for PCI-cards (only mini-PCI), I don't have a mini-PCI wireless card, so I will be using a Linksys WUSB54GC usb wireless adapter I had lying around.

(Note: I will have to search for something else, because after some time the wireless card just stops working.)

To enable wireless networking, I had to install wireless-tools and wpasupplicant, because my network is secured with WPA-PSK authentication. I also needed a driver for the network card, so I had to enable the non-free repositories, and after that I could install firmware-ralink. With all those packages installed, enabling the wireless networking was a piece of cake.

Then I installed the tools for running and managing virtual machines on the command line: qemu-kvm, libvirt-bin and virtinst. Because the virtual hosts will be accessed using the wireless network, we will also need ebtables.

Setting up the bridge

Because the virtual machines will have to be accessible from my wireless lan, I need to configure a network bridge on the host, which will bridge the wireless card on the host to the virtual network interfaces of the guests. Configuring a bridge on a Debian system is very easy, but not if one of the interfaces has to use WPA-PSK. After a lot of trial and error, I got it working with this /etc/network/interfaces:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet static
      wpa-ssid **MySsid**
      wpa-psk **MyPsk**

iface br0 inet static
      bridge_ports wlan0
      bridge-stp off
      bridge-maxwait 5

As you can see, I used static IP-addresses, I think I had troubles when using dhcp. I had to start wlan0 first, and then br0, probably because the network card has to associate to the access point. The configuration above only starts wlan0, but I start br0 in /etc/rc.local, by adding the following line:

ifup br0

Installing a virtual FreeNAS server

To set up the virtual file server, I used this command:

virt-install --connect qemu:///system -n gobelijn -r 256 --disk path=/vdisks/gobelijn/gobelijn01.img,size=2 --disk path=/vdisks/gobelijn/gobelijn02.img,size=40 -c /vdisks/iso/FreeNAS-8.0.3-RELEASE-x64.iso --vnc --noautoconsole --os-type unix --os-variant freebsd7 --network=bridge:br0 --hvm

This creates a system with 256 MB ram, a disk of 2 GB for the OS and a disk of 40 GB for the data. It boots from the FreeNAS-iso, which I placed on /vdisks/iso/FreeNAS-8.0.3-RELEASE-x64.iso. The virtual server is called ‘Gobelijn’, I tend to choose characters of comic strips as server names at home. I ran the command as root, because it didn't work with a user in the kvm-group.

Now the new virtual server is booted, but of course I couldn't see what was happening. Since there is no graphical environment installed on the server, I needed another computer to connect to it. I installed virt-viewer on there, and connected as follows:

virt-viewer --connect qemu+ssh://root@ gobelijn

For some or another reason, I had to enter the password twice. It should probably work with a non-root user as well, still have to try it out.

After the installation, instead of rebooting, the system just shuts down. I restarted it by issuing these commands on the virtual machine host:

virsh --connect qemu:///system
start gobelijn

... and it didn't work. The virtual guests didn't recognize it's virtual network card. Luckily, this is a known problem, you can fix it by changing the network device type in the appropriate configuration file in /etc/libvirt/qemu. I had to replace the line <model type='ne2k_pci'/> in the xml (under devices, interface), and change it to <model type='rtl8139'/>.

After rebooting the virtual machine, it had a network interface.


... but it still didn't work. I could connect from the virtual guest to the virtual host and vice versa, but I couldn't connect the virtual host from other machines in the same subnet. The cause seems to be that wireless routers reject network packages with source mac-addresses that didn't authenticate.

This can be fixed with ebtables, as described in the Debian wiki. I just did what's described in there: I entered

ebtables -t nat -A POSTROUTING -o wlan0 -j snat --to-src $MAC_OF_BRIDGE --snat-arp --snat-target ACCEPT

and used the script

# addcomputer
# Will Orr - 2009


function add_ebtables () {

  ebtables -t nat -A PREROUTING -i $INIF -p IPv4 --ip-dst $COMPIP -j \
dnat --to-dst $COMPMAC --dnat-target ACCEPT
  ebtables -t nat -A PREROUTING -i $INIF -p ARP --arp-ip-dst $COMPIP \
-j dnat --to-dst $COMPMAC --dnat-target ACCEPT

if [[ $# -ne 2 ]]; then
  echo "Usage: $0 ip mac"
elif [[ $(whoami) != "root" ]]; then
  echo "Error: must be root"
  add_ebtables $1 $2

to change the source mac address from source packages from the virtual guest. I saved the rules using

EBTABLES_ATOMIC_FILE=/root/ebtables-atomic ebtables -t nat --atomic-save

and load them at boot time by adding this to /etc/rc.local:

EBTABLES_ATOMIC_FILE=/root/ebtables-atomic ebtables -t nat --atomic-commit


Now I still want to start the guest automatically when the host boots. Normally this can be done with virsh autostart gobelijn, but that doesn't work, probably because the hack of starting the bridge in /etc/rc.local. So I just start the virtual guest in /etc/rc.local as well, by adding

sleep 4
virsh start gobelijn


Packages I install on my Arch Linux system

Last weekend, I installed Arch Linux for the second time (I messed up my first installation). After the installation process, I found myself in a command line system (as expected), so I had to install a lot of applications by hand.

Just as a reference, I will list the packages I installed, so that I have them for if I ever have to reinstall Arch from scratch again.

Some basic command line tools:

  • lynx
  • openssh
  • mutt
  • pwgen


  • ntp
  • cups
  • networkmanager (interesting for laptop; replace standard network service by networkmanager)


  • pulseaudio
  • pulseaudio-alsa
  • lib32-libpulse
  • lib32-alsa-plugins
  • alsa-utils


  • xorg-server
  • xorg-xinit
  • xorg-utils
  • xorg-server-utils
  • mesa
  • mesa-demos

The freedom hating nvidia driver

  • nvidia
  • nvidia-utils

Xorg testing

  • xorg-twm
  • xorg-xclock
  • xterm
  • ttf-dejavu

Basic gnome

  • gnome
  • gdm
  • gnome-utils

Basic development

  • fakeroot
  • subversion
  • git
  • patch
  • python
  • pygtk

General desktop apps

  • gvim
  • evince
  • eog
  • gimp
  • network-manager-applet
  • firefox
  • gstreamer0.10-plugins
  • vlc
  • mplayer
  • flashplugin
  • heybuddy
  • xchat
  • droidcam
  • google-talkplugin


  • libreoffice
  • libreoffice-gnome
  • libreoffice-calc
  • libreoffice-writer

I am a wannabe Android developer (see Arch wiki for additional packages to install)

  • eclipse
  • android-sdk
  • android-udev
  • android-sdk-platform-tools

Tools which allow me to use Arch at work

  • twinkle (SIP phone)
  • rdesktop (for terminal services)
  • sudo
  • paprefs (I use a dedicated account for virtualbox, I start it with sudo, but I want sound)
  • virtualbox (run Windows)
  • virtualbox-additions
  • qt (fot the virtualbox gui)
  • thunderbird (plugins allow me to combine Google calendar and Exchange calendar)

StatusThread: saving the trees in discussions

A week or two ago, I disabled the registration of new users on this site: only spammers seemed to be interested in getting an account on my blog.

Nevertheless, if you want to comment on what I write, I think you should have the opportunity to do so. So I decided to post every article I write on, and link to the corresponding discussion, so that everyone with an account can comment on my texts. This way I don't have to do user management, and checking for f***ng spammers.

So far so good. But last week, got upgraded to version 1.0 of StatusNet. Which has tons of new features, but which also 'flattens' the discussion threads. If you go to the page of a discussion, you don't get the tree of messages StatusNet 9.9 generated, you just get the stream of messages in chronological order.

Some people like this, some don't, but this was not what I want as a feedback system for my site. So I quickly programmed something in php, that reconstructs the discussion tree of any discussion. Like for example

As you can probably see, it is pretty basic. I will probably improve it, but as I am famous of my failed projects, I won't promise anything :-) But it is open source, that's something. You can find the code on

UPDATE: In the settings, you can now re-enable the conversation trees:

Commentaar op posts nu vanaf

UPDATE: Deze informatie is niet meer relevant, sinds ik overschakelde naar nikola voor mijn blog.

Ik heb zonet alle gebruikers van mijn blog gegooid, behalve mijzelf. De administratie van gebruikersaccounts bestond voornamelijk uit het deleten van accounts gemaakt door spambots, vandaar.

Wil dat zeggen dat je vanaf nu niet meer kunt reageren op mijn posts? Neen. :-)

Voor elke post zal er een conversatie aangemaakt worden op In die conversatie kun je je reacties dan kwijt. (Dat veronderstelt dat je een hebt, maar die is uiteraard gauw geregistreerd.)

Installeer eens een Linuxdistributie

Zaterdag 17 september 2011 is het weer software freedom day. Dit jaar vieren we dit door een Linuxdistributie te installeren :-)

We installeren Linux Mint 11, want dan heb je meteen ook java, mp3-ondersteuning, flash, en alwat je achteraf toch nodig hebt. Bovendien leunt de user interface van Linux Mint 11 nogal dicht aan bij wat je gewoon bent van Windows, en dat is een voordeel voor nieuwe gebruikers.

Eerst en vooral heb je een computer (laptop of desktop, anders is Mint minder interessant) nodig waarop je Linux Mint gaat installeren. Er zijn twee mogelijkheden:

  1. Je hebt niets meer nodig van de harde schijf van je computer
  2. Op je computer staat een besturingssysteem (vaak Windows) dat je achteraf nog wilt kunnen gebruiken

Als mogelijkheid 1 voor jou van toepassing is, prijs je dan gelukkig. Je kunt de installatie dan helemaal zelf doen, op basis van wat ik hier zal tonen.

Is mogelijkheid 2 van toepassing, dan ligt het anders. Het is technisch zeker mogelijk om Linux te installeren naast een bestaande Windowsinstallatie (een 'dual boot-configuratie'). Maar als er met de Windowsinstallatie niets mis mag gaan, en je hebt zelf nog nooit een dual boot-configuratie opgezet, laat je dan helpen door iemand die dat al wel gedaan heeft. Ben je uit de buurt van Kessel (Nijlen), kom dan bijvoorbeeld eens langs op een meeting van neteLUG, een kleine Linux User Group waar ik mogelijk wel iets mee te maken heb, en neem je computer mee.

Voorlopig ga ik ervan uit dat je van de harde schijf van je computer niets meer nodig hebt.

Behalve een computer, heb je ook een installatie-CD of -DVD nodig. Met de DVD gaat de installatie het gemakkelijkst, dan heb je in één keer alle toeters en bellen. Heb je geen DVD, dan krijg je van mij een CD. Dan heb je wat meer tijd nodig voor de installatie, maar CD's uitdelen is voor mij goedkoper dan DVD's uitdelen :-)

Als je weet waar ik werk, dan kun je een CD komen halen op mijn bureau. Er liggen er daar, je mag ze zo meenemen. Weet je niet waar ik werk, contacteer me dan, en zo lang het me niet te veel kost, stuur ik een CD'tje op. Als je weet hoe dat moet, kun je natuurlijk zelf een CD- of DVD-image downloaden en branden.

Let op dat er CD's/DVD's zijn voor 32-bitcomputers en 64-bitcomputers. Zorg dus dat je weet wat voor processor er in je computer zit. (Hoe het werkt voor Windows, vind je hier.)

Eenmaal je een computer en een CD hebt, stop je de CD in je computer, en start je je computer op vanop die CD. Dat is gemakkelijker gezegd dan gedaan, want helaas is er hiervoor geen standaardmanier van werken. In onderstaand filmpje laat ik zien hoe het zou kunnen verlopen:

Als het je gelukt is om van de CD te booten, probeer dan eens uit of je op internet kan. Als dat lukt, kun je aan de installatie beginnen. Hiervoor is er ook een filmpje: (met excuses voor de slechte geluidskwaliteit. In het filmpje steek ik dat op de headset die ik gebruik, maar vermoedelijk heeft het meer te maken met mijn gebrek aan ervaring met dit soort van dingen.)

Succes ermee!