No, I ain’t dead yet…
Posted in Miscellaneous on May 30th, 2009 by JanI’m just extremely busy lately – mostly preparing for moving to a new place.
Parking…
Posted in Comics on March 30th, 2009 by Jan
(Comic © http://www.xkcd.com)
How often I’ve wanted to do that, because of inconsiderate assholes who park so badly that noone can park next to it, in a full car park. Or who just decide to park in the middle of two spots.
Autoswitching network interfaces
Posted in Linux / unix, Software-related on March 8th, 2009 by JanSince I’m a lazy git, I want my laptop to automatically switch back & forth between my wired and wireless interfaces. Seems that stuff like Network Manager can do that for you, but it’s not really my thing. I don’t like stuff where you need a GUI to configure it, a duplicaton of network configuration, and it also tends to hang my machine. No idea why, though.
After an afternoon of fiddling around with several things, I came up with the recipe:
1 portion ifplugd, a good mix of ifupdown configuration with guessnet mappings, and some home-grown scripts. Mix well, and let simmer over a hot stove for half an hour. ;)
The details (tailored to Debian Sid):
- Install ifplugd and guessnet:
apt-get install ifplugd guessnet - Configure the interface you want ifplugd to monitor. For me, this is eth0 (wired ethernet). You can do this by editing
/etc/default/ifplugdand adding eth0 in theINTERFACESfield.
Restart ifplugd (/etc/init.d/ifplugd restart) - Edit your
/etc/network/interfacesfile the way you like it. I’m using multiple wireless entries with guessnet:
mapping ath0 script guessnet-ifupdown map verbose: false map debug: false map autofilter: true iface ath0-work inet dhcp test wireless essid WORK wpa-ssid WORK wpa-key-mgmt WPA-PSK wpa-proto WPA wpa-psk "***" wpa-driver wext iface ath0-home inet dhcp test wireless essid HOME wpa-ssid HOME wpa-key-mgmt WPA-PSK wpa-proto WPA wpa-psk "***" wpa-driver wextFor syntax info, see
man guessnet - Replace the script in
/etc/ifplugd/action.dwith something more usable. The installed script only calls ifup or ifdown depending on what’s happening. What we want is to ifdown the interface, and ifup the other.Something like this:
#!/bin/sh set -e WIRED_INTERFACE="eth0" WIFI_INTERFACE="ath0" WIFI_MODULE="ath_pci" IFUPDOWN_STATE="/etc/network/run/ifstate" if [ $# -ne 2 ]; then echo "Incorrect usage!" echo "$0:" exit 1 fi case "$2" in up) if [ "$1" = $WIRED_INTERFACE ]; then # Wired interface is going up, bring wireless down # if it is active. WIFI_MODULE_LOADED=$(lsmod | grep ^$WIFI_MODULE | wc -l) if [ $WIFI_MODULE_LOADED -eq 1 ]; then /sbin/ifdown $WIFI_INTERFACE /sbin/rmmod $WIFI_MODULE fi /sbin/ifup $WIRED_INTERFACE else /sbin/ifup $1 fi ;; down) if [ "$1" = $WIRED_INTERFACE ]; then # Wired interface is going down, bring up the # wireless one. /sbin/ifdown $WIRED_INTERFACE /sbin/modprobe $WIFI_MODULE /sbin/ifconfig $WIFI_INTERFACE up sleep 5 /sbin/ifup $WIFI_INTERFACE WIFI_CONFIGURED=$(grep ^$WIFI_INTERFACE $IFUPDOWN_STATE | wc -l) if [ $WIFI_CONFIGURED -eq 0 ]; then # Interface was not configured, bring it back down # to save power /sbin/rmmod $WIFI_MODULE fi else /sbin/ifdown $1 fi ;; esac
Now, every time ifplugd configures up eth0, ath0 is automatically deconfigured, and vice versa.
The actual configuration of the interfaces is still in /etc/network/interfaces, so you can still handle it by hand if you want to.
World of Goo!
Posted in Games, Software-related on March 7th, 2009 by JanA good friend of mine introduced me to a new game: World Of Goo!
I’ve finished the demo, and it’s damned addictive ;)
There are user levels available too, so the gameplay isn’t limited to the game itself ;)
And, as a nice bonus: It’s available for Windows, Mac, and Linux!
Updating Boot Camp to 2.1
Posted in Mac OS, Software-related, Windows on February 16th, 2009 by JanFor a reason not to be mentioned here, I needed to install Windows XP (legal license) on my Macbook. Easily done, Boot Camp Assistant, install windows, install drivers, the works.
Then I wanted to update to Boot Camp 2.1, to be able to update windows to SP3.
Big nono. Didn’t want to install. Update constantly failed, no matter what.
After some googling, I ran across this post on the MacRumors Forums, which basically says that to install it, you need to open up your registry editor (start -> run -> regedit.exe), do a search for “Boot Camp Services” and locate the key which reads “Language”. Modify it, and change the Decimal value to 1033 (hex 409).
Restart the installer after this, and it’ll install. Go figure.
Debian GNU/Linux 5.0 “Lenny” released, Squeeze incoming :p
Posted in Linux / unix, Software-related on February 15th, 2009 by Jan![]() |
Debian Lenny got released today. Yay! :) And the new testing branch is called Squeeze :P |
Using XMLTV with EyeTV
Posted in Mac OS, Software-related on January 7th, 2009 by JanI bought an Elgato EyeTV Hybrid a while back, and I was using the tvtv.co.uk service to get my EPG(Electronic Program Guide) data.
This, however, and unfortunately, stopped updating for Belgian channels on the 1st of january. Shitty, since I use that data to have EyeTV automatically record stuff for me. I’ve contacted tvtv, no reaction sofar.
Since the EyeTV has no other built-in EPG data supplier that I can use, I looked for an XMLTV grabber for Belgium. The grabbers that existed unfortunately didn’t work anymore because they depend on the Teveblad.be website, which no longer allows screenscrapers. Bummer.
Fortunately, thanks to the magical interwebs, I stumbled on mc2xml, a Media Center TV Listings to XMLTV convertor. It downloads media center, titantv, or schedules direct tv listings and outputs an XMLTV formatted xml file, which I can feed to EyeTV. And now I have my schedule info again! ;)
Linux on the Apple Macbook
Posted in Uncategorized on January 3rd, 2009 by JanI was bored recently, and decided to install Linux on my Macbook. I opted for the distribution I like best – Debian (unstable/Sid).
After some twiddling it all works rather well, I’m amazed how well ;) Even suspend to ram works flawlessly! (that was a different case a year ago, when I last had linux on a laptop). The only things I still have to get working is the framebuffer console (so I get something better than 80×25), and the infrared. Nothing very high on the agenda, though :)
I’ve detailed the installation instructions here, on my kcore.org website.



