Detecting OS and Window Manager

Darren Winsper dw133 at
Sat Jun 8 01:45:08 CEST 2002

In <3d00d248$1_1 at>, Daniel Fackrell wrote:

>> Well, I could attempt to see if something like "kdesktop" is running,
>> since if it is, the chances of running KDE are very high.  It's kludgy,
>> but I can't really think of anything else, since KDEINIT would be running
>> if a single kde application is running IIRC.
> If you're thinking of scanning the currently running processes for the
> existence of a particular process, then you won't get the results you want
> there, either.  The reason for this is that there can be multiple logins for
> a single user or multiple users, and KDE-related processes will exist if any
> one of those logins is running KDE, but not necessarily the current one.

Good point.

> Maybe import your kde module(s), and then try to do something KDE specific
> without KDE running and see what kind of error this causes so you will know
> what to trap for?

I don't believe there really is anything there you can do.  I certainly
don't know of anything in KDE that requires you to be running the KDE DE
to actually perform the command.  If there is anything, I'm fairly certain
it'll be a kludge and won't really be portable.

> Hopefully some other newbie (for a much less significant
> value of new, AKA expert) is still following this thread to give you a
> better answer.

Alas, I don't think there is an easy answer to this.  I think we'll just
have to either:
1) Settle for a default
2) Provide different commands such as gfunky and kfunky and just provide
menu entries to point to the appropriate one depending upon which DE you
are running.

ICQ: 8899775 Jabber ID: darren at
Stop the EUCD before it's too late:

More information about the Python-list mailing list