How to detect GNOME, KDE or * and start File Browser?
I want to detect whether my program is running under GNOMOE, KDE or other desktop environment and start File Browser respectively.
I don't have any idea on this (just began programming on Linux 3 months ago). Any suggestions and tips are welcome. |
Maybe check the environment variables ($WINDOW_MANAGER, $KDEDIR..)
see man 3 getenv for getting those (if you want to program it in C) |
I have come to think that I may want to use getenv.
The question now is which envvar should I check? I am using Fedora Core 3. Under GNOME session. there is a GNOME_SESSION_ID, but I am not sure if it exists for all GNOME session. Can any one check this for me if you are running KDE: set|grep -i KDE and tell me what the output. |
All times are GMT -5. The time now is 04:44 PM. |