I’ve been working on enum again recently and got completely stuck in getopt_long() return values. I don’t want to bore you with details, so let me cut to the chase: I needed a way to look into what getopt_long() is actually doing.

Now, there are a few ways to figure out the doings of a function. If it’s your own code, you could just go ahead and add a few printf()s to see if your variables fill up as intended. Then you could use gdb to walk through your running code. But what if you want to do so in functions outside the scope of your own code? In my case: getopt, i.e. libc?

Obviously, you can download the library, add your printf() stuff, compile and install it, and see it all happening. But libc isn’t exactly small, fast-compiling, and you really don’t want to mess it up and have it installed on your system. So how about just taking what you actually care for and push it in? This is nothing experimental or particularly “hacky”. I just don’t want to forget about it and maybe someone can make use of it. So here we go…

Download your libc sources to a new directory and copy the files you need. Try something like

In order for this to actually work, I fiddled around with a few #ifdef’s in getopt.c. But that’s something you’ll probably find out yourselves. You should at least be able to compile it (‘make’ it). Now put a printf statement somewhere in the function you want to inspect. Recompile the lib and then go back to your actual program.

Running the program ist easy.

src/enum -p1 1 3
1.0
2.0
3.0

Surprisingly, running it using your own getopt version is just as easy. Just push your library in:

If you’re disappointed now, that’s your own fault. I said it in the beginning, this is nothing special. It’s not my idea. It’s something that developers all use all the time … or something like that. In case you didn’t know about it, good for you. Otherwise, sorry for reading my memory dump.

Since there have been a few blog posts about GNOME 3 already, I’m sure you don’t mind me adding one. I’m one of those who don’t do any work, just lurk around and wait for stuff to be fixed — or working in the first place. I also don’t like compiling GNOME myself. I barely touched the already packaged stuff in the repository of our Debian GNOME packaging team. But I run unstable plus stuff from experimental. I’ll thus have a bit of a different experience with GNOME 3 than current testing users who at least in parts don’t seem to like what they’re getting.

That being said… I love it.

No, I don’t mind running network manager on my systems, I even have it on my netbook (Atom processor). I used wicd for a long time because network manager really got nothing done back in the days (half a year ago or what :)). Nowadays, since version 0.9, it works fine for me. No fiddling around with config files, perfect integration in the desktop, and LAN and WLAN Just Work [tm].

No, I don’t like if some weird dependencies dictate what tools to use. I usually used pidgin for messaging, for instance. Now I’m using empathy, simply because it’s best integrated in GNOME. And no, I won’t switch from mutt to evolution. :-P

And there are more such cases. Also, these weird accessibility tools that are stuck in the gnome-shell “top panel”, I don’t need them. Still there. (There’s an extension to remove it, by the way.) Also, I must say, GNOME 3.2 is a lot better than 3.0 already. And I think 3.4 might do the final trick for me.

Fact is, with GNOME 3 I have a much cleaner desktop, there is more room for windows (which is nice on a netbook display), there are web apps which I already use a lot, and it has a professional, not too playful look (i.e. a few effects, clear and consistent theming, no bubbling windows). And the new notification stuff is just awesome, especially with the empathy integration.

Oh, and too many mouse click to access an application? 1) Put your most used apps in the favorites bar (or whatever it is called); it’s just one click then. 2) Press your meta-key (that way our name for the windows key, or was that the ESC key? Whatever, press your windows key), type in the first two or three letters of your application, and hit enter; you don’t need a mouse at all.

Using zsh as default shell is perfect. Using grml-zsh stuff to configure it, even better. Using XTaran’s config, way better. Using your own config, invaluable. Now, there is one thing that always bothered me: having all hosts I usually deal with in my ~/.ssh/config in order to have tab completion (and short names). I wanted to improve the situation and was kindly pointed in a different direction by Myon, namely to just use the ~/.ssh/known_hosts for tab completion. How about that?

