This is a category view. Only posts in category Linux are shown. Remove the filter to view posts in all categories.
Tuesday, March 10, 2009 ★ 02:06 ★ Category Linux ★ Permanent url
Colour is highly overrated, so let’s get rid of that new-fashioned nonsense and return to the good old days of greyscale computer screens!
It’s really easy: in your xorg.conf, add DefaultDepth 8 to the Screen section, and within that section, add Visual "StaticGray" to SubSection "Display".
Now, after restarting X, you will not be distracted by colours anymore: everything will be neatly desaturated.
Tuesday, May 6, 2008 ★ 16:26 ★ Categories Gnome, Linux ★ Permanent url
The public library of Amsterdam, i.e. the Openbare Bibliotheek Amsterdam (Wikipedia entry, check out the pictures!) not only offers a enormous amount of books, cd’s and several reading and conference rooms inside their great building, but also offers free access to their wireless network, so that you can access the internet.
Before I start, a few words to help people find this blog post using Dutch query terms: Dit artikel beschrijft hoe ik onder Linux het draadloos internet in de Openbare Bibliotheek Amsterdam aan de praat heb gekregen. Het draadloze netwerk werkt goed, maar alleen als je weet hoe je het moet instellen!
First, you need to register an account. Instructions can be found at various places in the building, and you should activate it by showing your ID at the reception desk near the entrance.
Then you need to configure your computer. However, only instructions to set up the wlan in Windows and Mac operating systems. Linux users like me are left in the dark.
Important note: This section is written for Network Manager 0.6.x. See below if you are using 0.7.x.
It took me quite some time to get it to work, mostly because none of the Network Manager configuration options worked for me. That is, none of the options provided in the popup window that asks for connection authentication tokens and the security setting (WEP, WPA, and so on). I’m using version 0.6.6, by the way. The trick is that you need to use the connect to other wireless network option instead of just picking the right network from the menu:

Network Manager menu. Choose the highlighted option, not the OBA Hotspot Service item.
The next step is to configure the network settings. Choose WPA Enterprise, fill in the network name, specify PEAP and Dynamic WEP, and fill in your username and password. The screenshot below shows the result:

