Archive for March, 2007

On why I wrote pommed

Monday, March 5th, 2007

Wouter asks why I wrote pommed instead of patching pbbuttonsd.

First things first, pommed was originally named mbpeventd and targeted only at the MacBook Pro and MacBook laptops. The port to the PowerBook and iBook (which is what Wouter uses, I think) wasn’t a goal at first.

pommed handles the hotkeys events and the ambient light sensors (if available) and that’s it. Nothing more. pbbuttonsd does a lot of other things that other pieces of software can handle far better than it does. I never ran it on my PowerBook and stuck to pmud; it did just what I needed it to do, and it did well. The kernel handled the LCD backlight all by itself, and I had no need for either the volume +/- keys or the eject key.

When I got my MacBook Pro, I took a look at the various ways to get the hotkeys to work. Well, nothing worked. I discovered that pbbuttonsd was also available on i386/amd64 and gave it a try. IIRC I had to build it on amd64, and the Makefile already raised a couple of mental flags. But oh well. Then I tried to configure it, and discovered a gazillion configuration options, half of them unneeded.

Anyway, I got to the point where it would run, and obviously there was some patching to be done to get it to play nice with the MacBook Pro. To put it simply: looking at the code made me cry. It’s horrible. Incredibly complicated and obfuscated for no good reason. At that point, patching was out of the question. Moreover, I never liked pbbuttonsd that much, for various reasons, ranging from its “let’s do everything!” policy to its SHM interface for the GUIs (come on, that’s the 21st century knocking at your door).

So, in a nutshell:

  • it’s a nightmare to configure
  • it does a lot of things that I do not want it to do
  • I really can’t look at that code for more than 30 seconds without yelling at it
  • it’s faster to just write something new from scratch than to clean up pbbuttonsd
  • DBus looked like a nice thing to play with, and this was an opportunity to give it a shot

I really like the KISS approach and the traditional UNIX way of doing things, so I tend to dislike most one size fits all software.

It took me, what, 2 hours to build the first version of mbpeventd which handled the LCD and the keyboard backlight. That’s all the features I needed, past that point everything else was just pure bonus.

As for the name… mbpeventd really sucked as a name, and it wasn’t a good name anymore once the PowerBook support got added. I did not want to go with something like “appled” because I did not want to use the name “Apple”, but that was the closest match. Then I thought “hmm, why not … translate it … pommed? … sold!”. The name is funny for both Corsac and I because it’s a fortune cookie from one of the IRC channels we’re both hanging on; as it happens, the fortune is about Apple hardware and how users can get lost with a one button mouse.

So, why use pommed? Use it if you want something lightweight, fast and simple which won’t try to do everything for you. And you can even patch it and send me the patches!

DPL elections 2007: candidates at a glance

Sunday, March 4th, 2007
  • Wouter Verhelst: No idea of what he’d do once elected. Asking for carte blanche?
  • Aigars Mahinovs: Half of his platform has nothing to do with Debian. The other half is on crack.
  • Gustavo Franco: Some good ideas, but looks like he had trouble thinking his platform through.
  • Sven Luther: Should have published his platform on time.
  • Sam Hocevar: Lots of good ideas, competent, brilliant and funny. Couple of ideas I am not entirely comfortable with, but I can probably live with that.
  • Steve McIntyre: Current 2IC. Nothing new. Unimpressed.
  • RaphaĆ«l Hertzog: I fear he could rm -rf the Project. Definitely needs a DPL hand-holding team. Doesn’t like ponies.
  • Anthony Towns: No ambition for Debian. Lots of ambition for himself and money. Go away.
  • Simon Richter: Empty platform. One more candidate, triggers interesting issues in devotee.
  • NOTA: Great platform! Would make a perfect DPL.

pommed v1.2: all your G4 laptops are belong to us

Saturday, March 3rd, 2007

[The title of this post is an obvious reference pretty much everybody should get by now, if you don't get it, well, Google is your friend]

Here it is, pommed v1.2 brings a couple of bugfixes, enhancements, changes and support for more machines:

  • The PowerBook5,5 has an ADB keyboard, not a USB one
  • Added support for all the G4 laptops, please test and report any problem
  • Tell DBus clients who is adjusting the keyboard backlight level so they can discard the notification if it’s not the user
  • Added support for mouseemu
  • Turn off the keyboard backlight when the lid is closed
  • Rework the automatic keyboard backlight, the keyboard backlight off key now acts the same way it does on Mac OS X
  • Configuration file for gpomme, ~/.gpommerc (timeout and theme)
  • New theme for gpomme, KStyle, for KDE users

The configuration file syntax has changed for the PowerPC users, it’s a bit more simple now :-)

The DBus notification for the keyboard backlight brightness has changed too, so you need to kill and restart any running gpomme or wmpomme, and you must use the versions that ship with pommed v1.2.

Still missing: configuration GUI for gpomme. Patches welcome, I’m not that much into GUI stuff any more so I don’t really feel like doing it myself.