How can I find which desktop enviroment I am using? [duplicate]
as the title: How can I find which desktop environment I am using? I want to accomplish this using command line.
@Pandya no, the values will be different, but on the duplicate it shows how to grab the value for both (And other examples for WM and DE).
@Lucio, not sure why this question was erroneously marked as a duplicate of a completely different question. Please read this question first and remove the duplicate question marker: askubuntu.com/questions/18078/…
Just because the so called «original» contains an answer with solution to this question, does not mean that this question is a duplicate. The desktop environment and window manager are not the same things. These are different questions. The justification for closing this question is, quite simply, wrong, and the decision must be reversed.
6 Answers 6
And you can try $DESKTOP_SESSION for the DE.
My second problem is about DE (desktop environment), which you answered. I think the answer should be gnome , but it is ubuntu , why?
This command seems to be useful:
- 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 JWM returns /usr/bin/icewm-session (should be jwm-session, not?!)
I got /usr/bin/ck-launch-session /usr/bin/ck-xinit-session /usr/bin/gnome-session. So what? I’m using CentOS.
In the Raspberry Pi 2, we have a choice of 3 window sessions: lx and openbox. As I commented earlier, echo $DESKTOP_SESSION ==> LXDE-pi (installation value) is a definitive indicator for RPI2.
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
Results
a & b - DESKTOP_SESSION=gnome c - DESKTOP_SESSION=default.desktop d - DESKTOP_SESSION=Lubuntu e - Nothing f - DESKTOP_SESSION=xfce
a & b - gnome c - Nothing d - Lubuntu e - Nothing f - xfce
a & b - OK c - OK d - WRONG e - Nothing & OK f - OK
a - Nothing b - GNOME 2.32.0 c - MATE d - LXDE (Lubuntu) e - Unknown (Window Manager: JWM) f - XFCE
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.
8 Best Window Managers for Linux
Want to organize your windows and use all the screen space you have? These window managers for Linux should come in handy!
A window manager should be helpful if you dabble with multiple active windows on your system and want to make the most out of the available screen space. Sure, you can re-size and reposition your windows to organize them to some extent. However, with a window manager, you can step up your multitasking potential by organizing the windows using keyboard shortcuts, mouse and even automating some of it. With a window manager, you can improve not only the productivity but the look and feel of your desktop if you decide to put in the effort. Here’s an example of a user’s customized desktop using a window manager to organize the active windows:
Most of the options mentioned work for the Xorg display server, considering window managers on Wayland are called compositors. You can explore Arch’s documentation to learn more.
For multi-monitor setups, you might want to check for RandR and Xinerama protocol support with the window managers.
Is it Easy to Use a Window Manager?
- Some window managers provide you with room for endless customizability. If you do not know how to configure it to your liking, you may not be able to use it.
- Some window managers might need configuration even before using it. Unless you do not set it up, you cannot utilize the window manager.
- Most users prefer Arch Linux to use window managers. So, you can expect better community support for configurations/setup if you pick Arch Linux as your distro of choice. But, it is not mandatory, you can try other distributions.
- You might want to know how to switch between Xorg and Wayland to use the window manager or compositor you want.
Here, I provide the links to its documentation, and the installation commands to give you a head start.
To make things easy, you can also utilize other users’ dotfiles (configuration) to quickly modify the look and behavior of your desktop. However, you still need to know what you’re doing before you use them.
Some window managers/compositors for Wayland may not support proprietary graphics drivers, including NVIDIA. So, before installing and configuring any of the window managers, you might want to check what it supports.
1. bspwm
bspwm is a lightweight tiling window manager. The first screenshot you see in this article was made possible using bspwm.
You must install the window manager and a separate package to use the keyboard/pointer bindings. bspwm lets you manually choose how new windows get inserted or positioned or set it to automatic mode, where it follows a particular scheme to arrange the windows.
You need to configure it properly before you get to use it. Unfortunately, the documentation for it may not be easy to follow for new users trying a window manager. Arch Linux’s documentation page on bspwm should help you get started.
Install bspwm
You can easily find the package for it on the official repositories of Fedora, Ubuntu, and Arch.
For Ubuntu, type in the following command to get it installed:
sudo apt install bspwm sxhkd
2. Qtile
Qtile is a customizable tiling window manager that works on X11 and Wayland.
It packs in various features and yet a simple implementation. You get a command shell to inspect and manage all aspects of the window manager.
One of the highlights of Qtile is complete remote scriptability.
Install Qtlie
You can install Qtile using pip. Once you have pip installed on Ubuntu, run these commands:
pip install xcffib pip install qtile
Refer to the official documentation or its GitHub page for other Linux distributions.
3. herbstluftwm
herbstluftwm (I know, a mouthful) is a manual tiling window manager. Not as popular as other options, but a promising option for Linux users.
The key highlight of the window manager is that the configuration for the tool happens at runtime. So, you do not need to restart the window manager and yet manage to make changes live.
The documentation may not be beginner-friendly, but you can choose to explore parts of it to better understand its functioning.
Install herbstluftwm
You can find it in the official repository. To install it, run the following command:
sudo apt install herbstluftwm
In either case, feel free to explore its official website and GitHub page for more info.
4. awesome
awesome is a fast and configurable window manager. It does require a few dependencies along with the installation process to get things working, but it should not be a problem for most.
If you want to access a window manager without needing to configure much from the start, awesomewm should be a good option. It may not look pleasing if you just install and use it without configuration, but you can access most of its functions easily.
The documentation for awesome window manager is valuable enough to make the most out of it.
Install awesome
The package should be available in the repositories of all major distributions. For Ubuntu, you can type in the following command:
5. IceWM
IceWM is one of the oldest tiling window managers out there. You can find it as the default window manager with some distributions like antiX (one of the best lightweight Linux distributions).
You may not get an extensive list of functionalities with IceWM, but it has a simple approach that lets you easily use it. By default, it features an app launcher and a taskbar to keep things familiar and accessible.
Head to its official website for documentation and get started.
Install IceWM
IceWM is available in official repositories of all major distros. You can install it on Ubuntu using the following command:
6. i3
i3 is the most popular option if you are in for an insane amount of customization. Yes, it is aimed at advanced users and developers, but with its well-documented instructions, anyone can try to use it.
You can expect numerous abilities with i3 as long as you can configure them. Whether you have dual-monitor setup, or a multi-monitor setup with horizontal displays, configuration is the key here.
i3 is available in repositories for every major distribution. For Ubuntu, you can use the command below to get it installed:
To explore technical details, head to its GitHub page.
7. Sway
Sway is designed for Wayland sessions while offering compatibility with i3. In other words, the same commands are supported with Sway.
If you are using i3 and want to move to Sway on a Wayland desktop, the transition should be easy by copying the configuration to the correct file.
You should have the essential features here to organize app windows and make efficient use of desktop space.
Install Sway
Most of the popular distributions should already have the package available. For Debian-based systems, you can use the terminal to get it installed:
To explore more, check out its GitHub page.
Suggested Read 📖
8. xmonad
xmonad is a tiling window manager for X11 written and configured in Haskell language.
It aims to provide all kinds of functionalities while making it easier to automate things all the way.
You get a decent documentation to get started and start taking charge of your windows.
Install xmonad
Unlike others, it is not as simple as installing a single package (especially for Debian/Ubuntu users).
So, you may want to follow the official installation instructions and its GitHub page to proceed.
Honorable Mentions
There are various other compositors (Wayland) and window managers like ratpoison that may not be feature-rich or popular enough but can be interesting to try.
Some of those options are:
💬 What are your favorite window managers for Linux? Did we miss any of your favorites? Let us know in the comments section below.