Category Archives: English

ThinkPad X61

A few days ago I ordered a Lenovo ThinkPad X61 with 2GB memory option, X6 UltraBase docking station and an optical drive. It arrived the very next day, on a friday, so you can imagine the impact this had on my weekend.

To be fair, the laptop isn’t exactly mine. It belongs to my employer, Jakob Hatteland Solutions.

I’ve specifically asked for the ThinkPad X61 since I’m already familiar with the X-series, I own a ThinkPad X31, and so far I’m happy with it. The ThinkPad-series has the best laptop keyboard I’ve ever encountered. The same can be said about their TrackPoint, that’s why I’m so glad the X-series doesn’t have the dreadful TrackPad.

The machine came pre-installed with Microsoft Windows Vista Business. But for some strange mystical reason it suddenly booted Ubuntu Hardy Heron. This just proves how superior these machines are.

However, there are some flaws that needs to be sorted out. Not in the machine itself, but driver related stuff in Linux. Like wireless. My X61 has a Intel 3945 wireless card, and uses the iwl3945 driver (ipw3945 is obsolete). This workes fine at home, but it isn’t able to connect to the wireless AP at my parents. See bug #183619 in Lunchpad.

Also I don’t trust hibernate 100 percent yet. It has failed a few times, which is a few times to much. But I’ll look more into that later. Otherwise most things seems to work straight out of the box.

I’ll write more about this machine as I stumble upon interesting phenomenons.

Update: Hibernate issue has been sorted out.

Problems with Citrix Client on Linux?

Updated October 12th, 2011.

Everytime I install the Linux Citrix Client it seems like I run into problems with SSL-Certificates. The message usually sounds like this:

You have not chosen to trust “Thawte Server CA”, the issuer of the server’s security cerfiticate (SSL error 61).

You might have another company listet as issuer on your server.
Anyway, let’s fix it.

Run the following command as a superuser, also known as root:

cp /usr/share/ca-certificates/mozilla/* /usr/lib/ICAClient/keystore/cacerts/

That’s it!

Updated: The new client, version 12.0, also called Citrix Receiver, is by default installed under /opt/Citrix/ICAClient/. So then the command will be:

sudo /user/share/ca-certificates/mozilla/* /opt/Client/ICAClient/keystore/cacerts/

This assumes that the ICA Client is installed in the default directory. Also you need to have Mozilla Firefox a package called ca-certificates installed since we are using its certificats.

If you have installed the client as a normal user, the keystore will most likely be placed under $HOME/ICAClient/linuxx86/keystore/cacerts/, note that the double x in linuxx86 is not a typo.

Please leave a comment if you found this useful.

Creating a Bootable USB Flash Drive

It’s always handy to have a bootable USB flash drive. Whether you would install a Linux distribution, or just run a memory test. Now days, less and less computers are delivered with floppy drives, and some don’t even have a CD drive. Like the IBM ThinkPad X-series. Of course you could buy an external one, but that’s not the point.

This is meant to help people who already know Linux, so don’t expect a world of information.

1. Prerequisite
You’ll need a USB flash drive and computer running Linux. The machine also needs Grub and support for FAT file system.

2. The Quick and Dirty Guide
First you must find out what block device your drive is identified by. This can be done by using “dmesg” right after you have plugged in the device.

dmesg | tail

Mine came up as sdb, so let’s go ahead and format it using the FAT file system.

mkfs.vfat /dev/sdb1

Then install Grub (the bootloader)

grub-install /dev/sdb

Pay attention to the output. It will tell you how Grub identifies /dev/sdb, we’ll need it later. In my case it’s hd1. If you get an error message about some BIOS stuff. Try this instead.

grub-install --recheck /deb/sdb

Now we can mount it and copy over the necessary files.

mount /dev/sdb1 /media/usb
mkdir -p /media/usb/boot/
cp -r /boot/grub/ /media/usb/boot/

We’re almost there.

grub
grub>root (hd1,0)
grub>setup (hd1)
quit

It’s bootable. Now you can throw in whatever image you please, like memtest86.

cp memtest86+.bin /media/usb/boot/

Memtest can be downloaded from Internet, or if you have Ubuntu it will already be in your /boot catalog. To make a boot menu, edit /media/usb/boot/grub/menu.1st to look like this.

default 0
timeout 10

title Memtest86
root (hd0,0)
kernel /boot/memtest86+.bin

I have also thrown in the Ubuntu network installation files.

cp linux initrd.gz /media/usb/boot

So now my menu looks like this.

default 0
timeout 10
color cyan/blue white/blue

title Memtest86
root (hd0,0)
kernel /boot/memtest86+.bin

title Ubuntu x86 Installation
root (hd0,0)
kernel /boot/linux root=/dev/ram
initrd /boot/initrd.gz

Please leave a comment if you found this useful.

Getting Widescreen Resolution on Ubuntu

This trick applies to laptops with Intel 915 or 945 graphics card.

A few days ago I installed Ubuntu on my work laptop, a Acer TravelMate 4230. The installation was painless, as one would expect with a Linux distribution “for human beings”. However I couldn’t seem to get the native resolution in Xorg (the graphical engine) right, even though the setup found it and stored it in the configuration file.

I ran both hwinfo –monitor and hwinfo –framebuffer. The first gave me 1280 by 800 as native resolution. The latter however, only gave me 4:3 resolutions. To correct this limitation I installed a package called “915resolution”.

apt-get install 915resolution

This package patches the framebuffer, so a reboot is necessary for this to take effect.

Please leave a comment if you found this useful.

Subversion – ‘502 Bad Gateway’ Workaround

Parts of this article has previously been posted in my old blog. It’s being reposted because of its usefulness.

A little over a year ago, I had a problem trying both copying and renaming files in Subversion, giving me the ‘502 Bad Gateway’ message. Trying to Google the problem didn’t help me much, and I don’t think it does to this date either.

The error message was:
svn: Commit failed (details follow):
svn: COPY of testfile.py: 502 Bad Gateway (https://hostname)

My solution to the problem was adding the following lines into my vhost-file, between the <VirtualHost *:443> and the closing </VirtualHost>. (I’ve placed them near the top.)

SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA;+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key

You must of course change the SSLCertificateFile and SSLCertificateKeyFile variables to reflect your own setup. You must also restart Apache.

I can’t guarantee that this workaround actually will work. But I’ve had good experience with it in two cases. In both cases I’ve run Subversion through Apache 2 web server, using the mod_dav_svn module, on a Linux platform. Also, since I have more than one domain name, the web server was set up with virtual hosts, ssl, proxy and rewrite modules.

According to my original post about this problem, I wrote the following:
I stole this solution from Karl Trygve Kalleberg, who fixed it once, and then later forgot how.
Which, if my mind serves me correct, means that I found it when looking through his old configuration files.