Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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:

#!/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.

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
1  
Great, thanks for this code! –  isomorphismes Aug 23 '13 at 1:24

Your Answer

 
discard

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.