Network settings for the OBA network
Hit the connect button and a connection will be made. That’s it: happy surfing! The internet connection is quite fast and pretty much unrestricted, e.g. you can use SSH without trouble, for instance. This is definitely not always the case, e.g. you can’t in the Public Library of Den Haag (The Hague).
For Network Manager 0.7.x you can mostly follow the instructions for Network Manager 0.6. However, you should make sure that you set the PEAP version to 0 (1 does not work), and that you specify MSCHAPv2 for inner authentication.
(Thanks to Ed for sending me this updated information.)
For completeness, here’s an alternative, manual way (hacky and ugly) if you don’t (want to) use Network Manager. You may stop reading here if you’re using Network Manager (I heartily recommend it). Beware, the next few paragraphs require you to know how to work with a shell and how to edit system configuration files properly! Only proceed if you know what you’re doing!
You will have to edit the /etc/wpa_supplicant/wpa_supplicant.conf configuration file manually (create it if it’s not there already) to be able to connect to the OBA Hotspot Service wireless network. The relevant snippets you need can be downloaded here: wpa-supplicant-oba-amsterdam.conf.sample. Make sure you fill in your username and password!
Now that you have the configuration file in place, it’s time to connect. I’m using a simple shell script (a really ugly hack) to get it to work on my machine. You might need to change the wireless interface name (it’s eth1 for me) and perhaps the option passed to the -D parameter to match your wireless card. Here is the shell script (not specific for the Amsterdam library, I use it at the university as well): wireless-network.
You will be asked for your user password. This is the password for your local machine, not the one for your wifi account! Run the script as root if you don’t use sudo). Some debug spew should appear and your internet access should work. Hit Ctrl-C to disconnect.
Of course Debian-based systems can skip all these shell script tricks (you still need the settings in /etc/wpa_supplicant/wpa_supplicant.conf as described before). The Debian way is to create a stanza in /etc/network/interfaces instead like this:
iface oba inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Now you can use e.g. sudo ifup wlan0=oba (replace wlan0 with the name of your wireless card).
Tuesday, November 6, 2007 ★ 11:07 ★ Category Linux ★ Permanent url
Recently I’ve bought a Samsung ML-2010 printer. I had some issues getting it going, so here’s my account of how I got it to work.
The Samsung ML-2010 is a relatively cheap and simple monochrome USB laser printer, and is known to work perfectly under Linux according to the OpenPrinting database entry on the Samsung ML-2010. The driver is available from the splix package. On my Debian box it was as simple as:
apt-get install splix
Okay, so good for the drivers. Adding the printer using gnome-cups-manager worked like a charm as well.
I tried printing a test page. Nothing happened. I tried again. Now, the printer started printing. But what came out was certainly not a test page but this cryptic message:
INTERNAL ERROR - FALSE POSITION : 0x11 (17) SYSTEM : h6fwsim_mono/xl_tbl LINE : 396 VERSION : SPL 5.05 01-04-2006
Some googling led me to Ubuntu bug 133376, RedHat bug 243038 and Ubuntu bug 85488, all related to my problem in a way. Looking through dmesg output, it indeed seemed that my printer was repeatedly causing USB disconnects and connects. So I installed sysfsutils:
apt-get install sysfsutils
...and added the following line to /etc/sysfs.conf:
module/usbcore/parameters/autosuspend = -1
After a reboot (actually, I ran /etc/init.d/sysfsutils manually) the continuous disconnecting was indeed no longer a problem. However, still no real output, only the internal error page mentioned before. I investigated things a bit more deeply (increasing Cups verbosity levels and such), but to no avail. I realised it looked like my machine was somehow sending illegal instructions when sending commands to the printer using the page description language used (SPL).
I was completely lost and decided to compile the Cups and Splix stack from scratch in order to (hopefully) get some more useful debugging stuff. So, while browsing the web for tarballs to build, I found out there had recently (20071019) been a new Splix release, version 1.0.2. My system was still using 1.0.1, so I gave it a try before building Cups itself:
tar xjvf splix-1.0.2.tar.bz2 cd splix-1.0.2/ ./configure
Yuck, Cups development headers missing:
apt-get install libcupsys2-dev libcupsimage2-dev ./configure make
Urgh. Build failed with a make: ppdpo: Command not found message. Hmmm. Translated PPD files. Not that crucial for me, so not worth investigating:
make -k # ignore errors and keep going as much as possible
Then I copied the resulting rastertospl2 to my system-wide Cups filters directory and restarted the Cups daemon:
sudo cp src/rastertospl2 /usr/lib/cups/filter/rastertospl2 sudo /etc/init.d/cups restart
Tried printing a test page again. WOW! It worked like a charm. Problem solved. Hopefully distributions start picking up Splix 1.0.2 soonish so that this printing problem no longer occurs.
Update: Hopefully Debian bug 439817 will be resolved soon…
Monday, September 10, 2007 ★ 23:26 ★ Category Linux ★ Permanent url
Your script to edit a temporarily decrypted file, which is automatically encrypted after you’re done editing uses a primitive method to remove the temporary decrypted data. Using vi’s no-backup mode is a smart thing to do (it disables all backup files and undo caches), but the file itself is just overwritten once. Try shred instead: shred -u tmpfile.txt. Note that this is not 100% safe either: your filesystem might keep the unencrypted data somewhere, e.g. in the journal, on a network disk, or in a filesystem snapshot.
My personal opinion is that shred is good enough for me on (local) disks. See for yourself.
Update: If you want some (or all) of your applications to securely remove files, you might want to try libsd instead. This shared library goes into your LD_PRELOAD path and replaces some of the standard C functions like open() and truncate() with overwrite-with-random-data equivalents. Note that this severely reduces system performance. Thanks to Folkert van Heusden for the pointer.
Thursday, October 12, 2006 ★ 20:35 ★ Categories Gnome, Linux ★ Permanent url
Today, I visited the LinuxWorld Expo in Utrecht.

