Hardware Support in Linux (or, “plug it in and it works”)
I’m writing this from pico because a) uninstalling Dropline totally broke my system, and b) links/lynx doesn’t let me log into WordPress.
I read a great article in the Linux Journal a few days ago about hardware under Linux by Robert Love. Everyone knows that getting hardware to work under Linux is not fun. I know myself because I have a very hard time getting my PCMCIA Belkin Wireless card to work every time I recompile my kernel–it drives me nuts!
In the article, Robert talks about a “Hardware Utopia” in which you plug in your digital camera and you’re asked if you want to download photos, you put a DVD into your CD/DVD drive, and it starts playing, or you plug in a USB Memory stick and it is automatically mounted and opened in Nautilus/Konqueror.
Now, doesn’t that sound great? It would be even better if it was true, right? That’s the best part? It is! Now, you’re going to say “No, it’s not–my Linux box doesn’t do that!” You’re probably right, it doesn’t. You need a 2.6 Kernel, HAL, DBUS, and Gnome 2.10. It’s too bad that I’m on a 2.4 kernel with KDE 3.4.
But still, it was pretty cool the way it works. You plug in a USB device, HAL uses DBUS to notify everyone that a device of a certain type was plugged in, and gnome-volume-manager then picks up the message and interacts with the user (e.g., starts playing a CD, downloads photos from your digital camera, etc).
After Dropline gets removed from my computer (and after I get some more spare time), I plan to try and port gnome-volume-manager to KDE. I realized that if I wasn’t going to fork the code base and create an independent “kde-volume-manager” I would need to be some easy and clean way to start the proper program based on what Desktop Environment was running.
My idea was to create a library that would return the proper application to run to handle using a device. For example, when a DVD is inserted, the program would call get_application_handler(”play-dvd”). If Gnome was running, the library would return “/usr/bin/totem dvd:/”. If KDE was running, it would return “/opt/kde/bin/okle /dev/dvd”.
The only problem with what I described there is that it isn’t very flexable. You can’t set your own favorite handlers. The solution: Have users define their own profiles. You create your profile by dragging-and-dropping .desktop files to a GUI or by editing a XML file. The library then uses your profile when a) it is selected to be the default, or b) when a shell command returns true. For example, in the KDE profile, the command would be `ps ax | grep -cs “[ ]kwin”` (returns true if KDE is running).
The advantage of having a library like this is that suddenly GNOME and KDE applications will standardize their configuration on preferred application handlers. The important thing to remember is that this is not a replacement for the MIME-type database! It is, however, a replacement for `gconftool-2 -g /desktop/gnome/url-handlers/http/command` (replacement: get_application_handler(”http”)) and the like.
Any comments on this? It might be a pipe dream, never to come true–but if anyone is interested in helping implement this please drop me a line and we can discuss it more. ![]()
September 19th, 2005 at 12:59 pm
Isn’t there something like that in FreeDesktop? If it isn’t, it would be nice to post this idea there since this is the more likely place to find help (after all these are the guys more interested in this right?
September 19th, 2005 at 2:53 pm
Hi Elio!
Hmm…I didn’t think to look there. Are you talking about Elektra? That does seem to be similar to what I’m after, although I have no clue how it would work. I’ll have to play with it.
Thanks for the idea!
–
Taj
July 21st, 2008 at 10:06 am
[gel]…
Although the world is full of suffering, it is full also of the overcoming of it… [ ǂ]…
September 13th, 2008 at 5:41 am
[global domains international]…
However, times have changed and click fraud is no longer a serious problem. Google now shuts down any Adsense account suspected of‘ invalid clicks’. This is bad news for the Adsense site owners who can now be put out of business by any bored visito…
December 25th, 2008 at 12:35 pm
Jim Spence…
I can’t believe that I missed your point, I will have to do some research on this….
January 5th, 2009 at 8:04 am
pro extender device…
This enables authors to keep track of who is linking to, or referring…