Two bad marketing words joined in awful disharmony

Textsurfer ClassicStaedtler have been making excellent highlighters for years. There have been various incarnations, but the basic chunky model is the one that most people think of when the word is mentioned. So what possessed them to give this wonderful tool the godawful name of Textsurfer Classic?

March 12, 2010   Posted in: Marketing  No Comments

A wireless, headless Linux box

If you’re using wireless networking in Ubuntu (or, presumably, most flavours of Linux), you may have noticed that your network doesn’t connect until you’ve logged in and the NetworkManager’s applet has done its thing. This doesn’t happen for wired networks, where you get a connection as soon as the machine has booted. This is all to do with the extra security requirements of wireless networks, where the user has to select which of the visible networks to connect to, and enter any required passwords. Obviously this can’t be done before the user has logged in to enter these details.

For the most part this isn’t a problem, apart from an occasionally annoying delay while the networking is sorted out before you can get down to some serious work avoidance on the Internet. However, if you want to have a headless computer on your wireless network, for use as a server, MythTV box, or a grunt for distributed rendering, you don’t want to be logging into this machine to get the network going whenever you switch it on. Fortunately, it is possible to get your machine to connect to a wireless network on boot without having to log in. Note that you’ll have to hard-code which wireless network you’re connecting to, but since this is a headless server and presumably somewhere in a dusty corner, that shouldn’t be a problem. So how’s it done? Well, here goes…

Before we start, I’ve made a number of assumptions on your setup, so if your system isn’t covered here, you may need to do a little more research elsewhere. Sorry, about that, but I can only advise on what I’ve done with my system.

  • You’ve already got a working wireless network card in your machine. If you need help setting up drivers for it, I’m afraid this isn’t the place. I used the stuff on this page to get my Netgear WG311v3 working.
  • You’re using WPA security on your wireless network. I’m not getting into the arguments here.

First off, make sure you have the wpasupplicant package installed, which will handle the security side of the wireless networking for us. (You are using WPA security, right?) It’s almost certain that this is installed, but we’d better check now before we cut the machine off from the Internet.

sudo apt-get install wpasupplicant

Now, as I’ve already mentioned all network connections are handled by the NetworkManager, so if we want to do our own thing we need to get rid of it. Note that once we’ve done this your machine won’t have any network access, so make sure you’ve got another machine close by in case of need. You can do this in two ways – either disable NetworkManager (something of an arcane process), or more simply (and the way I did it) remove the relevant packages:

sudo apt-get remove network-manager network-manager-gnome

OK, so now you have a machine with no networking capability at all. Never fear, though: your machine will soon be out of solitary confinement. Using your favourite text editor in sudo mode, edit the file /etc/network/interfaces and set it up as follows:

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp

wpa-ap-scan 1
pre-up sudo /sbin/wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dwext -B
pre-up sleep 5
post-down sudo killall -q wpa_supplicant

So, what has this done? Well, the first couple of lines set up the loopback network device, which is used for all sorts of things in Linux. Don’t ever get rid of this unless you like a lot of pain in your life.

The second two lines tell the system that we want the wlan0 interface (that’s the wireless one) to start get going automatically, and acquire and IP address through DHCP. The final chunk tells the system how to go about setting up the connection:

wpa-ap-scan 1

This setting means that the ESSID of your wireless network is publicly visible. If your router hides the ESSID, set this to 2.

pre-up sudo /sbin/wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dwext -B
pre-up sleep 5

This specifies the command to be used to set up the wireless connection. -i is the name of the interface, -c specifies the location of the configuration file (more on this in a moment), and -B runs wpa_supplicant in the background (very important!). The -D option sets the type of driver to be used. The wext driver is fine in most cases, even if you’ve set up your network card’s drivers through ndiswrapper.

The final stage is to configure wpa_supplicant so it knows about your wireless network. In the interfaces file, we specified that the configuration file is located at /etc/wpa_supplicant.conf, so edit that file. The contents of the configuration file should be as follows:

ctrl_interface=/var/run/wpa_supplicant

network={
        ssid="<your SSID>"
        psk="<your wireless network's password>"
        proto=RSN WPA
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
}

The ctrl_interface line tells wpa_supplicant where to dump any information it needs while it’s running. The setting here is the default, and I see no reason to change it. Below that is simply the details of your wireless network. Note that the ssid and psk value must be in quotes. The other values seem to work well for most wireless network situations.

That should be all you need to do. To see if it’s worked, reboot the machine. If you’ve set up an SSH server, you should be able to log in remotely straight away. Or, take a look at the list of devices connected to your wireless router, and you should see that it’s connected itself without your intervention. Now you can stick the machine in its dusty corner and let it do its thing.

The wireless network card in my machine unfortunately doesn’t support Wake-On-LAN. If it did, I could stick my server in the attic and never look at it again. Maybe I’ll try that one day.

March 11, 2010   Posted in: Linux/Ubuntu  No Comments

When I die, think only this of me: Blimey, this is difficult!