Poor Tux
As you can see, it was real hardcore. Several demo setups showcasing Gnome at the Novell and RedHat stands. They didn’t show a Dutch desktop, though…
Tuesday, August 22, 2006 ★ 13:06 ★ Categories Gnome, Linux ★ Permanent url
It works: single sign-on in GDM with both ssh keys and Gnome keyring! See below for more information.
This is an update on my previous article about the password hell.
Several people have pointed me at pam-keyring. I’ve built and installed this package and included the necessary lines in /etc/pam.d/gdm, but it doesn’t seem to do anything on login (no keyring environment variables are set, no output in log files). On logout, these lines are logged to /var/log/auth.log:
pam_keyring: received order to close session pam_keyring: could not retrieve gnome-keyring-deamon PID
I’ve done an initial Debian package of pam-keyring. I’m not familiar with Debian packaging (I’m just a happy user) so I’m not planning to maintain or support it. Please contact me if you want my debian/ directory which builds and installs the package correctly.
If anyone can be of some help, that would be greatly appreciated.
Btw, it seems the NetworkManager guys are also aware of the problem. They seem to take a different approach, though (system-wide configuration): Bug 331529 has more information.
Update: If I change an if statement in the code to if(1) it seems to work, but only when using “su – uws” (this uses /etc/pam.d/su). GDM and ssh logins (/etc/pam.d/gdm or /etc/pam.d/ssh, respectively) still don’t work…
Update 2: I’ve fiddled somewhat with my pam files and now it works (after a GDM restart). I’ve put the pam-gnome-keyring inclusions in the pam files before the pam-ssh inclusions and I tried some other stuff as well (such as rm -rf /tmp/keyring*), but I don’t remember exactly what I did…
Update 3: One of the Debian NetworkManager maintainers asked for the debian/ directory of my initial package. I hope apt-get install libpam-gnome-keyring will be working soon…
Tuesday, August 22, 2006 ★ 09:44 ★ Categories Gnome, Linux ★ Permanent url
When I log into my laptop machine by entering my username and password into GDM, After logging in, I often find myself opening two of my SSH keys:
However, this causes me to enter my password at least three times! When I’m at home and my laptop tries to connect to my access point (long live network-manager) I also need to unlock my Gnome keyring, so that the total amount of passwords needed to get my machine running is four.
Luckily, there’s a solution for the ssh keys: libpam-ssh (simply apt-get install libpam-ssh on a Debian box). You need to add two lines (the ones containing pam-ssh) to /etc/pam.d/gdm, one after common-auth and one after common-session. First one:
@include common-auth @include pam-ssh-auth
Second:
@include common-session @include pam-ssh-session
Make sure you use the same password to unlock your ssh keys as you use to login to your machine. By default, ~/.ssh/id_dsa, ~/.ssh/id_rsa, and some other files are used. I simply symlinked my ~/.ssh/id-rsa-gnome file to ~/.ssh/id_dsa to load both keys, without fiddling with system-wide configuration files.
Now I only have to enter two passwords on login. Victory! Well, almost… does anyone have a solution for gnome-keyring (except for password-less keyrings, which are not option for laptops)?
Update: I’ve posted an update on this article.
Tuesday, July 11, 2006 ★ 11:58 ★ Categories Misc, Linux ★ Permanent url
Some of my digital music is in the lossless Flac format, which is way too large to carry around on my laptop. I use the following GStreamer magic to convert the Flac files (other types work too with this pipeline) to high quality Ogg Vorbis files:
for file in *.flac; do gst-launch-0.10 filesrc location="$file" ! decodebin ! audioconvert ! vorbisenc quality=0.8 ! oggmux ! filesink location="$file.ogg"; done; rename 's/.flac.ogg/.ogg/' *.flac.ogg
I’m just blogging this because otherwise I’ll forget how to do this when I need it again…
Update: Yes, I know that oggenc -q8 *.ogg does basically the same, but oggenc won’t preserve ID3v2 tags on Flac files (people do this, don’t ask me why), while the GStreamer pipeline seems to preserve the metadata just fine.
Thursday, June 15, 2006 ★ 14:29 ★ Category Linux ★ Permanent url
If you use Mutt to access an IMAP server that runs on the same host, there’s no need to provide a password to login to your IMAP server. Put the following in your ~/.mutt/muttrc (adapt it to your own setup):
set spoolfile = imap://buttercup.townsville/INBOX.inbox set folder = imap://buttercup.townsville/INBOX. set tunnel="imapd 2>/dev/null"
The trick is the tunnel setting. Put ssh -q hostname in front of it if you use ssh keys without a password and want to log into a remote IMAP host. Example:
set tunnel="ssh -q buttercup.townsville imapd 2>/dev/null"
Oh, and my hostnames come from the Powerpuff Girls show.
Tuesday, June 6, 2006 ★ 06:06 ★ Category Linux ★ Permanent url
Today, Ubuntu released version 6.66 of their popular Linux distribution for superhuman beings, codenamed “Brutal Beast”.

Ubuntu 6.66 is the first version that will have long time support: updates will be available for 6 years, 6 months and 6 days.
Random photo from Ireland (February, 2006)
Wouter Bolsterlee, also known as uws, a postmodern geek living in the Netherlands. Read more about me…
Unless stated otherwise, all material on this site is available under a Creative Commons Share-Alike license.