I am trying to detect whether I am running on a Gnome or KDE desktop environment.
I know I can check via a ps -aux and grepping either gnome or KDE but that's not good: 1) what if I am on a gnome desktop but I have the KDE libs loaded? 2) I need to do it from code without using system() or popen() or other fork/exec combination.
I can read files, or env. variables or whatever.
Any ideas?
thanks, any help is appreciated.
At least on Opensuse there are the environment variables WINDOWMANAGER, WINDOW_MANAGER
eike@lixie:~> echo $WINDOWMANAGER
/usr/bin/startkde
eike@lixie:~> echo $WINDOW_MANAGER
/usr/bin/startkde
eike@lixie:~>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With