Ubuntu – How to change Mate panel background type from bash


I want to change Mate panel's background type from a bash script. So far, tried to set it to color with:

gsettings set org.mate.panel.toplevel.background 'color'

but that doesn't seem to work. How should I do it?


Best Answer

On my 16.04 LTS I can set background to color using

dconf write /org/mate/panel/toplevels/bottom/background/type "'color'"

But please note that you need to have correct values of opacity and color. For example the code below will set green background with full opacity:

dconf write /org/mate/panel/toplevels/bottom/background/color "'#00ff00'"
dconf write /org/mate/panel/toplevels/bottom/background/opacity 65535

To disable color use

dconf write /org/mate/panel/toplevels/bottom/background/type "'none'"

Note: got this solution while monitoring the situation with dconf watch / on the terminal.