Archive for December, 2005

New Scientist Has Launched a Podcast Service

Monday, December 12th, 2005

OK, so I’m about a month late on this but I’ve been too busy with my studies to keep abreast of news and my toread pile is overflowing.

New Scientist are running a nine-week pilot of podcasts: details here. I’m downloading the last six weeks of shows as I post but I’m sure I won’t be disappointed. Another otherwise wasted 15-mins a week is now filled. Funny how much less stressful having to queue is when you’ve got something intelligent to listen to on your mp3 player.

Enabling Bootlogd on Debian 3.1

Sunday, December 11th, 2005

Bootlogd does not work out of the box on Debian 3.1 with a 2.6.8 kernel. If you enable it by setting the option to yes in /etc/default/bootlogd you’ll see the error message bootlogd: ioctl (/dev/ttyzf, TIOCCONS): Bad file descriptor scroll by on boot and the log is not created.

The problem lies with the version of udev used in Debian stable.

One solution is to upgrade the udev package to one from testing or unstable but that is not acceptable to someone who wants a pure system.

The alternative is to move the order the scripts are executed in /etc/rcS.d/. Remember, execution order is determined by the number in the filename so by renaming the bootlogd launching script you can get it to run before the udev script S04udev

mv /etc/rcS.d/S05bootlogd /etc/rcS.d/S03bootlogd-was-S05

The next time you boot, the log will be enabled for reading in /var/log/boot.

(Solution by Frans Pop on the debian-laptop mailing list)

Making a Linux Box into a CUPS Print Server for OS X

Thursday, December 8th, 2005

I don’t really know my way around OS X but I know enough to get frustrated at how unnecessarily difficult it is to set up access to a shared printer on a CUPS server from an iBook.

John Fry’s advice to set up your CUPS server (in my case my Debian box) to broadcast services on the local subnet is a lifesaver.

Forget about printer setup on the Mac, and just let your print server broadcast its services on the local subnet (or to specific IP addresses). Your /etc/cups/cupsd.conf file should look something like this:

ServerName foo.bar.org
MaxLogSize 0
MaxJobs 10
Browsing On
BrowseProtocols cups
BrowseAddress @LOCAL
BrowseAllow from All
Listen 631
<location />
Allow from All
AuthType None
<location /admin>
AuthType Basic
AuthClass System
</location>

Remember to restart CUPS with /etc/init.d/cupsys restart after changing the cupsd.conf file and you should have no more trouble.

Long Before Hackers, Hacks

Wednesday, December 7th, 2005

At a demented research institute named for William Morris, eager eyes gaze at a computer that can handle UHL, or “Unit Headline Language”. A survey is conducted, in which people are shown the random headlines:
ROW HOPE MOVE FLOP
LEAK DASH SHOCK
HATE BAN BID PROBE
A total of 86.4 % of those responding say that they understand the headlines, though of this total a depressing number cannot quite say why.

(Michael Frayn, The Tin Men.)

Christopher Hitchens’s : Fleet Street’s finest is a hilarious round-up of the portrayals of journalists by novelists.

The above extract reminds me of the newspaper headlines and advertising catchlines in Russell Hoban’s Kleinzeit, a great comic novel that deserves to be better known.

Stack-Based Arithmetic on Linux

Saturday, December 3rd, 2005

I’ve just discovered that you can run ghostscript in a no display mode from the console and use the interpreter as an environment to perform stack-based arithmetic.

tim@withnail:~$ gsnd
GPL Ghostscript 8.01 (2004-01-30)
Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>2
GS<1>3
GS<2>stack
3
2
GS<2>add
GS<1>stack
5
GS<1>10
GS<2>mul
GS<1>stack
50
GS<1>quit

stack displays the stack, entering a number pushes it onto the stack, pop removes the top item, add / div / mul / sub remove the top two operands, and add them / divide them / multiply them / subtract second from first then return the result to the stack.

More info here.

One for computer science geeks only.