Detecting OS and Window Manager

Sean 'Shaleh' Perry shalehperry at
Wed Jun 5 21:01:06 EDT 2002

On 05-Jun-2002 Andrew Wilkinson wrote:
> Thanks for all the replies guys.
> Basically I want to have a program that hides itself in the taskbar of
> whatever the user is running. Unfortunately there isn't (or at least I don't
> know of) a portable way of doing this. I guess I'll just have to mess around
> with looking for the environment variables and then code it up for
> KDE/Gnome/whatever.

environment variables won't help you, they are not guaranteed.  Also, even if
the user is running parts of GNOME/KDE they may not have a panel running.

Do you care if they see your window?  If not perhaps you could just ask for it
to be iconified.  If you do care your best bet is to read about about "netwm"
a quick google search should help.  This is the mechanism for inter client
talking in KDE, GNOME and other desktops.  Using this you can make your app as
a taskbar/panel style app and if they can accept it they will otherwise it gets
treated like any other window.

Blackbox maintainer

More information about the Python-list mailing list