as the title:
How can I find which desktop environment I am using?
I want to accomplish this using command line.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityas the title:
How can I find which desktop environment I am using?
I want to accomplish this using command line.
And you can try $DESKTOP_SESSION
for the DE.
gnome
, but it is ubuntu
, why?
Apr 25, 2012 at 14:38
This command seems to be useful:
ls /usr/bin/*session
/usr/bin/gnome-session
(and more)/usr/bin/mate-session
(and more)/usr/bin/lxsession
(and more)/usr/bin/icewm-session
(should be jwm-session, not?!)I've tested the best tools I've found with:
a - GNOME under Linux Mint installed
b - GNOME under Linux Mint Live USB
c - MATE under Linux Mint
d - LXDE under Lubuntu
e - JWM under Puppy Linux (JWM is not a desktop environment but a stacking window manager).
f - XFCE under Debian Buster
env | grep DESKTOP_SESSION=
(so-so)
a & b - DESKTOP_SESSION=gnome
c - DESKTOP_SESSION=default.desktop
d - DESKTOP_SESSION=Lubuntu
e - Nothing
f - DESKTOP_SESSION=xfce
echo $GDMSESSION
(so-so)
a & b - gnome
c - Nothing
d - Lubuntu
e - Nothing
f - xfce
pgrep -l "gnome|kde|mate|cinnamon|lxde|xfce|jwm"
or ps -A | egrep -i "gnome|kde|mate|cinnamon|lxde|xfce|jwm"
(well, but not perfect)
a & b - OK
c - OK
d - WRONG
e - Nothing & OK
f - OK
HardInfo
(very well, but not perfect)
a - Nothing
b - GNOME 2.32.0
c - MATE
d - LXDE (Lubuntu)
e - Unknown (Window Manager: JWM)
f - XFCE
A combination of HardInfo
and the command ps -A | egrep -i "gnome|kde|mate|cinnamon|lxde|xfce|jwm"
probably will give the desired answer.
DESKTOP_SESSION=default
so for me the answer from @Nadew above worked
Mar 27, 2019 at 9:21
env | grep XDG_CURRENT_DESKTOP
says what i need.
Aug 9, 2019 at 4:17
For the window manager you can use:
sudo apt-get install wmctrl
wmctrl -m | grep "Name:" | awk '{print $2}'
window manager
is a own issue compared to the desktop env
, please correct if I am wrong.
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
31 kdevtmpfs
, 2026 gnome-keyring-d
, 2201 polkit-gnome-au
, and I'm on xfce.
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, ...
sudo apt-get install hardinfo
on debian. It identified my desktop environment as XFCE 4.
Sep 13, 2018 at 12:59