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.

Wednesday, March 21. 2012

When upgrading to FreeBSD 8.2, I found that my host would no longer get an IP address via DHCP. It appears that the startup sequence has changed, and that the system no longer waits to get an IP address while booting.

Friday, February 24. 2012

If you're writing Android network code and need test it with the Android emulator, you'll quickly run a problem: the emulator doesn't have a 'real' network interface, and cannot be reached from the outside world. Fortunately, there's a way to resolve this.

To forward a tcp port to the emulator, use:

adb forward tcp:sourceport tcp:destport

For example, to forward port 8000 on the host to port 8500 on the emulator, use:

adb forward tcp:8000 tcp:8500

To redirect a UDP port, telnet to the emulator's port (usually 5554) and then use redir:

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.