Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I need to find out (using a Shell script/ C program), whether GNOME or KDE is running as the current Desktop manager. Is there a way to accomplish this? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2005
    Posts
    6

    How to findout whether GNOME or KDE is running


    Hi,

    I need to find out (using a Shell script/ C program), whether GNOME or KDE is running as the current Desktop manager.

    Is there a way to accomplish this? There are some environment variables specific to these ( for example GNOME_DESKTOP_SESSION_ID and GDMSESSION), but I am not sure about the significance of these variables and whether they will always be set with some value?

    Will appreciate any thoughts/help on this.

    Thanks.
    Basu.

  2. #2
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908
    You get the process if it's running..
    Code:
    ps aux | grep -E "kde|gnome" | grep -v grep
    That will probably work.
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •