8

How can I determine which window managers are installed from the command line? I use Ubuntu.


I know that:

2
  • Are you looking for some other commands to get the current display manager?
    – GAD3R
    Commented Jun 17, 2018 at 20:52
  • 1
    @GAD3R No, I am looking for a command that would list all installed window managers. Commented Jun 17, 2018 at 20:53

2 Answers 2

6

There's no way to find all window managers programmatically because any program could potentially act as a window manager and it's impossible to write a program that knows what an arbitrary program does. However, if you limit the search to window managers provided by a Debian package, there's an easy way. All window managers in Debian provide the x-window-manager alternative.

update-alternatives --list x-window-manager
1
  • 1
    @RuiFRibeiro “Gnome” isn't a window manager. Individual window managers provide the x-window-manager alternative, e.g. metacity, mutter, … Commented Jun 17, 2018 at 21:44
0

This psstree command displays the window manager(s) presently use. And group the result(s) per application and their relationships with other item(s).


Below is the same answer as above. But with details if you're interested in those.

Three steps:

  1. If not already done, execute this command to install the "pstree" package

    sudo apt-get install pstree

  2. Using Terminal/Command line, execute this command

    psstree

  3. Within the result, search for the keyword "gdm". On the right side of "gdm" is the presently use Window Manager. For example:

    gdm-wayland-ses─┬─gnome-session

    Means GNOME Wayland

    gdm-x-session─┬─Xorg

    Means GNOME X11

One of the main benefit of pstree is that if you have mutliple Window Manager use at once, then pstree will display which Window Manager is use per application. Plus the application relationship with other items.

pstree has many optional parameters. For example, execute this command to display only trees rooted at processes of this user

Format: pstree <USERNAME>

Example: pstree jdoe

1
  • The question shows how to determine which window manager is running, and the OP is clear that that is not what he is asking. Commented Oct 12, 2020 at 22:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .