Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-15-2009, 07:50 AM   #1
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, 01:10 PM   #2
Registered: Apr 2009
Posts: 108

Rep: Reputation: 24

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:
lsof | awk '/ksmserver|gnome-session|xfce-mcs-manage/{
for ( p in processes ) print p, processes[p]
# 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 03:39 PM.
Old 04-16-2009, 12:54 AM   #3
LQ Newbie
Registered: Apr 2009
Posts: 3

Original Poster
Rep: Reputation: 0



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

All times are GMT -5. The time now is 04:37 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