indexwritingsjournal › 2012

grawity's journal

Looking back

New posts here are rare. I'm not much of a writer – more of a tweeter – and whenever I touch this website, it's mostly just to fix some tags or to try out minor CSS adjustments. The oldest entry in this website's Git history is "Initial commit, discard history". One year later, this looks like the most phenomenally stupid thing I've ever done to my data, and I couldn't find any backups either... Once, I considered importing snapshots from times from, but they were horribly incomplete – and of course lack the PHP sources, however minimal.

At one time, I got tired of repeating the same <html> <head> and wrote a PHP thingy that just parsed Jekyll/Liquid-style headers. Other than that, the website never grew much beyond a pile of static, hand-written HTML files. (I'm a cheapskate and mostly use "shell" servers my Internet friends have paid for, so being able to quickly move the website to a different server became useful more than once.) There have been several attempts at making this page auto-generated; first using Jekyll (didn't last long), then a custom Perl script using Text::Template, which I later ported to Ruby and erb. (The ERB script made it easy to add an Atom feed, which meant I couldn't call the blog "Not a blog" anymore.)

Lately, I've been reading about Semantic Web again, so almost half of the commits in this website's truncated history are updates to my Webfinger profile, FOAF card and other miscellaneous junk. I'm not sure anyone still takes those things seriously – although Google sort-of did, with its Social Graph API – but nowadays, probably the only similar thing is Facebook's "Open Graph" API, which handles the same information as FOAF but limited to Facebook members.

But all this is pointless if the website doesn't contain anything useful to others. So far, I only have three serious articles – one about the "startkeylogger" bug, another about Bluetooth and dual-booting, and a quite outdated page about GNOME Keyring. They do get a visitor every now and then; even from such odd places as (if Google Webmaster Tools is telling the truth). The posts in this blog/journal/thingy consist mostly of stories, rants, and some horribly outdated ConsoleKit troubleshooting tips. I never get around to cleaning them up, though. Most of my "useful" writings are in the form of Super User answers.

Answering computer questions is how I've spent most of my free time – first on various local forums, later on Usenet and mailing lists; currently on IRC and Super User. I've lost count of messages I wrote, questions answered, and problems solved. Some even say "thanks". I learned a lot myself, too – how to set up multi-master mirroring for Cluenet's OpenLDAP servers, how to store a Kerberos database in LDAP, how to set up NFSv4 with Kerberos, and so on.

After Cobi and Crispy – the network's founders – left Cluenet for the real world, I also had to learn how to untangle messy PHP code and messy rules & policies. The website is still ugly PHP + ugly Smarty. (I already removed much of the old cruft; three identical installations of MediaWiki; various code for a "redundant cluster", which only ever had one server.) The mail still doesn't work; the domain was configured for Cobi's Google Apps because running Postfix was "too much trouble" or something.

The signup process is still horrible – much of the bureaucracy is so unnecessary for such a small network, it scared away quite a few new users. New people never stay for long. Maybe one day it'll be better.

I haven't had much of a taste of the "real world" myself. I somehow managed to get into a local college, and even survived the first year. The second year is going well, so far – but I'm much too lazy to actually do any assignments, too much of a geek to go out with friends, too much of a loner to have friends. The various mood disorders I'm having do not help either. In a way, they're the cause and effect at the same time.

I still keep listening to music and hacking away at Linux command line, but even that has become a bit boring. I've taken to reading various stories on and other similar sites, or just daydreaming – creating my own fiction. Reading about the lives of others lets me forget about having no life of my own; it's an escape.

I still keep on living. Maybe one day it'll be better.

Why D-Bus is awesome

D-Bus is a relatively recent IPC system, replacing DCOP, Bonobo, and various hacked-together Unix socket protocols. It is still considered by some to be "bloat", but has quickly gained popularity nevertheless – mostly among GUI applications, though, but also in use by various system components; for example, both Upstart and systemd init systems are controlled over D-Bus.

One of the most useful applications of D-Bus is the MPRIS specification, which has no equivalents in other environments so far. Originally written by the VLC team, now part of, MPRIS is an interface specification for controlling media players over D-Bus. It defines the common "play", "pause", "seek" and other such commands, allowing any compatible player to be controlled with a single program – and there are many compatible players; one list counts as many as twenty, with MPRIS support being a common wishlist item for the others.

Screenshot – GNOME 3 Media Player Indicator
GNOME 3 "Media Player Indicator" extension

All of this means that instead of having twenty different commands to skip to the next song, or twenty different desktop applets, there only needs to be one (for example, the popular extension for GNOME 3 or my command-line utility), reducing the time needed to add support for the Awesome New Player of the Week.

IM clients are able to easily set the user's status to the currently playing song by any player implementing MPRIS, and even Ubuntu for their Sound Menu have switched to just being a MPRIS client in Natty, instead of Ubuntu's custom "Ayatana" protocol in earlier releases.

Unfortunately, not all players support MPRIS v2 yet – some only do the older and clunky v1, others are stuck with custom D-Bus interfaces or different IPC systems. (For example, mpd requires a bridge client that acts as a MPRIS service, although this is understandable for a player aiming to be network-transparent.) Buggy and/or incomplete implementations are also common; I spent some time recently fixing BeatBox and the Exaile plugin.

MPRIS itself is still somewhat minimal in an attempt to be easy-to-implement with any media player, so it still lacks such niceties as playlist management (although a play queue is supported) or changing of song ratings. For this, many apps still implement their custom D-Bus interfaces next to MPRIS.

These problems become relatively minor, however, once one realizes that there is no alternative at all – on Windows, only few such programs can be controlled using documented interfaces, while most of the time it is reduced to sending fake keypresses and button clicks with AutoHotKey, or even reading title-bars just to determine the current song, as I have noticed done by a Pidgin plugin to interface with foobar2000. Winamp was possibly one of the first to have good IPC support (based on Win32 messages) as part of its extensibility, but it might as well be the only one.

Screenshot – D-Feet introspection tool
D-Feet introspection tool

While remembering Winamp, something certainly could be written about the introspection feature of D-Bus – being just another interface with only a single method, it allows browsing supported D-Bus methods or properties in almost any D-Bus service. (The bindings for Perl and Python automatically implement the "Introspectable" interface, but even in C it is done almost always.) It is much easier to experiment with a system browsable in such tools as D-Feet than with one that requires reading a long list of numerical messages and their meanings (as with the Winamp WM_COMMANDS).

Gmane – how all mailing lists should work

Recently I discovered Gmane, a mailing-lists to NNTP gateway. It turned out to be the solution to several of the biggest annoyances I've had with mailing lists so far.

Gmane allows all mailing lists to be accessed using a standard protocol, NNTP, which provides a consistent interface instead of having to deal with five different web-based management and archive sites (Mailman, Pipermail, MHonArc, etc., etc.). I can tell my newsreader to kill uninteresting threads and highlight others, and even post replies to the "newsgroup".

Over NNTP, it's also easy to access archived messages, even those sent before subscribing to the list, in their original RFC*822 format instead of pipermail's heavily-filtered HTML archive. With my newsreader (Thunderbird), I can even make copies by dragging & dropping interesting messages to an IMAP folder, with their original headers and everything. Very few (in fact, close to none) web-based list archives offer "raw" or "mbox" versions.

The only downside is that Gmane mangles email addresses in the majority of lists, causing PGP signatures to be broken. But I suppose that's the cost of having publicly accessible a giant archive of email messages.


year 2011

year 2010

year 2009