user483040
user483040

Reputation:

configure gnome-terminal using a configuration file rather than command line arguments

I've found in the gnome-terminal help documentation a really cool list of things you can configure in a file but absolutely no documentation of what the variables in the conf file are. I've googled a bunch for this and haven't found anything useful. Can someone point me to something or even list the actual commands. Or maybe come out and sit here at my desk and pair on it. My google-fu has failed me this morning.

thanks

Upvotes: 4

Views: 12975

Answers (3)

villapx
villapx

Reputation: 1873

GNOME Terminal has since changed how it stores its configuration; it now uses dconf, at least as of gnome-terminal 3.28.2.

You can query the dconf database for the UUIDs of available Profiles using:

gsettings get org.gnome.Terminal.ProfilesList list

Example output:

['b1dcc9dd-5262-4d8d-a863-c897e6d979b9']

You can view all per-Profile configurable settings (called "keys" in dconf) and their current values using:

gsettings list-recursively "org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/"

Example output:

org.gnome.Terminal.Legacy.Profile audible-bell false
org.gnome.Terminal.Legacy.Profile cursor-shape 'block'
org.gnome.Terminal.Legacy.Profile cursor-colors-set true
org.gnome.Terminal.Legacy.Profile scroll-on-keystroke true
org.gnome.Terminal.Legacy.Profile cjk-utf8-ambiguous-width 'narrow'
org.gnome.Terminal.Legacy.Profile default-size-rows 24
org.gnome.Terminal.Legacy.Profile encoding 'UTF-8'
org.gnome.Terminal.Legacy.Profile use-theme-colors false
org.gnome.Terminal.Legacy.Profile custom-command ''
org.gnome.Terminal.Legacy.Profile visible-name 'Unnamed'
org.gnome.Terminal.Legacy.Profile text-blink-mode 'always'

... lots more ...

(tip: you can sort alphabetically by key if you pipe to sort, so modify your command to gsettings list-recursively "org.gnome......" | sort -k2)

To set a key (e.g. audible-bell), use:

gsettings set \
    "org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/" \
    "audible-bell" \
    false

Check out this script in my GitHub dotfiles repo for a practical example. In that script, I create a Profile of my own (if it does not already exist), set that Profile as the default, then configure the keys for that Profile as well as some global keys that apply to all profiles.

Upvotes: 4

Rafael Vega
Rafael Vega

Reputation: 4645

Also, gconf-editor stores it's configurations for gnome-terminal in ~/.gconf/apps/gnome-terminal

Upvotes: 3

Ian Miller
Ian Miller

Reputation: 603

You're not just talking about using gconf-editor (from the System menu usually) are you?

Actually, gconf-editor needs to be started from a terminal on my Ubuntu system here, but there are a bunch of settings under gnome-terminal there.

Upvotes: 2

Related Questions