On my Debian system I've customized my Gnome (Shell) keyboard shortcuts, via System Settings > Keyboard > Shortcuts.
Where do I find the file with these settings so that I can copy the file onto a flash drive for backup and then use it to replace the keyboard shortcuts on other Gnome systems?
Best Answer
Gnome 3 uses
DCONF
to store the preferences in a single binary file:~/.config/dconf/user
.As per the Gnome docs, it is recommended to save only the settings that you need and restore them with either
dconf
orgsettings
. However,gsettings
is only able to restore the value(s) for one single key at a time (plus, the value must be quoted) and that makes it a bit awkward for this kind of task. Which leaves us withdconf
.So, in this particular case, save the current settings for
gnome-shell
keyboard shortcuts1:Here's a
bkp
sample:Load the settings on another system:
1: WM and Media Keys shortcuts belong to different schemas:
Note that
dconf
only dumps non-default values so if you run e.g.and don't get any output that means there's no custom WM shortcut defined.
As a side note,
dconf-editor
is a tool that helps visualizingdconf
settings structure, i.e.schema [:path] key value
, the type and the default values of any key etc.For the record, saving the preferences with
gsettings
:bkp
sample:Now loading the preferences (as I said, for each line in the backup file you need a separate command and don't forget to quote the values):