LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-15-2009, 08:50 AM   #1
munsingh
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Rep: Reputation: 0
Question Detecting the current Desktop manager KDE or GNOME


In shell script how do I find which is the currently set Desktop Manager, i.e KDE or GNOME?
 
Old 04-15-2009, 02:10 PM   #2
maresmasb
Member
 
Registered: Apr 2009
Posts: 108

Rep: Reputation: 24
From http://ubuntuforums.org/showthread.php?t=652320:

Check what processes are running. KDE will run ksmserver, GNOME will run gnome-session, and Xfce will run xfce-mcs-manage.

If you have the 'lsof' tool installed:
Quote:
lsof | awk '/ksmserver|gnome-session|xfce-mcs-manage/{
processes[$3]=$1
}END{
for ( p in processes ) print p, processes[p]
}'
otherwise
Quote:
# ps -eo user,args|egrep "kcmserver|gnome-session|xfce-mcs-manage"
You can also check the $DESKTOP_SESSION variable, though that one is likely to return 'default' if the default desktop is used.

Last edited by Tinkster; 10-30-2010 at 04:39 PM.
 
Old 04-16-2009, 01:54 AM   #3
munsingh
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Smile

Thanks.
 
  


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
Slackware 12.2(current) + KDE 4.1.96 + Xinerama = No Desktop Effects frandalla Slackware 3 01-29-2009 11:22 AM
KDE 3.2.3 Print Manager not detecting printer? m_lp_ql_m Linux - Hardware 0 08-23-2004 10:58 PM
How do I exit Gnome desktop manager? BliZZrdLiZZrd Linux - Newbie 4 03-13-2004 09:30 AM
Graphical file manager for non KDE/Gnome desktop Hex29A Linux - Software 8 01-05-2004 12:28 PM
setting gnome as desktop manager dzt Slackware 2 10-28-2003 01:17 AM


All times are GMT -5. The time now is 08:19 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration