Ubuntu – Gnome-terminal backgroud and foreground colour issue

command linedconfgnome-terminalthemes

At the onset of my live usage in Ubuntu Gnome 15.10, use a bash script to set the colour of my gnome-terminal. The code used is

dconf write $link/background-transparency-percent '10'
dconf write $link/scrollback-unlimited true
dconf write $link/use-theme-colors false
dconf write $link/use-theme-transparency false
dconf write $link/use-transparent-background true
dconf write $link/foreground-color 'rgb(0,43,54)'
dconf write $link/background-color 'rgb(131,148,150)'

The last 2 lines of the code give a key-value error. When I look at the dconf-editor org>gnome>terminal>legacy>profiles:>{Default profile}
the attributes



are unavailable.
How do I get rid of the error?

Note: When done manually via gnome-ternimal>Edit>Profile Preferences>Colours>Built-in schemes the above attributes appear in the same location in dconf-editor.

Best Answer

foreground-color and friends are of type string. If you perform a dconf read ... on the said field, the output will be quoted within single quotes, e.g.:


To write such a value, you have to pass those literal quote characters to dconf, that is, you have to protect them from your shell from being parsed as special characters.

One possible way to protect them is to enclose the entire string within double quotes, e.g.:

dconf write ... "'rgb(0,43,54)'"