How do I check whether I am using KDE or Gnome?

56

36

or maybe something else?

I am using Redhat OS.

Lazer

Posted 2010-01-15T09:54:12.987

Reputation: 13 841

1done :) I'd also wish the OP had pointed out what version of redhat he's using, since unless its RHEL, there hasn't been a redhat release in ages – Journeyman Geek – 2010-01-15T13:27:47.337

Answers

21

Have a look at your installed applications. If a lot of them start with K - you're on KDE. If a lot of them start with G, you're on Gnome. Seriously. (Not very accurate if you have both installed though).

If you go to the About page of your computers settings panel, that should give you some clues.

Alternatively, look around on Google Images for screenshots of Gnome or KDE. It should be obvious once you have seen the basic look of the desktop environment.

Iain

Posted 2010-01-15T09:54:12.987

Reputation: 4 399

5Since you can have both Gnome and KDE installed on the machine, and have access to both sets of programs in your menus, the first suggestion is not a foolproof method. The About panel is most likely the useful answer. – Shannon Nelson – 2010-01-20T08:34:42.113

96

Open a terminal and type:

echo $DESKTOP_SESSION

NewGuy220

Posted 2010-01-15T09:54:12.987

Reputation:

6Mine just says 'ubuntu', when sending this command :/ – josh.thomson – 2015-01-20T09:29:43.793

The only noticible difference after installing gnome, was the the button in the top right corner changed from an (X) to a little computer with a blue screen, that's all I can see, I've checked the 'About this Computer' option, but no mention of gnome – josh.thomson – 2015-01-20T09:30:57.500

I've found my answer to be more reliable on a variety of different systems - I recommend finding my answer below and checking it out. Let me know if it works for you or not. – Violet Giraffe – 2016-01-03T13:23:06.687

1I have only ubuntu in this variable.. – Szymon Roziewski – 2017-10-31T10:46:56.687

works for CentOS. On Debian it shows only default – chriscatfr – 2017-11-26T12:11:04.807

$DESKTOP_SESSION is not defined/set at all. – René Nyffenegger – 2018-03-14T06:59:51.907

11doesnt work for all cases.. i have ubuntu 12 and the above command gave just "ubuntu" as output. the command given by @Shannon Nelson worked. – Tejas Patil – 2012-12-20T07:36:40.553

it works in my Ubuntu 12.10 KDE – Felipe Alcacibar – 2013-03-14T22:01:22.567

3l1zard@Marvin:~$ echo $DESKTOP_SESSION results in default which is not very useful – l1zard – 2013-04-16T17:27:28.210

2This is the best answer. – daxim – 2010-01-15T18:49:17.030

26Not always true, as for someone could be just "default" – dag729 – 2010-01-18T00:55:52.693

38

I'll show you a short selection and description of the most common desktop environments.

Unity

Unity

Unity is developed by Canonical. It has a bar at the top which contains the clock at the right and a button on the left which will bring up a search/menu window. There's a launcher on the left of the screen.

The default theme colors are purple/orange/brown.

The logo is the same as the Ubuntu logo.

Gnome 3

Gnome 3

Gnome 3 is the third iteration in the Gnome desktop environment. It features a bar at the top with a clock and a menu button on the left which will bring up a fullscreen window containing most applications.

The default theme is rather dark with much black in the general elements, but the windows are light gray.

The logo is a foot. with four toes.

MATE (a fork of Gnome 2)

MATE

MATE is a fork of Gnome 2. It features two bars, one on the top of the screen, one at the bottom. The top one contains the main menu (dropdown with three items, Applications, Places and System), some starters and the clock on the far right. The lower bar holds the window list and the desktop switcher. Unlike the first three it has icons (Computer, Home, Trash and also removable media) on the desktop in the default configuration. An about dialog might be found in the System menu.

The default theme is a light theme with either green or blue accents.

The logo are two circles with an arrow intersecting them.

XFCE

XFCE

XFCE has always been seen as the small brother of Gnome 2, but it shouldn't be called that. It is very similar to MATE/Gnome 2 and might easily be confused with the two. The default configuration is similar to MATE/Gnome 2 except that the menu in the upper bar is only an icon, but is similarly structured.

The logo is a mouse.

KDE

KDE

KDE is one of the oldest desktop environments. It features a bar at the bottom of the screen which contains the main menu (as icon), the window list and a clock. The main menu is a big dropup menu sorted in categories.

The default theme is very light and looks like polished glass.

The logo is a "K", sometimes a dragon.

Cinnamon

