-   Linux - General (
-   -   which desktop environment (

bendeco13 04-12-2005 06:18 PM

which desktop environment
Does anyone know of a typical command that outputs the active desktop environment like kde or gnome?
I googled around and couldn't find anything.

Thanks in advance

MACSRULE 04-12-2005 06:22 PM

depending on your distro, check the .xinitrc file in your home folder. that will show which wm is running

bendeco13 04-12-2005 06:26 PM

I couldn't seem to locate this file, but I'm wanting to add this command to a script, so it would be extremely beneficial if there was a command to output the desktop environment, but if theres not one, I could always have the script search for the file and then read its contents.

bendeco13 04-12-2005 06:46 PM

I could possibly use:

TEST=`ps -ax | grep "kdesktop"`
if [ "$TEST" ];

if checking for kde.
but what would I use for gnome?

All times are GMT -5. The time now is 12:02 PM.