5

I followed this question, but the answer given in that question only works on Ubuntu 11.04 and 11.10 and no longer works on Ubuntu 13.10.

So my question is, how do I enable or disable a particular compiz plugin from terminal in Ubuntu 13.10?

Avinash Raj
  • 78,556

3 Answers3

4

Now the key name which store the enabled compiz plugins in gconf is:

/apps/compizconfig-1/profiles/Default/general/screen0/options/active_plugins

gconf

And now you have to use:

gconftool-2 --get /apps/compizconfig-1/profiles/Default/general/screen0/options/active_plugins

respectively:

gconftool-2 --set --type=list --list-type=string /apps/compizconfig-1/profiles/Default/general/screen0/options/active_plugins "[list,goes,in,here]"
Radu Rădeanu
  • 169,590
3

From Ubuntu 13.01 Compiz uses dconf as a backend instead of gconf.

List active compiz plugins

Run dconf dump /org/compiz/profiles/unity/ | grep active-plugins in a Terminal. This will give you someting like

active-plugins=['core', 'composite', 'opengl', 'wall', 'resize', 'vpswitch', 'compiztoolbox', 'move', 'snap', 'grid', 'imgpng', 'commands', 'unitymtgrabhandles', 'mousepoll', 'place', 'copytex', 'regex', 'session', 'animation', 'fade', 'expo', 'workarounds', 'ezoom', 'scale', 'unityshell']

Change per user

See answer https://askubuntu.com/a/320677/10475

System-wide change

See answer https://askubuntu.com/a/635159/10475

uzhoasit
  • 1,633
0

Replace /apps/compiz-1/general/screen0/options/active_plugins with /apps/compizconfig-1/profiles/Default/general/screen0/options /active_plugins

So gconftool-2 --get /apps/compizconfig-1/profiles/Default/general/screen0/options /active_plugins will print active plugins.

#!/bin/bash

pluginName='obs'
unset activePlugins_old

if ( gconftool-2  -g /apps/compiz-1/general/screen0/options/active_plugins 2> /dev/null | grep -q '.'   )
then
    activePlugins_old=`gconftool-2  -g /apps/compiz-1/general/screen0/options/active_plugins`  
    path='/apps/compiz-1/general/screen0/options/active_plugins'
elif ( gconftool-2  -g /apps/compizconfig-1/profiles/Default/general/screen0/options/active_plugins  2> /dev/null | grep -q '.' )
    then
    activePlugins_old=`gconftool-2  -g /apps/compizconfig-1/profiles/Default/general/screen0/options/active_plugins`
    path='/apps/compizconfig-1/profiles/Default/general/screen0/options/active_plugins'
elif ( gconftool-2  -g /apps/compiz/general/allscreens/options/active_plugins )
    then
    activePlugins_old=`gconftool-2  -g /apps/compiz/general/allscreens/options/active_plugins`
    path='/apps/compiz/general/allscreens/options/active_plugins'
else
    echo 'ERROR getting active_plugins'
    exit 1
fi

echo "Using 
gconftool-2  -g $path"
        #echo "Active plugins are : $activePlugins_old"

if ! ( echo "$activePlugins_old" | grep -q "$pluginName" )         # Not enabled
then
        echo -n 'Activating plugin.. '
    if ( echo $activePlugins_old | grep -q "." )   # Enabled
    then
        if ( echo $activePlugins_old | grep -q "\[\]" ) # Empty
        then
            gconftool-2 --type=list --list-type=string -s "$path"  "[$pluginName]"
        else   # some active plugins
            gconftool-2 --type=list --list-type=string -s "$path"  "$( echo -n "$activePlugins_old" | sed "s/]$/,$pluginName]/" )"
        fi
    else
        sleep 7
        gconftool-2 --type=list --list-type=string -s "$path"  "[$pluginName]"
        echo  'Activated'
    fi
else
    echo 'Plug-in already enabled'
fi
totti
  • 6,818
  • 4
  • 39
  • 48