Posted in Internet Stuff, Tech

Ubuntu upgrade to 10.04 and lirc

Ubuntu 10.04 (lucid) came out a short while ago … and because it contained new themes and the latest version of mythtv, I went and upgraded. These updates are tested by gazillions of people, any serious problems would be noticed before release .. right? right?

Well, looks like I did it again. Turned a working tv recorder into a “electronic beeping thing under the TV that doesn’t do much except show a pretty screensaver if you wait long enough”. After fixing up some stuff that the update broke (thanks for overwriting my config files. I’ll just use the version from the backup I made before the update if you don’t mind), I got almost everything up and running again. As of right now the only things broken are a) the theme not displaying any text when I’m in LiveTV or a video (yeah, try to get out of there without any menus) and b) my remote control is also not working.

At first I thought that some sonfig was just b0rked with the lirc config, but after doing a “top” and seeing that lirc_dev was consuming a modest 90% of my CPU, I decided that it was googles turn to find out what was wrong with Ubuntu 10.04. And sure enough, it seems this wa a know problem that made it into release (hooray). Anyone stumbling across this post via goole: go to https://bugs.launchpad.net/ubuntu/+source/lirc/+bug/550369, there are fixes for the problem towards the end of the page. Since it looks like they will make it into the 10.04 updates you can also just wait for a few days/weeks and they will pop up as a update automatically. Anyone wanting to fix the problem now: the short version ist: go to https://wiki.ubuntu.com/Testing/EnableProposed to set up proposed updates for lucid, and install “lirc” and “lirc-modules-source” from the proposed repository.

As for the broken themes? I’m still working on that, have a few updates and poking around to go before the system is back to the running condition it was before.

*Update*
For some strange reason, I had to set the IRQ of the serial port to 4 any specify it in the /etc/modconf.d directory (was getting busy errors with IRQ 3)

The broken themes were “only” the OSD using bold font. After changing it back to the normal version in the OSD settings everything worked fine.

Posted in Internet Stuff, Server, Tech

XEN and Kernel update

Server is up and running again. This morning I finished the xen (3.4) and kernel (2.6.32) updates I prepared yesterday evening. The only pitfall I stumbled across, was that the kernel in the debian repository (2.6.26-xen) seemingly wasn’t compatible with the latest xen in the debian repository (system would hang while booting, I guess that’s what I get for using “testing”).

Anyway, anyone using “lenny” or “testing” and wanting to update xen; here are a few tips to make the transition a breeze:

  • The debian wiki is full of useful information regarding xen
  • backports.org has a current xen kernel (linux-image-2.6.32-bpo.4-xen-amd64) that works fine with xen 3.4, just follow the instructions on backports.org on how to add it to apt.
  • I had to deactivate the “vfb” (VNC console) setting in the domU config files to get my guests to boot, browsing the Internet I saw people having the same problem with the “dhcp” setting.
  • If you are planning on updating the guests kernels too (advised), remember to change the “kernel” and “ramdisk” settings in the domU config files accordingly

With these few points in mind, the update is a breeze.

Posted in Gaming, Programming

Grid clicker script

I finished up my “grid clicker” script. it is intended to simplify testing of games where you have to click certain patterns (a grid). Typical facebook games like farmville or funfari are great examples of this. just download the file (here is the sourcecode), execute it, and an eye should appear in your task bar. Double clicking on the icon in your task bar will start the script, just follow the instructions and everything should be fine.

And while I am at it: here is a spreadsheet I started for plants/trees/animals in funfari: Google online spreadsheets

Posted in Me, Photography

Wedding & Photography

I haven’t posted anything here in a while. Mostly I’ve been busy preparing a photo-shoot and -documentation of a wedding of friends. As a photographer you will always notice things, when looking at the finished fotos, where you say “hmm, maybe a differnet aperature/iso/flash/exposure setting would have produced an even better result”. but all in all I’m satisfied with the results.

Posted in Tech

Mythtv and IR Blaster

We use a set-top-box as the video source for mythtv. And while this works perfectly fine, we have to manually make sure the right channel is set for what mythtv wants to record. This can turn out to being a pain at time, especially when multiple things are planned to be recorded on different channels. So I went and ordered a IR transmitter from irblaster.info to give mythtv the possibility to change channels itself.

Since a bunch of the infos I found online were a bit out dated, here are a few tips for anyone using current versions of the software (I’ve got mythtv-backend 0.22 and lirc 0.8.4a running on a mythbuntu based system when I wrote this)

Hardware is easy to set up, just plug it into a free serial port.
1st we will head over to http://lirc.sourceforge.net/remotes/ and grab the file for our reciever set-top-box if we don’t already have them.
Then go edit /etc/lirc/hardware.conf and add the transmitter settings, these were mine:
TRANSMITTER="Skymaster_XL10"
TRANSMITTER_MODULES="lirc_dev lirc_serial"
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE="/dev/lirc1"
TRANSMITTER_LIRCD_CONF="skymaster/XL10"
TRANSMITTER_LIRCD_ARGS=""

now include the reciever settings to /etc/lirc/lircd.conf
I edited my /etc/init.d/lirc to execute the following line before starting the daemon (was needed to ensure the lirc_serial module can be loaded):
/bin/setserial /dev/ttyS0 uart none
Restart lircd and you can then start testing if transmitting codes work with irsend works. here is a little wrapper script I wrote around irsend for mythtv to use. You may have to twiddle around with the sleeps and change the $Remote to your reciever. If the sleeps are too long (-> the script takes to long to finish switching channels), then mythtv will timeout and not display live tv.

