LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to detect GNOME, KDE or * and start File Browser? (https://www.linuxquestions.org/questions/programming-9/how-to-detect-gnome-kde-or-%2A-and-start-file-browser-311381/)

neo_in_matrix 04-09-2005 08:13 AM

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.

keefaz 04-09-2005 03:14 PM

Maybe check the environment variables ($WINDOW_MANAGER, $KDEDIR..)

see man 3 getenv for getting those (if you want to program it in C)

neo_in_matrix 04-09-2005 03:50 PM

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.