May 282009

My card uses the saa7134 driver. lspci output:

00:0a.0 Multimedia controller: Philips Semiconductors SAA7131/SAA7133/SAA7135 Video Broadcast Decoder (rev d1)
	Subsystem: Micro-Star International Co., Ltd. TV@nywhere Plus

It seems in 2.6 kernels with this driver the remote should just register as a keyboard, you can check in /proc/bus/input/devices if it shows up. Mine did not out of the box on debian testing with a 2.6.26 kernel.

With 2.6.29 a patch ( is integrated which does make the remote show up as a keyboard input. Using it then with lirc requires a special config file: , which seems to be the same essentially as I ended up using the former. It does work fine now, aside from two buttons which are switched somehow, which is not a big deal to me.

The remaining step is to setup an ~/.lircrc. Information on this is surprisingly sparse, so I’ll post my version shortly.

Jun 172008

Last updated: 2008-06-17

Trying to do play around with some static analysis? Here a review of software that helps to create an abstract syntax tree for C:

  • styx, a scanner and parser software that says it is easier to use than lex/yacc (with some small limitations). It is supposed to automatically generate an abstract syntax tree.
    Problem: I was unable to find any grammars for it except the ones on the download page (they do have a grammar for php there), and the documentation about writing one is not really complete.
  • elsa/elkhound, generates an abstract syntax tree for C++, but lacks documentation for how to write a context sensitive analysis that can process the tree. It is complicated without documentation, because meta programming is used for the ast.
  • olmar is an ocaml wrapper for elsa and adds a nice program to generate graphs of the AST. This would be my option if I had been able to use ocaml.
  • Open C++ core, the core of the Open C++ project, which introduces aspect oriented / meta object programming to C++. Almost no documentation exists though.
  • oink is a Collaboration of C++ Static Analysis Tools, which sounds like a nice middle-ware (it uses elsa as a backend). It lists as one of its goals extensible for ease in adding backends, yet I could not find much information about how to actually do that.

elsa seems to be the standard tool for the task, but understanding its internals was too complicated for my small project, so I ended up printing the AST as XML and reading that back in from my program.

Jun 142008

Are you trying to boot Windows from a second hard drive, but it just hangs and nothing happens?

Windows apparently only really supports booting from the first hard drive, but grub can trick Windows by remapping drives:

title Windows
        rootnoverify (hd1,0)
        map (hd0) (hd1)
        map (hd1) (hd0)
        chainloader +1


Feb 242008

Ekiga is a nice linux voip program. Yet it has the limitation that its sound support does not understand .asoundrc devices. As a work around you can use an environment variable in .asoundrc to set the default device specially for ekiga.

But what if you want to have the ring sound on a different alsa device than the actual conversation? This is what I need with my DotAsoundrc, because my headphones are plugged in all the time. So I wrote a little python script, which uses dbus to connect to ekiga and plays the ring tone on a different device.


Jan 092008

pidgin-away lets you specify a new away message from the command line. Great for usage from within scripts. I wrote it so that when I start a game I can automatically set my status to away, and return to available when I’m done playing. Any questions or bugs, send me an email (contact information is in the script).


  • 2007-06-25 – Version 0.2: small bugfixes
  • 2007-05-20 – Version 0.1

skype-away lets you read or set the current status. Any questions or bugs, send me an email (contact information is in the script).


Dec 022007


The client gets permission denied on some item inside an NFS mount (this is not a mount problem). Everything looks ok, the user should have access to the file because he is in the correct group, the file has correct permissions, the ids map/are the same (idmapd does not report any issues), but there still is no access to the file from the client.

Source of the Problem

NFS, even NFSv4, is most often using AUTH_SYS to authenticate connections. AUTH_SYS only allows 16 groups to be transmitted with a request. My Linux (2.6.22, nfs-common 1.1.1) truncated all group memberships, and only sent the first 16, resulting in this seemingly unexplicable “access denied” even though the user was part of the group on both the client and the server.


A quick fix is reducing the number of groups the user is a member of.

A better solution is to use a different authentication mechanism instead of AUTH_SYS (which does not provide real security anyways), suggested is RPCSEC_GSS. I read somewhere that at the moment (2007-12-02) only kerberos is properly supported in the Linux gss library, but I’m not certain about that. I went ahead and setup kerberos, just because its known to be mature: NFSKerberos.


I found out about the problem in Eisler’s NFS Blog, which includes much more details on this issue.