dconf save and load to file
GNOME-based desktops use a settings utility that is a little similar to the registry of a famous non-free operating system. I’ll spare you the ideological diatribe and get to the task at hand. I use Cinnamon from the Linux Mint project, and it is based on GNOME 3.
The command line tool for manipulating the settings is titled dconf.
Saving dconf settings to file
Dumping its output is easy.
dconf dump /
dock-items=['org.gnome.Terminal.dockitem', 'nemo.dockitem', 'firefox.dockitem']
Redirect to a file and you’re done.
dconf dump / > my-cinnamon.dconf
Pick a subdirectory if you wish to narrow it down.
dconf dump /org/cinnamon/sounds/
Loading dconf settings from file
The reverse is also as easy.
Make sure you use the same directory in the layout.
dconf load / < my-cinnamon.dconf
This post is a precursor to a discussion about manipulating the settings programmatically in xfconf-query, which is the settings cli tool for the xfce desktop environment.
I wrote a wrapper script for a project of mine. Check out dconf.sh at gitlab underneath my project bgconf.