LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 04-09-2005, 08:13 AM   #1
neo_in_matrix
Member
 
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
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,340

Rep: Reputation: 73
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
neo_in_matrix
Member
 
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.
 
  


Reply


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


All times are GMT -5. The time now is 06:14 PM.

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