
Originally Posted by
ClaudeMartin
There is $DESKTOP_LAUNCH on OpenSuse but not on other systems. I think i'll use this if it is set.
Could be something, in my session it says:
Code:
henk@boven:~> echo $DESKTOP_LAUNCH
kde-open
henk@boven:~>

Originally Posted by
ClaudeMartin
But even for that there is no standard. How do I know on what DE I am?!
That is a good question. I assume you mean you want to detect this from a script and not from taking a glance at the screen.
The above $DESKTOP_LAUNCH may do somethiing, but, like you, I do not know if it is an openSUSE only trick or not. Is that script running as root, or as the user? A ps with some nice options and a grep for the user might give a clue. I think for kde when /usr/bin/kde is running for that user you have something. But the user may be logged in several times with different DEs! Looking inside the environment. In my session:
Code:
henk@boven:~> env | grep KDE
KDE_MULTIHEAD=false
KDE_NO_IPV6=1
KDE_FULL_SESSION=true
KDE_SESSION_UID=500
henk@boven:~>
But you have to search for hints about a user session using Gnome, Xfce, fvwm, .......
The user may be stupid, but when he wants something to be run he will choose his own environment. Linux is about choice.
Bookmarks