Tag Archives: GNU/Linux

Fenestration

I’ve spent quite a lot of time over the last year trying to find the perfect window manager, without success.

I had been using WindowMaker for a long time. WindowMaker is great, and I highly recommend it, but I wanted to see if there was another window manager that would suit me better: I’m not a typical user. I hate WIMP systems, but I use them because I like crisp Unicode fonts on my tty and browser, and I occasionally need to use some WIMPy applications.

I switched to ratpoison as it was designed for people who share my WIMP hatred; ion is similar. I would really like to use one of these two, but those occasional WIMPy applications really get confused.

I used Oroborus for many months after that. It isn’t the greatest WM, but it is one of the least annoying, and it allows me to center new windows.

During the next phase of my search I discovered a few interesting window managers that I will keep my eye on: cwwm is small and simple, but has most of the features I want; golem has a set of plugins that can be mixed to get the features I want and ignore the ones I don’t; waimea lets me configure behaviour for certain X events to make it do what I want. Unfortunately, none of these three are ready for me to use in anger.

I’m currently using pwm, believed to be the first window manager to use tabbed windows. In addition it has good keyboard control and multiple desktops, my top 2 requirements.

There are man more window managers out there. I have only tried the ones that have official Debian packages, but I will probably try some others in the future.

Continue reading

ThinkPad T23 BIOS upgrade

I upgraded my laptop’s BIOS today. I wish I hadn’t. After the upgrade the bootloader believed that there wasn’t enough memory to load any operating system. I tried other bootloaders, and they all thought the same.

The IBM telephone support guy was helpful and clueful, which is unusual for someone in his type of job. Maybe IBM have a policy to not employ grumpy idiots. It would be good if some other IT companies would copy that idea.

I reinstalled the old bootloader.

Selective recursive file copy

Tony suggested I post useful tips to my blog. He persuaded me to start the Vim category, and now suggested I post this too.

There are lots of little things I do that I don’t think are interesting or useful, but Tony thinks they are when he sees them. I suppose this could be a case of familiarity breeds contempt; I don’t recognise how useful something could be because I use it all the time.

Anyway, today Tony wanted to recursivly copy all the regular files from his current directory to another one; he didn’t want to copy symlinks or anything else. As usual, he wanted a one-liner. So, I did this:

tar cf - `find . -type f -print` | tar xCf /home/tony/otherdir -

Debian install from PXE

Our new server has PXE support to boot from scratch from the network, so I decided to try to install Debian with it. I didn’t just do this for fun (it wasn’t much fun): the new server had a gigabit ethernet card that wasn’t supported by my usual Debian network boot CD.

I started with syslinux, as it includes pxelinux and lots of helpful documentation. I choose atftpd for my TFTP server since its author (Jean-Pierre Lefebvre) wrote it to use with pxelinux.

I wanted to use udhcpd as the DHCP server because I liked udhcpc, but the client machine didn’t seem to like it: it seems that PXE might use some non-standard DHCP features. So, I used ISC dhcpd3, and it worked. But that was another surprise: it worked even though the DHCP port was being filtered by the local firewall! I assume this is becuase dhcpd3 uses the packet protocol to bypass the normal protocol stack. That’s also why it requires packet socket and socket filtering to be compiled into the kernel. I don’t like it, but it works.

DHCP

Now that I have a DNS server that can be easily redirected, I needed a DHCP client that could easily redirect it. I had been using pump, but there didn’t seem to be an easy way to make it write the resolver data to somewhere other than /etc/resolv.conf. I knew that dhcpcd would be able to do it, but it always seemed to be over-complex, and I think it relies on netlink devices.

I tried udhcpc and I was pleased. It has a clear division between DHCPing and configuring the network: it will DHCP then simple sends all the information it received to a seperate configuration script. I can replace this script with anything I want, so I can do all my strange configuration. I liked this so much that I have decided to move all my non-DHCP configuration to a compatible format.

Caching DNS

I move my GNU/Linux laptop bewteen different networks quite regularly, and I’ve never been totally happy with its configuration. Many other people do the same thing, and they have a few different methods for auto-configuring networking. But none of them seem perfect for me.

I used to use pdnsd, and it worked well when I knew the nameservers for each network I connected to. The pdnsd.conf contains a list of nameserver details, and allows you to configure tests to check if those servers are available. When I move between networks I could also use pdnsd-ctl to explicitly enable an appropriate set of nameservers. But this isn’t very useful when I connect to a new DHCP network where I don’t have the details of the nameservers until I connect. I could write a script to dynamically rewrite the pdnsd.conf, but this seems a bit messy.

After some research (in the Debian package list) I choose dnsmasq. It doesn’t have a persistant cache like pdnsd, and it won’t let me configure a whole set of nameservers like pdnsd, but it does allow me to easily change the default nameservers to use for forwarded queries.

By default, dnsmasq uses /etc/resolv.conf (like everything else) to get the addresses of nameservers to contact, so when dnsmasq is running on a firewall, the internal machines can use the firewall machine as nameserver. But I don’t want that. I want my resolv.conf to have the loopback address as the nameserver, and I want dnsmasq to read from another file. This is trivial to setup, and that is why I’m now using dnsmasq.