Cinnamon

Cinnamon is heavily based on Gnome 3. It features a lower bar similar to KDE, as it contains the menu button, the window list and the clock. The main menu is also a dropup with categories.

The default theme is very greenish.

Others

Luckily, there are a lot more desktop environments out there, but this should give you a quick overview over the most commonly used ones.

Bobby

Posted 2010-01-15T09:54:12.987

Reputation: 8 534

The Gnome 3 screencap is not the desktop but the equivalent of the start menu. Showing the desktop with a terminal open on all the screencaps would perhaps allow better comparison. – Xalorous – 2018-01-24T14:19:03.473

Wikipedia also has a gallery of several desktop environments, check it out if you want to identify your DE this way.

– Fabio says Reinstate Monica – 2018-05-16T09:40:10.537

4Downvoted - not because it's a bad answer (it's not) but because the screenshots are increasingly out of date. The command line alternatives are better. – Andrew M – 2014-05-14T12:32:07.443

@AndrewM: True...though, I'm not sure if I should update it or expand it to something more generic...but doesn't get better than the other answers. I'll expand it for the time being and update it... – Bobby – 2014-05-14T17:54:00.387

great edit - downvote reversed. Is it worth explaining the relationship between Unity and Gnome? – Andrew M – 2014-05-15T14:05:00.667

@AndrewM: What realationship do you mean? That they both are using Gtk3? Or the love/hate between them? By the way, no worries about downvotes on my posts, downvotes are not negative in my opinion. – Bobby – 2014-05-15T17:15:10.530

I thought Unity was Gnome (just a veneer on top)? I'm on unity and a lot of the other tests suggested on this question show up as Gnome (eg "ls /usr/bin/session" and the ps | grep style ones). I'll read up a bit as it's interesting. – Andrew M – 2014-05-19T14:06:06.040

@AndrewM: Well it uses the same programs for the most part, and partly even the same stack. So, kinda. – Bobby – 2014-05-19T21:44:20.850

22

Quick way #1: if you have a "System" menu entry on the top line, and there's an item in the menu that says "About Gnome", you're probably running Gnome.

Quick way #2:

ps -ef | grep gnome

Shannon Nelson

Posted 2010-01-15T09:54:12.987

Reputation: 1 287

What if the user is editing his autostart settings, using gnome-session-properties? Or if another user is logged in at the same time, but in a Mate session? – basic6 – 2015-11-21T20:54:03.760

5Shorter version: pgrep -f gnome – Demi – 2013-10-27T23:04:21.793

19

I use echo $XDG_CURRENT_DESKTOP

Not sure if it's a 100% working solution on every imaginable Linux distro, but proved to be good enough so far.

Violet Giraffe

Posted 2010-01-15T09:54:12.987

Reputation: 822

Agree with @AndrewM, the other command-line solutions give gnome but I am running Unity and this works for me. – melston – 2017-06-17T15:31:37.147

Useful for future googlers - returns "Unity" on ubuntu 13.10 (not gnome) – Andrew M – 2014-05-14T10:35:50.773

@AndrewM: makes sense to me, Unity isn't exactly Gnome. And thanks for the info! – Violet Giraffe – 2014-05-14T12:19:36.037

15

I've tested the best tools I've found with

  1. GNOME under Linux Mint installed;
  2. GNOME under Linux Mint Live USB;
  3. MATE under Linux Mint;
  4. LXDE under Lubuntu;
  5. JWM under Puppy Linux (JWM is not a desktop environment but a stacking window manager).

My results:

  1. (so-so)
    env | grep DESKTOP_SESSION=

    1. DESKTOP_SESSION=gnome
    2. DESKTOP_SESSION=gnome
    3. DESKTOP_SESSION=default.desktop
    4. DESKTOP_SESSION=Lubuntu
    5. (nothing)
  2. (so-so)
    echo $GDMSESSION

    1. gnome
    2. gnome
    3. (nothing)
    4. Lubuntu
    5. (nothing)
  3. (well, but not perfect)
    pgrep -l "gnome|kde|mate|cinnamon|lxde|xfce|jwm"
    ps -A | egrep -i "gnome|kde|mate|cinnamon|lxde|xfce|jwm"

    1. (OK)
    2. (OK)
    3. (OK)
    4. (WRONG)
    5. (nothing) & (OK)
  4. (very well, but not perfect)
    HardInfo

    1. (nothing);
    2. GNOME 2.32.0
    3. MATE
    4. LXDE (Lubuntu)
    5. Unknown (Window Manager: JWM)

