Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 2 down vote accepted

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:


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"

Open your editor, paste the code above and save it with the name Then open the terminal and execute $ sh path/to/your/file/ 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.

share|improve this answer
script fails to run using suggested!! Free Replay, Try Again – Ringtail Apr 4 '13 at 3: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.) – user25656 Apr 4 '13 at 3:08
@Ringtail, what do you have in autostart? – user25656 Apr 4 '13 at 3:09
@vasa1 nothing in .config/autostart for a comp-manager – Ringtail Apr 4 '13 at 3:26
Great, thanks for this code! – isomorphismes Aug 23 '13 at 1:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.