Determine KDE or GNOME is running
Hi i need a simple way to determine whether KDE or GNOME is running. I am making an extension for Firefox and i need to run different programs depending on whether KDE or GNOME is running. I don't have access to any system variables in Firefox so it should be file based (see if a file is present or read contents of a file...). Currently i am checking if there is a file kdm.pid or gdm.pid in /var/run directory, but that really doesn't tell me anything as you can switch to gnome from KDM and kdm.pid will still be there.
I haven't been able to find anything in Google or this forum. But maybe i wasn't able to formulate correctly the search terms. If you can at least give me some pointers i'll be very grateful.
Thank you.
|