Hai, though i am 70% confirmed in using GNOME environment, but bit doubtful regarding, “Whether iam using Gnome or Kde desktop environment in Fedora 14”
To check it, did a bit surfing and confirmed with GNOME.
You can verify it using gui or terminal
Using GUI:
On Fedora, form the top panel click on System -> About this Computer. Now you can see GNOME or KDE with its version number
On Ubuntu, you can find directly as System -> About GNOME or System -> About KDE
Using Terminal:
Type the following command in the terminal.
echo $DESKTOP_SESSION
You can see the output as gnome (if gnome present) or kde (if kde present)
Click here for the source 🙂
Thanks for this, I can not edit my .bashrc to call the appropriate terminal emulator for the desktop that I am using at the moment!
Not really sure this would work in all cases. Under Ubuntu 12.04, result of the command is “Ubuntu” and not Gnome or KDE…
It gives me the session manager’s name, in my case lightdm.. And, before using lightdm I have used kdm with Gnome DE.. Tomorrow I may run SLIM.
I would like to create a conky conf file that reads it.
This doesn’t work on Puppy Linux. Instead do env | grep DESK.
These 2 work for here (MATE over Linux Mint) …:
A) 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 a) from the main menu > Search box > hardinfo, or b) from the main menu > All applications > System Tools or Administration > System Information, or c) from the main menu > All applications > All > System Information, or d) from a terminal or console > hardinfo > Enter, or e) 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, …
B) In a terminal or console, 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
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 JWM returns /usr/bin/icewm-session (!! should be jwm-session, not?)
Sorry. I forgot:
-> in LXDE returns /usr/bin/lxsession (and more)
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”.
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).
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-).