6

How can I determine which compositor is currently being used when multiple desktops have been installed such as LXDE and XFCE. Compiz is also installed.

Is there a code that will show which installed compositing manager being used?

Ringtail
  • 16,127

1 Answers1

3

There is no direct command to get your current compositing manager. To do that, we need to make a list of them and check in the current processes. I made a script for this. Here it goes:

#!/bin/sh

COMPOSITORS=('awesome' 'beryl' 'blackbox' 'compiz' 'dwm' 'enlightenment' 'fluxbox' 'fvwm' 'i3' 'icewm' 'kwin' 'metacity' 'musca' 'openbox' 'pekwm' 'ratpoison' 'scrotwm' 'wmaker' 'wmfs' 'wmii' 'xfwm4' 'xmonad')

for i in `ps -u $USER -o comm`; do
    for c in ${COMPOSITORS[@]}; do
        if [ "$i" == "$c" ]; then
            echo "Your compositor is $i"
        fi
    done
done

Open your editor, paste the code above and save it with the name check-compositor.sh. Then open the terminal and execute $ sh path/to/your/file/check-compositor.sh That should show your current compositor manager. You can add more compositing managers to the list if you wish, but I think that's pretty much all of them.

Jesse
  • 719
  • script fails to run using suggested!! Free Replay, Try Again – Ringtail Apr 04 '13 at 03:07
  • You could add xcompmgr, see here, since OP is interested in LXDE. Also, I'm not sure about including Openbox. To my mind, it's a window manager. (I don't use compositing myself and am not familiar with the other names in the list.) –  Apr 04 '13 at 03:08
  • @Ringtail, what do you have in autostart? –  Apr 04 '13 at 03:09
  • @vasa1 nothing in .config/autostart for a comp-manager – Ringtail Apr 04 '13 at 03:26
  • do you have something like ~/.config/lxsession/Lubuntu/autostart? I know you haven't said you're using Lubuntu (or ~/.config/lxsession/LXDE/autostart)? –  Apr 04 '13 at 03:38
  • @Ringtail what compositor and desktop environment were you using when you ran the script? I tested the script in Unity, Xfce and Openbox with a few compositors in the script list and worked properly in all of them. – Jesse Apr 04 '13 at 17:05
  • @Jesse USING XFCE – Ringtail Apr 04 '13 at 22:37
  • @Ringtail Does the script output some error or it just doesn't display anything? – Jesse Apr 05 '13 at 13:00
  • @Jesse no output, no display using this method, however using an open terminal with just the code I am able to return the expected. The CODE DOES work, thanks – Ringtail Apr 05 '13 at 13:51
  • Your list of compositors is wrong. Where did you get it from? OpenBox is not compositing (but listed), while xcompmgr is a compositing manager (not listed). – You know the difference between window and compositing manager? – Robert Siemer Mar 13 '14 at 11:00
  • This command gives me nothing on a new Ubuntu 18.04 install. Add gnome-shell since I think in 18.04 it includes mutter? – Sanjay Manohar Jul 27 '18 at 07:43