I’ve moved house and being nowhere near the router that connects us to the net, I had to purchase an Xbox Wireless Adapter (rip-off!). Once it was setup, I had to test the network connection. For some reason UPnP wasn’t working even when enabled on the Linksys WRT54GR, so I had to set up port forwarding. The ports needed by Xbox Live are as follows:
- TCP 80
- UDP 88
- TCP & UDP 3074
- TCP & UDP 53
I found those details on the official knowledge base article found here. Hope that helps!
My Xbox 360 kept freezing on the startup logo until I eventually turned it off and then on by hitting the DVD-tray open button. This probably indicates that the DVD drive is defective or on its way out – meh. Warranty here I come!
February 16, 2009 – 23:30
or, “What happened to VboxAddIf?!”
I decided to upgrade to Virtualbox 2.1 the other day as I wanted to keep up to date. It’s a great bit of software.
One of the VMs I use regularly runs Debian and serves as a development environment and a nagios server for monitoring the various sites I host here at beplacid.net. Unfortunately, a command I relied on regularly was VBoxAddIf to setup a bridged network device between my host (also Debian) and the guest instance. According to this bug report, networking has been completely rewritten in VirtualBox 2.x, therefore VBoxAddIf (the script) is no longer relevant.
There are two ways you can fix this: use the GUI to configure the VM to use one of your host devices, or if you’re headless, setup the network using VBoxManage modifyvm. The user manual (section 8.5.3) has the best collection of information on it. For me, I do the following to force the VM to use my previously created bridge device br0. It’ll do for now until I’ve got more time to investigate and do it properly:
VBoxManage modifyvm debian -nic1 hostif -hostifdev1 br0
You’ll need to run the command while the VM is not running.
February 11, 2009 – 21:13
I’ve amended the standard “reddit this” button and made it so that submissions open in a new window without navigating away from the original page – I found this annoying when halfway through something and thinking “I’ll reddit this”. Here’s the javascript code:
javascript:window.open('http://reddit.com/submit?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title));void 0;
Just add a bookmark in your browser and use the above as the URL/address.
I keep getting the exclamation mark in htop next to the uptime and always wondered why it’s there. According to this mailing list post it’s a little easter egg in UptimeMeter.c:
35 char daysbuf[15];
36 if (days > 100) {
37 sprintf(daysbuf, "%d days(!), ", days);
38 } else if (days > 1) {
39 sprintf(daysbuf, "%d days, ", days);
40 } else if (days == 1) {
41 sprintf(daysbuf, "1 day, ");
42 } else {
43 daysbuf[0] = '\0';
44 }
sudo can be used to give certain users access to commands that require root. This is handy when you’ve got lots of users that need to administer the system or software that resides within it. This also means you don’t have to distribute the . An example would be to allow a user to edit certain configuration files in a directory that’s owned by root, and which changing the permissions could be troublesome or yield unknown consequences.
If you’re an admin and you’re doing things in this way, be careful who you give `sudo vi` permissions to. Allowing someone to access vi through sudo means they can execute anything as root. Vi (or Vim) has the ability to run commands on the OS by just issuing `:! somecommand` within the editor. Therefore, doing a sudo vi means you can `rm -rf`, chgrp or chmod (and everything else), and not have any issues whatsoever.

December 18, 2008 – 22:57
mplayer, vlc and even the horrible Totem would play my music, but my favourite media player — Audacious — wouldn’t. I like Audacious because of its plugins and subtle interface. Some searching around the web didn’t find many solutions except suggesting that the output plugin was incorrect. I managed to fix this by changing from pulseaudio to ALSA in the audio preferences (CTRL+P -> Audio -> Current output plugin). Now I can happily wake my neighbours at 0630 using the excellent Alarm plugin!