I started playing around with the config and, as it turns out, Axel already has something ready. Unfortunately, it didn’t fulfill all my needs yet. That is because I have multiple known_hosts files. Martin already filed a bug to have ssh read ~/.ssh/known_hosts.d/* but that isn’t resolved yet either, even though upstream is aware of it. I thus had to point tab completion and ssh to multiple files by hand. But that’s not too bad for now. Let’s have a look:

What am I doing? Well, we need to deactivate the hashing of known hosts. Otherwise your known_hosts files aren’t readable as needed. Then you define your known_hosts files for the domains you care about. Pretty straight forward.

Now, how about tab completion in zsh? Well, easy part actually:

[ -f ~/.ssh/config ] && : ${(A)ssh_config_hosts:=${${${${(@M)${(f)"$(

What's here? We read and parse your ~/.ssh/config for configured hosts, then we parse all your known_hosts files which are for me: ~/.ssh/known_hosts, ~/.ssh/known_hosts.work, and ~/.ssh/known_hosts.debian. And lastly, all is added to zsh completion for hosts. That actually works. :)

It’s the time of the year again. LinuxTag is right up and, of course, Debian is part of it. But, it wouldn’t be us if we didn’t have any problems at all. Well, the situation isn’t real bad™ but could deserve some improvement. Improvement about what, you ask? Isn’t that obvious? It’s man power that we need (women shall feel included :)).

Now, LinuxTag 2011 is going to happen, with or without you, on May 11th to 14th. Needless to say that you’ll be missing quite a lot if you don’t attend. I mean, even Zack will be there. And so will I (most probably at least). And even more… Who’s willing to miss that, really? So, pack your stuff, get a train ticket or your car or your friend’s car or the car of a friend of your friend who knows a friend who doesn’t know you but still wants to give you his car which you don’t even need since you already have the car of that friend of your friend and now you have two cars and can even bring another bunch of fellas who probably own cars themselves and now you’re thinking about the environment because of all the cars that will come to Berlin and because of that you suddenly buy a train ticket and leave all three cars at home… and in the end only one thing counts: you’ll be there. Oh, and before you drive off to your local train station, please put your name into our neat little list so we can count on you as booth staff — that’s because we need man power in case you missed that section or somehow forgot it while thinking about that guy who is the friend of your friend that owns a car but rather comes by train as it saves the environment.

I’m using Gnome for quite some time now and I’m always satisfied with the interfaces I have to whatever I need. There is one thing, though, that I miss: a calendar. I don’t like evolution, I don’t need another mail client. What I want is a simple, yet sophisticated application that I can put appointments in and which reminds me of them (recurring issues should be possible, too). It may but doesn’t have to be somehow attached to the Gnome clock or whatever. Though I expect it to look “Gnome-like” and be accessible from the panel. Do you know such? And is there even a Debian package for it?

Countless times already have I used Google’s amazing feature called maps. Admittedly, if you know me, you might wonder how I can be advertising Google. At least as often as I used google maps, I have told people about google’s evilness. They’re making their users transparent in ways most people can’t even imagine — transparent to other users (just like Facebook does) but, more importantly, transparent to themselves and their advertising customers. Technically skilled people reading my blog probably just nod and scoll down now… :) Well, there still is something about Google that makes me use their developments: they are good. I don’t know any other online service to create own maps, get directions etc. with as much detail and huge amount of data as google delivers. Thus, Google maps became my main source for locations and directions world wide. As such, I wanted to use it to get directions between places in Berlin, Germany. Apparently, Google’s software had some kind of hick up or whatever, though. They got the directions right but somehow I doubt the map is anyhow related to what I requested. See for yourself…Yes, yes, no software is perfect… but still :)

Since thousands of people seem to like RSA keys these days and my key is “old” anyways, I thought: how about running where the other lemmings run… So, here it is, my transition to a new gpg key. A properly written transition document is to be found here, obviously signed by both the old and the new key. I’d appreciate signatures if your signing policy allows (and you’re not insanely signing anything that looks like it could be signed).

Been playing with that thought for a while now, finally got to rebuilding it for lenny, now I’m using it… tmux is the new screen. To have fun already I read a few short introductions and got myself a few suggestions for a proper .tmux.conf. So, for root I have this one now:

Why ‘tmux attach’? Because tmux would start a new session which I don’t want it to. The config already starts a session which we can immediately attach to. Also, when such session was started I can attach to it as a user with the very same command over and over again. That makes it pretty handy as I always have htop, aptitude and a free shell available in a nice tmux session. Great. How did I live until now? ;-)

It’s pretty off topic for my blog since I usually only blog about technical stuff. But this is just great. Real life people having a real look at concerts of prominent and not-so-prominent musicians. And it’s all in German which is a nice thing since most of such stuff I have to find on English web sites (except the obvious German big press influence). Made me notice I missed the concert of Jamie Cullum — of course. But the article is quite nice and I definitely enjoy reading more of those. Have a look if you’re as keen on music as I am, or not. :)