CONCLUSION: A combination of HardInfo and the command

ps -A | egrep -i "gnome|kde|mate|cinnamon|lxde|xfce|jwm"

probably will give the desired answer.

Madiue

Posted 2010-01-15T09:54:12.987

Reputation: 151

What is 'HardInfo' ? – Sopalajo de Arrierez – 2014-12-07T00:17:14.207

Hmm, what exactly are we looking for in the output?

I've got "gnome-keyring-d", "xfce4-volumed" and "kdeinit4". Some of this stuff will have been installed as dependencies. I'm not sure which of these is my main desktop environment. – AnnanFay – 2015-05-25T14:30:48.040

why do you cross-post instead of linking the second response ?

– ssc – 2017-05-17T08:01:29.723

4

This command seems to be useful:

ls /usr/bin/*session*
  • in GNOME returns /usr/bin/gnome-session (and more)
  • in MATE returns /usr/bin/mate-session (and more)
  • in LXDE returns /usr/bin/lxsession (and more)
  • in XFCE returns /usr/bin/xfce4-session (and more)
  • in JWM returns /usr/bin/icewm-session (should be jwm-session, not?!)

Jesdfa

Posted 2010-01-15T09:54:12.987

Reputation: 49

this gives me /usr/bin/byobu-select-session /usr/bin/dbus-run-session on a server system with no desktop environment installed at all – ssc – 2017-02-06T15:03:14.987

3It's not reliable because it only shows the installed session managers, not only the running one – and not all desktop environments actually have a matching *-session executable (as you noted for jwm), or any such program at all. – user1686 – 2013-04-15T01:01:59.163

4

This is a good command to determine your GUI:

pgrep -l "gnome|kde|mate|cinnamon|lx|xfce|jwm"

Takeysg

Posted 2010-01-15T09:54:12.987

Reputation: 41

2Look at my outputs for this command: kdevtmpfs, gnome-keyring-d, lxsession, lxpanel, xfce4-power-man, gnome-pty-helpe. I am running Lubuntu Desktop. – Sopalajo de Arrierez – 2014-12-07T00:37:03.427

3

  1. Open shell terminal/console
  2. Type below statement and push enter

printenv XDG_CURRENT_DESKTOP

  1. Environment variable XDG_CURRENT_DESKTOP tells, which desktop you have

Turgay Kale

Posted 2010-01-15T09:54:12.987

Reputation: 31

Doesn't work on RHEL 6. – Xalorous – 2018-01-24T14:15:38.747

1Sorry for that but this command works for me in Ubuntu 1x.xx. – Turgay Kale – 2018-01-31T18:24:14.440

2

A new user may not recognize the differences betwen KDE and Gnome in the screen captures above. Look at the position of the default panels (top with Gnome and bottom with KDE) not the color of the desktop or the apps that are open.

zstairlessone

Posted 2010-01-15T09:54:12.987

Reputation: 21

A late agreement. For a while RedHat was normalizing both Gnome and KDE to the Bluecurve theme, blurring the lines even more. – Rich Homolka – 2013-04-15T01:23:15.717

2

In a terminal or console, you can run:

pgrep -l "gnome|kde|mate|cinnamon"

or

ps -A | egrep -i "gnome|kde|mate|cinnamon"

The item that appears in more lines should be the answer.

Hadiesoe

Posted 2010-01-15T09:54:12.987

Reputation: 21

0

Install inxi and run inxi -Sxxx (or inxi -Sxx if your version of inxi isn't the latest):

$ inxi --version | head -1 && inxi -Sxxx                                                                                       
inxi 3.0.32-00 (2019-02-07)
System:    Host: kububb Kernel: 4.15.0-65-generic x86_64 bits: 64 compiler: gcc v: 7.4.0 Desktop: KDE Plasma 5.12.9 
           tk: Qt 5.9.5 wm: kwin_x11 dm: SDDM Distro: Ubuntu 18.04.3 LTS (Bionic Beaver) 
$ 

While installing inxi for just this purpose may seem overkill, inxi can be used to provide a lot more system information with inxi -Fxxxz (where -z masks stuff like your MAC address).

The homepage for inxi is here.


There's also neofetch which is a fork of screenfetch:

$ neofetch --stdout
dkb@kububb 
------------ 
OS: Ubuntu 18.04.3 LTS x86_64 
Host: Inspiron 15-3567 
Kernel: 4.15.0-65-generic 
Uptime: 8 hours, 58 mins 
Packages: 2389 
Shell: bash 4.4.20 
Resolution: 1366x768 
DE: KDE 
WM: KWin 
WM Theme: Breeze 
Theme: Breeze Dark [KDE], Breeze-Dark [GTK2], MyBreeze-Dark [GTK3] 
Icons: Breeze [KDE], Breeze [GTK2/3] 
Terminal: konsole 
Terminal Font: Hack 11 
CPU: Intel i3-6006U (2) @ 2.000GHz 
GPU: Intel HD Graphics 520 
Memory: 1665MiB / 7846MiB 
$   

The homepage for neofetch is here.

DK Bose

Posted 2010-01-15T09:54:12.987

Reputation: 201

0

You can run HardInfo. It's ready by default at least in Linux Mint; or you could install it (from Synaptic, ...).

You can run it:

  1. from the main menu > Search box > hardinfo, or
  2. from the main menu > All applications > System Tools or Administration > System Information, or
  3. from the main menu > All applications > All > System Information, or
  4. from a terminal or console > hardinfo > Enter, or
  5. from the Run Application dialog (Alt+F2) > hardinfo > Enter.

Once HardInfo opens you just need to need to click on the "Operating System" item and look to the "Desktop Environment" line.

Nowadays, apart from GNOME and KDE, you could find MATE, Cinnamon, ...

Hadiesoe

Posted 2010-01-15T09:54:12.987

Reputation: 21

0

I've been testing also with KDE and my conclusion is:

a) Graphical way, with HardInfo: the answer is normally in "Operating System" > "Desktop Environment", but if not you can look to "Environment variables". HardInfo is ready with all the tested distros, except the one with KDE, but it can be easily and quickly installed (only 2 packages in Linux Mint 13).

b) Command line, with this command:

ps -A | egrep -i "gnome|kde|mate|cinnamon|lx|xfce|jwm"

The item that appears in more lines should be the answer (if there is a draw the item with "session" should be the solution).

Msdfi

Posted 2010-01-15T09:54:12.987

Reputation: 1

Since it has been more than 3 years ...I guess, OP has either found the answer by his own or somewhere else or decided to drop whole idea. – JackLock – 2013-04-15T23:53:21.787

0

To know the version of the installed DE we can open Synaptic and put its name in the "Quick filter" box. Below "Installed Version" we have the answer. Next to it, below "Latest Version", we can see the highest to what we can update it to (at least if we have just clicked on "Reload" and considering only stable software -by default the access to the developing versions is usually disabled-). If instead of Synaptic the considered distro uses PackageKit or other a similar solution shoul be avaiable.

Nyuttref

Posted 2010-01-15T09:54:12.987

Reputation: 1

His question is about how to do this on RedHat OSes not Debian/Ubuntu! – slm – 2013-04-17T12:56:14.907

0

Just open up the System Help guide (usually under the "System" menu) and see what the title is!

Fuzzy Analysis

Posted 2010-01-15T09:54:12.987

Reputation: 121

-1

According to original post, the ideal solution for me (and hope someone else) is demonstrated with example:

which zenity  2>&1 >/dev/null && echo Have GTK
which kdialog 2>&1 >/dev/null && echo Have KDE

Because Mate and Cinemon are forks of gnome. It depends what you want to do lately. On Mageia linux you can have very easily both environments and also because of that script is written so.

TadejP

Posted 2010-01-15T09:54:12.987

Reputation: 124

-1

The sysinfo package will show you which Gnome / other you're using:

sudo apt-get install sysinfo
sysinfo

tellyman69

Posted 2010-01-15T09:54:12.987

Reputation: 1

-2

I have this function in my ~/.bash_aliases --

# open terminal function
open-terminal()
{
    # if gnome is running
    if [ $(pgrep -c gnome-panel) -gt 0 ]; then
            echo "running gnome"
            gnome-terminal
    # if xfce is running    
    elif [ $(pgrep -c xfce4-panel) -gt 0 ]; then
            echo "running xfce"
            xfce4-terminal
    fi
}
alias trm='open-terminal'

ramgorur

Posted 2010-01-15T09:54:12.987

Reputation: 179

It does not answer to the question and there are better alternatives for your open-terminal function: http://askubuntu.com/questions/207442/how-to-add-open-terminal-here-to-nautilus-context-menu/207448#207448

– air-dex – 2015-09-20T12:32:57.330

well, the link you provided does not relate to this question at all, my script identifies the session by checking what kind of panel the os is currently running, I do not see any problem with that. – ramgorur – 2015-09-21T23:02:17.107