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?

3 Answers 3

4
+25

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]"
3
  • in compiz i enabled woobly windows plugin.Now i want to disable from command line.What's the command for that? Feb 5, 2014 at 17:27
  • @AvinashRaj You can try to play yourself with the list given by the first command. Feb 5, 2014 at 17:53
  • I don't know how to play.Please provide the command to enable/disable woobly plugin. Feb 9, 2014 at 12:23
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

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
4
  • You can test your commands before to add them as an answer... Feb 5, 2014 at 15:16
  • Change pluginName='obs' with your plgin name
    – totti
    Feb 6, 2014 at 10:03
  • 1
    did you check the script? Feb 6, 2014 at 10:15
  • please check the script before posting. Feb 9, 2014 at 13:11

You must log in to answer this question.

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