Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-09-2005, 08:13 AM   #1
Registered: Sep 2003
Posts: 52

Rep: Reputation: 15
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.
Old 04-09-2005, 03:14 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 5,390

Rep: Reputation: 409Reputation: 409Reputation: 409Reputation: 409Reputation: 409
Maybe check the environment variables ($WINDOW_MANAGER, $KDEDIR..)

see man 3 getenv for getting those (if you want to program it in C)
Old 04-09-2005, 03:50 PM   #3
Registered: Sep 2003
Posts: 52

Original Poster
Rep: Reputation: 15
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CD/DVD Drive don't work from File Browser Application in my KDE 3.3 over Debian PinRojas Linux - Newbie 1 06-07-2005 01:31 AM
Gnome File Browser (nautilus) deveraux83 Slackware 3 11-08-2004 07:29 AM
how do i start gnome and kde? sheepdogj15 Slackware 12 09-27-2004 09:04 AM
Firefox won't start: file /content/browser.xul cannot be found nimcha Linux - Software 2 05-20-2004 12:43 PM
KDE - Konqueror File Browser tarballedtux Linux - Software 5 04-25-2004 05:45 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:33 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration