Я следовал за этим вопросом , но ответ , приведенный в этом вопросе, работает только в Ubuntu 11.04 и 11.10 и больше не работает в Ubuntu 13.10.
Итак, мой вопрос: как включить или отключить конкретный плагин compiz с терминала в Ubuntu 13.10?
Теперь имя ключа, в котором хранятся включенные подключаемые модули Compiz в gconf:
/apps/compizconfig-1/profiles/Default/general/screen0/options/active_plugins
И теперь вы должны использовать:
gconftool-2 --get /apps/compizconfig-1/profiles/Default/general/screen0/options/active_plugins
соответственно:
gconftool-2 --set --type=list --list-type=string /apps/compizconfig-1/profiles/Default/general/screen0/options/active_plugins "[list,goes,in,here]"
В Ubuntu 13.01 Compiz использует dconf в качестве бэкэнда вместо gconf.
Запустить dconf dump /org/compiz/profiles/unity/ | grep active-plugins
в терминале. Это даст вам что-то вроде
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']
См. Ответ https://askubuntu.com/a/320677/10475
См. Ответ https://askubuntu.com/a/635159/10475
Замените /apps/compiz-1/general/screen0/options/active_plugins
на /apps/compizconfig-1/profiles/Default/general/screen0/options
/active_plugins
, поэтому gconftool-2 --get /apps/compizconfig-1/profiles/Default/general/screen0/options
/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