The tradition of observing a minute’s silence to commemorate the personal sacrifice of military personnel in past battles has undergone a certain evolution through time, transforming into the preferred method of marking the passing of any figure of public note. This is most noticeable in sports arenas, where the entire crowd is asked to remember the person in question for a minute prior to the day’s match. This is an excellent approach: the ceremony, brief and relatively informal though it is, can be held in focus by those who feel most affected. (Note that I use the phrase ‘most affected’ to differentiate the sports fans from the general population as a whole; the fans’ feelings can in no way match those of the departed’s friends and family.)

In recent years, the minute’s silence at sports grounds has been replaced by the minute’s applause. Whether it’s thought that using the universal sound of appreciation is more appropriate to sporting and entertainment figures than the more sombre requirements of people killed in battle, or whether it’s to cover for the fact that a reasonable proportion of football fans are unable to focus on anything for a full minute (or at least stand still for that length of time) is unclear, but it certainly seems more fitting in its context.

I’ve been thinking about all this since listening to a program on commemorating the war dead on Radio 4 this morning, and wondering how I’d like my passing to be commemorated. I am reminded of the example of Jeremy Hardy, who once said:

“I would quite like to die in a way that causes maximum inconvenience to others – on an escalator, or while having my blood pressure taken. Or at somebody else’s funeral. Attention-seeking to the last.”

As a comedian, it’s understandable that Jeremy wants to get as much attention as possible, and it will certainly cause a few people to remember his passing. For myself, I prefer to cause as little consternation amongst large groups of people as I can, so lasting remembrance is unlikely to come my way through this route.

I believe I fit into that category of people who will never amount to much on the world stage, and will pass on with no corresponding outpouring of public emotion. However, should a large group of people feel that I’m worthy of being commemorated in a public act, I will at least want people to remember that. So neither a minute’s silence for me, nor a minute’s applause. I want a minute’s hopping on the spot. It would look ridiculous and unseemly, and most would fail in the attempt, but the thought amuses me and it should (if done properly) amuse everyone who’s trying to hop too. You may not wish to hop, and that’s your right, and I won’t be upset (I’ll be rotting). But you should be amused, and if you’re not I don’t want you commemorating me at all, you miserable sod.

March 9, 2010   Posted in: Ramblings  No Comments

Gnomine Icon

Gnomine Icon
A new icon for Gnomine, the GNOME Minsweeper clone. You can download it from the Icons page.

February 6, 2010   Posted in: Icons  No Comments

Your backup strategy

Yes, there’s approximately 8,390,000 articles on this subject already, but it seems that people still don’t get it. In the vain hope of 8,390,001 articles doing the job instead, here goes:

BACK. UP. YOUR. FRICKIN’. DATA. If you don’t, you’ve got no-one to blame but yourself when it all goes Pete Tong and you lose it.

There are numerous strategies for this, but here’s mine:

First, buy two external hard drives. Yes, two. Keeping one backup next to your computer is a waste of time. When the nasty burglars sneak in, or fire monster comes calling, you’ll lose the backup with the computer, which kind of defeats the point. So, buy two external drives, and keep one outside the house – at the office, with a friend, wherever. But I precede myself.

When your backup drives arrive, take a moment to enjoy the shiny wrapping. It’s always worth treasuring new stuff, however mundane the item.

Plug in your first drive, and back up the data you need (a word on how to do this in a moment). I don’t back up my whole hard drive, as I’m happy enough to reinstall stuff from scratch if I need to. I just back up my documents, photos, movies and that kind of thing – the stuff I can’t get from anywhere else, or would take too much time to find again. If you want to protect your entire hard drive, and copy absolutely everything, that’s fine too. Once the backup is complete, repeat the backup for the second drive.

You now have two backups of your data. Good. Take one of the hard drives away from the house, and leave it somewhere safe. This is your off-site backup, and will be handy if the fire, burglars, or burglars on fire come and destroy your home. Keep the other drive at home, and every few days, update the backup. This is your short-term fallback in case your computer dies, or you accidentally delete an important file.

Over time, your off-site backup will obviously become out of date, and be less and less useful. So every few weeks, swap the two backup drives. This way, if the worst comes to the worst, you won’t lose too much stuff. There’s a trade-off here between convenience and the security of your data, so come to a compromise to suit your circumstances. Never, let your off-site backup languish in a drawer for 6 months though – an out of date backup is almost as useless as none at all.

When it comes to backup software, there’s plenty of options out there that will do the job. Some specialise in copying entire hard drives if that’s your bag, and others are better at dealing with selected sets of files. As a massive geek, I only ever use the Linux rsync tool, so I can’t comment on any specific software package. There’s more options, reviews and opinions in the world than you’ll ever need, so find something that works for you. The real key is to find something that will make your backing up as simple as possible – the harder it is, the less likely you are to bother doing it. And that way lies disaster.

That’s it. Simple. Now go and do it, unless your data is worthless to you, and I doubt that very much.

February 4, 2010   Posted in: Computing  No Comments