If everything is working fine, then go ahead and tell mythtv to use the script to change channels. This is done in the tuner card setup of mythtv-backend (mythtv-setup).

Posted in Programming

Farmville

Farmvill can be a fun way to pass some time, but if your fields get to be a bit big clicking on every single field can get to be a bit tiresome. I found this autohotkey script in the depths of the internet. It simplifies the process greatly ūüėČ

Posted in Programming

bash scripting … switching into directory of the script

Sometimes it is useful to switch into the directory of the script e.g. when we need to call or include further files and don’t want to go through the hassle of searching for the script in the file system. Especially when symlinks are involved everything get a bit more interesting. This little snippet switches into the directory of the script, using readlink to dereference symlinks if the script is called via a symlink.

Posted in Programming

Bash scripting, traps and sleep

Today I ran into any old problem: you have a script that should do something when it recieves a signal (e.g. if someone sends it USR1 it should write to a log/syslog), but the script uses a long sleep because it normally only checks/calculates stuff every x min. If you send it a kill -USR1 $pid it will normally execute the trap AFTER the sleep is done, not so great. I figured of the following solution today: put the sleep in a while loop that checks if the full time was slept, and inside the loop a sleep that sleeps the X seconds remaing in the background followed by a wait.

If the script now recieves a USR1 it can kill the wait, execute the trap and will continue the remaining sleep on the next iteration of the loop.

Posted in Tech

Serverdown

Server was down for the last 6 hours due to me updating a few stuff that really really didn’t work out too well (grub, xen and kernel at the same time). I gave up and afer a few hours of work managed to revert back to the old configuration so I can recieve mail again till I figure out what went wrong. Server may be down tomorrow a bit too while I try to figure out what exactly broke and try to at least get grub and xen updated.

Posted in Me

Hiking in the Black Forest

I had Monday off work, so we went hiking in the Black Forest (southern Germany) the last 3 days. The first day we started hiking around Blumberg (I managed to twist my knee after a few km, didn’t really make things easier), then we took a steam locomotive (Sauschw√§nzlebahn) up the hill and hiked back to the car. Afterwards we drove up to Titisee where we booked a hotel for 2 nights.

The next day we drove over to the Wutachschlucht and hiked a very nice trail. Since the weather was good and it was a Sunday there were a decent amount of people hiking. In the late afternoon we finally arrived at our destination, sat down and rested our feet before we took a bus back to where we parked the car.

On the last day we were a bit tired for hiking the last 2 days and the weather was getting  a bit rainy, so we decided to take the scenic route home, and stop by waterfalls and ruins on the way.

Posted in Internet Stuff, Programming

Reboot Script for Linksys WAP200 access points

Since the Linksys WAP200 has a tendency to hang and not let any users connect anymore, this little script to reboot an accesspoint (webinterface still works fine). Replace user and password with correct values.

Posted in Internet Stuff

WordPress, Lightbox & SmoothGallery

Since I just spent an hour debugging a problem that others probably also have ran into, I’ll post my findings and workaround. I’ve been using lightbox for my images here for a while (the thing that darkens the website and pops up a frame with the image, pretty muth common nowdays). This is a great solution for an image of two in a post, but if you want to add a bunch more (or a whole gallery) all those images will really bloat up your post,¬† so I had a look at different picture gallery software and really liked SmoothGallery. It turns out there are two plugins that make it easy to implement the software into a wordpress blog (NextGEN Gallery and NextGEN Smooth Gallery), but unfortunately SmoothGallery breaks lightbox in WordPress (has to do with the javascript libraries they use). My current workaround is to use Slimbox as an alternative to lightbox until the problem get’s fixed (or until I fix it myself somehow). In the long run I’d really like to return to lightbox (or lightview, a pimped up version).

I hope I get around to writing post of the last few days tomorrow. Wanted to do that this evening, but I got caught up in the gallery/lightbox problems.

Posted in Me

a bit of bouldering

On the way home from work today I made a little detour to a playground where there are two rocks for bouldering (seems like they are from this company). Yes, I know playgrounds are for kids, but if you ignore the holds the rocks can be a real challenge. Even if they are only about 3m high (a bit less than 10ft), getting to the top without using the holds can be a bit challenging. Sorry for the crappy picture, I only had my cell phone with me …

bouldering

http://maps.google.de [urldisplaymode=nomap]

Posted in Me

Climbing

Yesterday we went for a bit of climbing. We have two rock climbing gyms here in town but I still seldom manage to find time to go climbing. I used to go once or twice a week, but this last year I only managed to go climbing a handful of times. Anyway, it was tons of fun even if I have dropped way below what I used to be able to climb. When doing the longer routes I really noticed my arms tiring, but that is just the missing training. Technique is still as good (or bad :-p) as it used to be and my forearms and fingertips are sore (as so often after climbing). I’ll try to go more often since it is fun, but I really need to loose some weight if I want to climb anything harder than a 5+/-6 (only managed a 5- yesterday, I really suck).
I didn’t take any pictures this time, so you all get some older stuff I grabbed from my gallery of the climbing gym …