Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to findout whether GNOME or KDE is running


    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.


  2. #2
    Linux Engineer
    Join Date
    Apr 2005
    Buenos Aires, Argentina
    You get the process if it's running..
    ps aux | grep -E "kde|gnome" | grep -v grep
    That will probably work.
    "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