Detecting that a program is running under KDE?

Kevin Krammer kevin.krammer at gmx.at
Mon Nov 28 11:34:24 GMT 2005


On Friday 25 November 2005 16:25, Jes Hall wrote:
> On Saturday 26 November 2005 02:22, Erik Forsberg wrote:
> > Hi!
> >
> > I have a program that needs to detect which desktop environment it's
> > running under. I'm happy if I can detect either Gnome or KDE.
> >
> > Are there any KDE-specific enviornment variables or similar that I can
> > depend on, and that only exists in KDE?
> >
> > Ideally, I'd like to be able to use the same mechanism for detecting
> > KDE 3.2 and up.
>
> You could try looking to see if $KDE_FULL_SESSION is set. This is set to
> true at KDE startup in KDE 3.2 and upwards IIRC.

For GNOME you could check for
GNOME_DESKTOP_SESSION_ID

Cheers,
Kevin
-- 
Kevin Krammer <kevin.krammer at gmx.at>
Qt/KDE Developer, Debian User
Moderator: www.mrunix.de (German), www.qtforum.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde/attachments/20051128/4ab18432/attachment.sig>
-------------- next part --------------
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


More information about the kde mailing list