Installing OpenSolaris on my laptop

My private laptop came delivered with Windows (of course), but I wanted a UNIX/Linux like OS as well. Running a lot of computers with Linux (Ubuntu, CentOS, Slackware, Debian and others) I decided I wanted something else. I came up with the idea that it should be Solaris, to experiment with the fantastic ZFS. But the real Sun Solaris lacks support for my laptop, so I thought I could run OpenSolaris, which has better hardware support. [Read More]
Old 

sed breaks links

When using the stream editor (sed) with the -i option, it does break links. Like this: ~$ mkdir test ~$ cd test ~/test$ echo Hello > f1 ~/test$ ln -s f1 f2 ~/test$ ls -l total 4 -rw-r--r-- 1 tonk tonk 6 May 4 09:28 f1 lrwxrwxrwx 1 tonk tonk 2 May 4 09:28 f2 -> f1 ~/test$ sed -i.bck 's/Hello/Bello/' f2 ~/test$ ls -l total 8 -rw-r--r-- 1 tonk tonk 6 May 4 09:28 f1 -rw-r--r-- 1 tonk tonk 6 May 4 09:29 f2 lrwxrwxrwx 1 tonk tonk 2 May 4 09:28 f2. [Read More]
Old 

That bloody Shift-Backspace

On my laptop I’m running Ubuntu Linux 8.04 with XFCE 4.6 and it works great. But (Isn’t there always a ‘but’?) every once in a while I killed my Xsession with some type of key combination. The standard combination for this is Ctrl-Alt-Backspace so I switched that off in the file /etc/X11/xorg.conf'. I added the ServerFlags` section, like this. Section "ServerFlags" Option "DontZap" "on" EndSection After restarting I tried the dreadful Ctrl-Alt-Backspace and I thought that ‘Bob’s your uncle’. [Read More]
Old 

Hilbert's paradox of the Grand Hotel

Last week I saw a documentary about the German mathematician David Hilbert. This very interesting documentary had some nice mathematical problems that seem impossible to solve, but when thought through there always was a little loophole.

A very nice one is The paradox of the Grand Hotel

If you are a bit into maths, this really is stuff to read.

The prove of The Last Theorem of Fermat is my next goal… :-)

Old 

Patches for IceWM online

I’ve been using IceWM on and off for many years now. And because we used it in our UNIX/Linux education environment I did create some patches for IceWM. Some of these patches are now part of the mainstream version and (of course) some are not. My patch files can be found here. These patches are mostly focused on window management such as (This list is not complete): + win\_allowRestore + win\_allowMove + win\_allowSize + win\_allowMaximize + win\_allowMinimize + win\_allowHide + win\_allowRollup + win\_allowRaise + win\_allowLower + win\_allowLayer + win\_allowMoveto and some are focused on system control (reboot and family) [Read More]
Old 

Editing files and posting to git

A couple of days ago I posted that I was converting to git. Well, that was not the completely truth. I already had switched to git. But what I didn’t like was the fact that git doesn’t support keyword-expansion and therefore there’s no way of knowing what version of the file you are editing. I do like this in CVS and SVN, so I implemented it in a script called vigit. [Read More]
Old 

Version control with git

Some time ago I decided it was time to change from subversion to git for my version control system. The advantages where obvious. git is distributed and so I can code on my laptop without being connected to my home server. When I do get home I just sync the repositories and everything’s OK. But, how to do this. I took the easy road and created an user on my home server and made sure I could login with SSH key authentication. [Read More]
Old 

MySQL Backup

When using a MySQL database, it’s often very useful to create backups of the databases. This can be done with the MySQL dump command, but this does not allow for separate week, month and year backups. On the web I found the tool automysqlbackup and that did almost what I wanted. I changed it a lot and my version can be found here or here.

Old 

HP/UX LVM migration

For a customer of us we needed to migrate the complete SAN data on HP/UX 11.x machines to a new SAN. This can be done by creating a complete backup, connecting the new SAN and doing a complete restore. Not only does this take a lot of time, it also means a lot of down time. And, as you can guess, this was not an option. Well, we had to think of something else. [Read More]
Old 

The Header Script

In my daily working routine I do create a lot of shell scripts, LaTeX source and whatever. I always try to keep things simple and consistent. This not always being easy, so I wrote a Perl program that generates a standard template for a lot of standard code. This could be e.g. Bash shell, Perl, RPM spec file, LaTeX source, C source, etc. The only thing this program needs is Perl and a file in your home directory called . [Read More]
Old 

How I broke the triple-e and repaired it

Last weekend I decided it was time again to completely update my eeePC. So I ran the command tantrum everybody knows: apt-get update apt-get upgrade and that gave me 287 new and updated packages. After that I needed to reboot because I got a lot of new stuff. Well, there the trouble began. No X, no network, no mouse, no USB etc. It was in a terrible state. Digging around and repairing the odd stuff, I got X running, but still no mouse and no network. [Read More]
Old 

MDNS name resolving problem

Within a mixed Linux and Microsoft Windows network I ran into the following problem: A host with the hostname linux1.firm.local could be pinged and found with nslookup and dig, but it was impossible to start a ssh session. The result kept being: Unknown host. Playing Cherlock Holmes revealed that this had to do with Avahi and mdns, so with the .local part of the hostname. In my /etc/nsswitch.conf the hosts: line read: (Using Ubuntu 8. [Read More]
Old 

Portforwarding without IPtables

Live’s good and the problem is simple. Having a Linux server at home with two virtual machines running within VMware server, I would like to have a tunnel to the host OS and forward ports for smtp, imap, rdp and maybe some others. I thought this could simply be solved with IPtables, but that turned out to be a big pain in the *ss. It didn’t work as I wanted, I locked myself out several times and still it didn’t do exactly as I wanted. [Read More]
Old 

Seek in the Kornshell

Searching for shell builtins to speedup Nanoblogger, we stumbled across a very charming and nice way to implement a tail function in the Kornshell. This works in KSH93 and newer. The new redirection operators, <# and ># are used to seek. For example, <# (( EOF-36 )) will seek to 36 bytes before the end-of-file. You can apply this along with any redirection so that cat < file <# (( 80 )) will cat the file starting from offset 80. [Read More]
Old