Linoleum

Wednesday, April 11. 2012

Attempting to use the NX remote desktop client to log onto a Linux Mint server results in the error 'Failed to load session "ubuntu"'. This can be fixed by editing the /usr/NX/etc/node.cfg file, and changing the CommandStartGnome to the following:

CommandStartGnome = "/usr/bin/gnome-session --session=gnome-fallback"

After this, run:

/usr/NX/bin/nxserver --restart

Logging in using NX will now give you the Linux Mint Gnome Classic desktop.

Sunday, September 18. 2011

I've recently been asked to build a redundant mailstore, using two server-class machines that are running Ubuntu. The caveat, however, is that no additional hardware will be purchased, so this rules out using any external filestorage, such as a SAN. I've been investigating the use of DRBD in a primary/primary configuration, to mirror a block device between the two servers, and then put GFS2 over the top of it, so that the filesystem can be mounted on both servers at once.

While a set-up like this is more complex and fragile than using ext4 and DRBD in primary/secondary mode and clustering scripts to ensure that the filesystem is only ever mounted on one server at a time, it's likely that there will be a requirement for GFS on the same two servers for another purpose, in the near future, so it makes sense to use the same method of clustering for both.

The following guide details how to get this going on Ubuntu 10.04 LTS (lucid). It won't work on any version older than this - the servers that this is destined for were originally running 9.04 (Jaunty), however, I've tested DRBD+GFS on that release, and there's a problem that prevents it from working. As far as I'm concerned, production servers should not be run on non-LTS Ubuntu releases, anyway, because the support lifecycle is far too short. This guide should also work fine for Debian 6.0 (squeeze), although I haven't tested it, yet.

Monday, August 29. 2011

OpenWRT is a fantastic open source distribution for embedded devices, such as the Linksys WRT-54G series of wireless routers. One of its many features is the use of dnsmasq, a combined DNS and DHCP server, useful on small networks that are sitting behind a NAT connection.

The downside of dnsmasq on OpenWRT, however, is that the default configuration uses your ISP's DNS servers, which can be problematic, if your ISP, like many others, is adopting bad habits of redirecting non-existent domains to their servers, or is blacklisting / censoring websites without asking you.

For this, and for so many other reasons, it's a much better idea to run your own local DNS resolver. Unfortunately, dnsmasq isn't cable of doing this, so it's necessary to install a DNS server that can do this on its own. In this article, I describe how to do this.

Wednesday, July 27. 2011

Ever had a situation where you need to rebuild a Debian or Ubuntu package on a regular basis, but it takes an incredibly long time because it's running automatic tests - tests that you don't need until your final build?

For many of these packages, there's a simple way to disable the tests, by setting the DEB_BUILD_OPTIONS to "nocheck", before you build the package: