# apt-get install hello
# hello
Hello, world!
# hello --help
Usage: hello [OPTION]...
Print a friendly, customisable greeting.
-h, --help display this help and exit
-v, --version display version information and exit
-t, --traditional use traditional greeting format
-n, --next-generation use next-generation greeting format
-g, --greeting=TEXT use TEXT as the greeting message
-
Hello world, Debian style
July 14th, 2008Tags: Debian, hello world, Ubuntu -
Reliable rake task execution
December 3rd, 2007Tags: cron, crontab, Debian, rails, rake, ruby, tasks, UbuntuMy News Sniffer project needs to regularly do some back-end stuff like checking a bunch of rss feeds and downloading web pages. I do this with some rake tasks, which I call using the cron daemon. Recently I’ve been having problems where some tasks take a bit longer than usual to complete and end up running in parallel. This slows things down, which means more tasks end up running in parallel and then my little virtual machine eventually falls on it’s face under memory pressure.
I could implement some locking in my application, but it’s always good to avoid as much new code as possible so, in the good old *NIX fashion, I cobbled together a short bash script taking advantage of existing tools. What this does is executes the given rake task in the given rails root using the Debian/Ubuntu tool
start-stop-daemon(provided by thedpkgpackage, which is therefore always installed).start-stop-daemonuses a pid file to keep track of the rake program for the given task, so it will never run a second concurrent instance of rake for this task. Cron just keeps trying to run it every 5 minutes or whatever, but it only runs once concurrently.
Read the rest of this entry » -
Xen on Ubuntu Edgy broken – Debian to the rescue
January 7th, 2007Tags: Debian, Ubuntu, virtual machines, xen
I found a great HOWTO on getting a Xen virtual machine up and running on Ubuntu Edgy. Unfortunately, Xen is pretty broken on Edgy. I managed to get one virtual machine running easily but on starting a second one, Dom0 panics and the whole box freezes. It’s been reported on launchpad but as it’s in universe I guess it’s just not a priority.As a workaround, I installed the Xen kernels from Debian testing (Etch). These pulled in the Debian Xen userspace packages too, but they didn’t clobber anything. So now I have a couple of mostly Edgy virtual machines which I plan to use as a little test lab.
Whilst troubleshooting, I also found another good Debian specific Xen HOWTO with lots of good general advice too.
Etch is looking good. I work with Sarge a lot on servers and firewalls but I’ve not played with Etch much. I think I’ll get it installed in a Xen machine and have a play. I feel bad for not helping with its testing though.
-
Encrypted partitions with Ubuntu/Debian
December 6th, 2006Tags: Debian, encryption, filesystem, privacy, Security, UbuntuI figured out how to set up an encrypted partition on Ubuntu the other day. There are a bunch of ways of doing it but I found this to be the simplest. It should work on Debian too, since all the relevant packages are Debian ones anyway. In my example I’m encrypting an LVM partition (logical volume), but it should work with any device, including removable USB keys (see end notes). UPDATE: This is broken in Edgy but I figured out a simple fix, see below.
-
IPSEC VPN problems upgrading to Ubuntu Edgy
November 2nd, 2006Tags: dapper, edgy, icmp, ipsec, iptables, kernel, linux, NAT, netfilter, openswan, pmtu, UbuntuI upgraded my home gateway firewall to Edgy today in the hope of fixing some SATA problems I’ve been experiencing. The new Edgy kernel might help – we’ll see.
Anyway, it went pretty well. Two runs (?) of
apt-get dist-upgrade -u, a reboot and there I was.Unfortunately I had two problems with my Openswan IPSEC VPNs. I’m not so sure if these count as bugs. I’ll be investigating further and reporting if so. Anyway, techie details follow…
Read the rest of this entry » -
Epiphany and Firefox Dapper packages for Breezy
December 13th, 2005Tags: breezy, dapper, deb, Debian, epiphany, firefox, packages, UbuntuI’ve built Ubuntu Dapper Epiphany 1.9 and Firefox 1.4.99 packages for Ubuntu Breezy. I’ve also enabled the Epiphany Adblock extension which seems to work fine. You can’t specify your own advert signatures with a GUI yet (afaikt) but the built-in database seems to cover most bases.
I’ve only built for i386 as that’s all I need it for right now. Tbh, it’s really not that difficult to build you own, but here they are anyway:
UPDATE: I’ve setup an apt repository for all this nonsense.deb http://johnleach.co.uk/downloads/ubuntu breezy backports
I don’t really have plans to keep this up to date, but I might expand it to a few other packages I want to play with, so feel free to use.
-
Xorg xserver $HOME/xorg.conf
September 16th, 2005Tags: fonts, gdm, kernel, linux, Ubuntu, udev, xorg, xserverIt turns out that xorg will use $HOME/xorg.conf if it finds it, rather than the default in /etc/X11/xorg.conf.
I didn’t know this, and didn’t notice that it was telling me this in the logs. I’ve now wasted a bunch of time troubleshooting a font problem on Ubuntu where xorg couldn’t find my fonts and I was working from the WRONG CONFIG FILE. AGH!
Anyway, in other Ubuntu xorg related news, something changed in the latest Breezy upgrades that causes /dev/input/mice not to be created. Xorg then bombs on boot as that’s my core pointer. If you restart udev the device nodes get created fine. Not sure what this is yet.
John Leach is a human being living in Leeds, UK.