Friday, 24 November, 2000
Linux Desktop Programming
I continue my experiments in Linux programming. Understand that I'm mostly uninterested in systems programming. I'm writing user applications these days. Today I've been trying to create an application that will put itself on the task tray (or docking tray, or whatever they call it). So I found a KDE application (knotes) and copied the code that does that. Of course, that only works if I'm running KDE. I'll need an entirely different approach if I want the program to work under GNOME. And another set of code for Enlightenment. Egads.
Back in September I wrote an article for Dr. Dobb's called "The Failure of the Free Software Movement." In it, I said, "the GNU/Linux community has to agree on some standards. The most obvious case in point here is a desktop environment standard." Many readers took me to task for that statement, saying that the competition between GNOME and KDE is good for Linux, and moving to a single standard would end up stifling innovation. I remain unconvinced. With the current state of affairs, it's very difficult (maybe impossible) to write portable code that interacts with the desktop. Libraries like Trolltech's Qt make some things easier, but these libraries are typically desktop agnostic—they talk directly to the X Window library—so there's no portable way to do desktop-related things.
My understanding is that there's no reliable way to determine which desktop is currently running. If that's true, then programs that do desktop-related things will have to be written specifically for each platform. Complexity is the price of flexibility. Is it possible that in this case the price is too high?