Notes

dconf and gsettings notes

Edit on GitHub

Ubuntu
4 minutes

As of version 3.7.0, gnome-terminal uses GSettings and DConf instead of GConf.

Syntax differences between dconf and gsettings

dconf write vs. gsettings set

1# dconf
2dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/use-theme-colors "false"
3dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/background-color "'rgb(0,43,54)'"
4dconf write /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/foreground-color "'rgb(131,148,150)'"
1# gsettings
2gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ use-theme-colors false
3gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ background-color 'rgb(0,43,54)'
4gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ foreground-color 'rgb(131,148,150)'

dconf

View and backup all dconf settings

1dconf dump / > dconf_settings_backup.sh

If you save it as a .sh file, you’ll get syntax highlighting when you open it with a code editor

Search for a key/value being used in settings

1dconf dump / | grep SEARCH-TERM

Finding all keys with list

1dconf list /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/
binding
command
name

Finding the value of a key with read

1# dconf read <KEY>
2dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/name
'Save a screenshot to ~/Pictures/screenshots'

Another example, to get the picture being used as background:

1# Ubuntu desktop background
2dconf read /org/gnome/desktop/background/picture-uri
'file:///home/aamnah/.local/share/backgrounds/2020-07-20-10-57-02-edit-ballai-utopia.jpg'

gsettings

Search for a key/value being used in settings

1gsettings list-recursively | grep SEARCH-TERM

Get a list of all keyboard shortcuts

You can get a list of ALL keyboard shortcuts (their keys and values) with list-recursively

1gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys
  1org.gnome.settings-daemon.plugins.media-keys custom-keybindings ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/']
  2org.gnome.settings-daemon.plugins.media-keys media ['']
  3org.gnome.settings-daemon.plugins.media-keys stop-static ['XF86AudioStop']
  4org.gnome.settings-daemon.plugins.media-keys eject-static ['XF86Eject']
  5org.gnome.settings-daemon.plugins.media-keys rotate-video-lock ['']
  6org.gnome.settings-daemon.plugins.media-keys screen-brightness-cycle ['']
  7org.gnome.settings-daemon.plugins.media-keys toggle-contrast ['']
  8org.gnome.settings-daemon.plugins.media-keys rotate-video-lock-static ['<Super>o']
  9org.gnome.settings-daemon.plugins.media-keys www ['']
 10org.gnome.settings-daemon.plugins.media-keys window-screenshot-clip ['<Ctrl><Alt>Print']
 11org.gnome.settings-daemon.plugins.media-keys battery-status-static ['XF86Battery']
 12org.gnome.settings-daemon.plugins.media-keys volume-down ['']
 13org.gnome.settings-daemon.plugins.media-keys playback-repeat ['']
 14org.gnome.settings-daemon.plugins.media-keys hibernate ['']
 15org.gnome.settings-daemon.plugins.media-keys volume-down-precise ['']
 16org.gnome.settings-daemon.plugins.media-keys next ['']
 17org.gnome.settings-daemon.plugins.media-keys suspend ['']
 18org.gnome.settings-daemon.plugins.media-keys touchpad-toggle-static ['XF86TouchpadToggle', '<Ctrl><Super>XF86TouchpadToggle']
 19org.gnome.settings-daemon.plugins.media-keys volume-up-quiet ['']
 20org.gnome.settings-daemon.plugins.media-keys active true
 21org.gnome.settings-daemon.plugins.media-keys play-static ['XF86AudioPlay', '<Ctrl>XF86AudioPlay']
 22org.gnome.settings-daemon.plugins.media-keys search-static ['XF86Search']
 23org.gnome.settings-daemon.plugins.media-keys magnifier-zoom-in ['<Alt><Super>equal']
 24org.gnome.settings-daemon.plugins.media-keys area-screenshot-clip ['<Ctrl><Shift>Print']
 25org.gnome.settings-daemon.plugins.media-keys mic-mute ['']
 26org.gnome.settings-daemon.plugins.media-keys screen-brightness-up-static ['XF86MonBrightnessUp']
 27org.gnome.settings-daemon.plugins.media-keys previous ['']
 28org.gnome.settings-daemon.plugins.media-keys volume-up ['']
 29org.gnome.settings-daemon.plugins.media-keys control-center ['']
 30org.gnome.settings-daemon.plugins.media-keys search ['']
 31org.gnome.settings-daemon.plugins.media-keys calculator ['']
 32org.gnome.settings-daemon.plugins.media-keys volume-step 6
 33org.gnome.settings-daemon.plugins.media-keys pause-static ['XF86AudioPause']
 34org.gnome.settings-daemon.plugins.media-keys rfkill-static ['XF86WLAN', 'XF86UWB', 'XF86RFKill']
 35org.gnome.settings-daemon.plugins.media-keys stop ['']
 36org.gnome.settings-daemon.plugins.media-keys volume-up-static ['XF86AudioRaiseVolume', '<Ctrl>XF86AudioRaiseVolume']
 37org.gnome.settings-daemon.plugins.media-keys calculator-static ['XF86Calculator']
 38org.gnome.settings-daemon.plugins.media-keys home-static ['XF86Explorer']
 39org.gnome.settings-daemon.plugins.media-keys touchpad-on ['']
 40org.gnome.settings-daemon.plugins.media-keys volume-mute-static ['XF86AudioMute']
 41org.gnome.settings-daemon.plugins.media-keys volume-mute-quiet-static ['<Alt>XF86AudioMute']
 42org.gnome.settings-daemon.plugins.media-keys magnifier-zoom-out ['<Alt><Super>minus']
 43org.gnome.settings-daemon.plugins.media-keys volume-down-quiet-static ['<Alt>XF86AudioLowerVolume', '<Alt><Ctrl>XF86AudioLowerVolume']
 44org.gnome.settings-daemon.plugins.media-keys window-screenshot @as []
 45org.gnome.settings-daemon.plugins.media-keys power ['']
 46org.gnome.settings-daemon.plugins.media-keys play ['']
 47org.gnome.settings-daemon.plugins.media-keys max-screencast-length uint32 30
 48org.gnome.settings-daemon.plugins.media-keys power-static ['XF86PowerOff']
 49org.gnome.settings-daemon.plugins.media-keys terminal ['<Primary><Alt>t']
 50org.gnome.settings-daemon.plugins.media-keys volume-down-static ['XF86AudioLowerVolume', '<Ctrl>XF86AudioLowerVolume']
 51org.gnome.settings-daemon.plugins.media-keys keyboard-brightness-up ['']
 52org.gnome.settings-daemon.plugins.media-keys playback-forward ['']
 53org.gnome.settings-daemon.plugins.media-keys www-static ['XF86WWW']
 54org.gnome.settings-daemon.plugins.media-keys playback-random-static ['XF86AudioRandomPlay']
 55org.gnome.settings-daemon.plugins.media-keys pause ['']
 56org.gnome.settings-daemon.plugins.media-keys screen-brightness-cycle-static ['XF86MonBrightnessCycle']
 57org.gnome.settings-daemon.plugins.media-keys media-static ['XF86AudioMedia']
 58org.gnome.settings-daemon.plugins.media-keys hibernate-static ['XF86Suspend', 'XF86Hibernate']
 59org.gnome.settings-daemon.plugins.media-keys screenshot-clip ['<Ctrl>Print']
 60org.gnome.settings-daemon.plugins.media-keys eject ['']
 61org.gnome.settings-daemon.plugins.media-keys email-static ['XF86Mail']
 62org.gnome.settings-daemon.plugins.media-keys screen-brightness-up ['']
 63org.gnome.settings-daemon.plugins.media-keys rfkill-bluetooth ['']
 64org.gnome.settings-daemon.plugins.media-keys touchpad-toggle ['']
 65org.gnome.settings-daemon.plugins.media-keys keyboard-brightness-toggle ['']
 66org.gnome.settings-daemon.plugins.media-keys priority 0
 67org.gnome.settings-daemon.plugins.media-keys help ['', '<Super>F1']
 68org.gnome.settings-daemon.plugins.media-keys playback-random ['']
 69org.gnome.settings-daemon.plugins.media-keys logout ['<Control><Alt>Delete']
 70org.gnome.settings-daemon.plugins.media-keys area-screenshot @as []
 71org.gnome.settings-daemon.plugins.media-keys decrease-text-size ['']
 72org.gnome.settings-daemon.plugins.media-keys volume-up-quiet-static ['<Alt>XF86AudioRaiseVolume', '<Alt><Ctrl>XF86AudioRaiseVolume']
 73org.gnome.settings-daemon.plugins.media-keys screencast ['<Ctrl><Shift><Alt>R']
 74org.gnome.settings-daemon.plugins.media-keys screensaver-static ['XF86ScreenSaver']
 75org.gnome.settings-daemon.plugins.media-keys email ['']
 76org.gnome.settings-daemon.plugins.media-keys volume-down-quiet ['']
 77org.gnome.settings-daemon.plugins.media-keys screen-brightness-down-static ['XF86MonBrightnessDown']
 78org.gnome.settings-daemon.plugins.media-keys increase-text-size ['']
 79org.gnome.settings-daemon.plugins.media-keys touchpad-off-static ['XF86TouchpadOff']
 80org.gnome.settings-daemon.plugins.media-keys home ['']
 81org.gnome.settings-daemon.plugins.media-keys playback-rewind-static ['XF86AudioRewind']
 82org.gnome.settings-daemon.plugins.media-keys screenreader ['<Alt><Super>s']
 83org.gnome.settings-daemon.plugins.media-keys playback-repeat-static ['XF86AudioRepeat']
 84org.gnome.settings-daemon.plugins.media-keys magnifier ['<Alt><Super>8']
 85org.gnome.settings-daemon.plugins.media-keys volume-up-precise ['']
 86org.gnome.settings-daemon.plugins.media-keys playback-rewind ['']
 87org.gnome.settings-daemon.plugins.media-keys suspend-static ['XF86Sleep']
 88org.gnome.settings-daemon.plugins.media-keys volume-mute ['']
 89org.gnome.settings-daemon.plugins.media-keys keyboard-brightness-toggle-static ['XF86KbdLightOnOff']
 90org.gnome.settings-daemon.plugins.media-keys mic-mute-static ['XF86AudioMicMute']
 91org.gnome.settings-daemon.plugins.media-keys volume-up-precise-static ['<Shift>XF86AudioRaiseVolume', '<Ctrl><Shift>XF86AudioRaiseVolume']
 92org.gnome.settings-daemon.plugins.media-keys keyboard-brightness-up-static ['XF86KbdBrightnessUp']
 93org.gnome.settings-daemon.plugins.media-keys screen-brightness-down ['']
 94org.gnome.settings-daemon.plugins.media-keys rfkill ['']
 95org.gnome.settings-daemon.plugins.media-keys playback-forward-static ['XF86AudioForward']
 96org.gnome.settings-daemon.plugins.media-keys rfkill-bluetooth-static ['XF86Bluetooth']
 97org.gnome.settings-daemon.plugins.media-keys keyboard-brightness-down ['']
 98org.gnome.settings-daemon.plugins.media-keys screensaver ['<Super>l']
 99org.gnome.settings-daemon.plugins.media-keys on-screen-keyboard ['']
