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.