100org.gnome.settings-daemon.plugins.media-keys control-center-static ['XF86Tools']
101org.gnome.settings-daemon.plugins.media-keys volume-mute-quiet ['']
102org.gnome.settings-daemon.plugins.media-keys touchpad-off ['']
103org.gnome.settings-daemon.plugins.media-keys screenshot @as []
104org.gnome.settings-daemon.plugins.media-keys battery-status ['']
105org.gnome.settings-daemon.plugins.media-keys touchpad-on-static ['XF86TouchpadOn']
106org.gnome.settings-daemon.plugins.media-keys next-static ['XF86AudioNext', '<Ctrl>XF86AudioNext']
107org.gnome.settings-daemon.plugins.media-keys previous-static ['XF86AudioPrev', '<Ctrl>XF86AudioPrev']
108org.gnome.settings-daemon.plugins.media-keys keyboard-brightness-down-static ['XF86KbdBrightnessDown']
109org.gnome.settings-daemon.plugins.media-keys volume-down-precise-static ['<Shift>XF86AudioLowerVolume', '<Ctrl><Shift>XF86AudioLowerVolume']

check the values of a custom shortcut

You can check the keys and values for a custom command (e.g. custom1) with list-recursively

1gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/
1org.gnome.settings-daemon.plugins.media-keys.custom-keybinding command 'gnome-screenshot -a'
2org.gnome.settings-daemon.plugins.media-keys.custom-keybinding name 'Save a screenshot of an area to ~/Pictures/screenshots'
3org.gnome.settings-daemon.plugins.media-keys.custom-keybinding binding '<Shift>Print'

Restore default values

with reset

1# Restore default Screenshot shortcut
2gsettings reset org.gnome.settings-daemon.plugins.media-keys window-screenshot
3gsettings reset org.gnome.settings-daemon.plugins.media-keys area-screenshot
4gsettings reset org.gnome.settings-daemon.plugins.media-keys screenshot

Reset all keyboard shortcuts

There’s a Reset All… button in the GUI (Settings > Keyboard Shortcuts)

1gsettings reset-recursively  org.gnome.settings-daemon.plugins.media-keys

Disable certain keyboard shortcuts

You can use set and pass it an empty [] as value

1# Restore default Screenshot shortcuts
2# You can do it by passing an empty array
3gsettings set org.gnome.settings-daemon.plugins.media-keys window-screenshot []
4gsettings set org.gnome.settings-daemon.plugins.media-keys area-screenshot []
5gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot []

disable default screenshot shortcuts

Related