How do I restore MATE panel settings from old backup
Solution 1
If you have backup of your dconf database file, which is usually in ~/.config/dconf/user
you can restore settings from that database. But some work needs to be done.
Dconf reads database values from a profile file (See wiki here). And the path of that profile file is read from the DCONF_PROFILE
environment variable.
-
So, first create a file named
user2
in your home directory with content like thisuser-db:user2
Put your old dconf database file in
~/.config/dconf/
directory with nameuser2
. There should be a file with nameuser
already.-
Open a terminal and extract the settings from old database
DCONF_PROFILE=~/user2 dconf dump /org/mate > ~/mate-old
This will dump the values from old dconf database in key-value format in
~/mate-old
file. -
Now load the settings back into the current database
dconf load /org/mate/ < ~/mate-old
This will restore most of the settings of mate.
Extra: If you want you can restore the whole database using /
in place of /org/mate
. But I'm not recommending this.
Solution 2
These preferences are stored in the dconf
database, which is written to when making changes in the GUI, the gsettings
CLI (where lots of panel settings can be found) or dconf
CLI.
According to /usr/share/doc/dconf-gsettings-backend/README
All preferences are stored in a single large binary file.
I have determined by experiment (changing settings and observing the modification time of the file) that this single large binary file in Ubuntu MATE 16.04 is most definitely
~/.config/dconf/user
which isn't human readable, of course
$ file ~/.config/dconf/user
: GVariant Database file, version 0
If you don't have this file in your backup, then you probably can't use the backup to restore your panel settings :(
Related videos on Youtube
igorsantos07
Web and mobile Developer, wanterpreneur, Linux user, and Brazilian from Rio de Janeiro but with a foot in Canada :) Currently, I work as a freelancer web developer for Toptal clients, and spend some of my free time as a local Community Leader for the company and helping with meetups @ PHPRio. Toptal is an amazing way to work on projects you like, from all around the world, with a good pay while having fun - and from anywhere you want! If you like the idea, ping me (@igorsantos07) or take a look at the details in the Toptal Application Page :)
Updated on September 18, 2022Comments
-
igorsantos07 over 1 year
I was playing around with the MATE Tweak tool and suddenly a stupid option removed all my panel applets and replaced with a default layout - that thing doesn't even confirm the destructive action first!
However, I do have a backup of my home folder in the old PC... What should I copy over to get my panel back? I tried looking for
.mateconf
,.config/mate
ordconf/user
to no avail - both on my new and old computers the DConf Editor didn't show anything useful under org.mate.panel, only default stuff.-
Zanna over 7 yearspuzzling. If I click 'save panel layout' in MATE Tweak, it's saved in
/usr/share/mate-panel/layouts
but where, indeed, are temporary changes stored locally if I never click that button? +1 and I'm investigating :-S -
Anwar over 7 yearsI've added another answer and that worked for me
-
-
igorsantos07 over 7 yearsIt is in the backup, indeed. However, I would not trust simply copying the file over - dconf has probably changed some properties during my new Ubuntu installation, as well as any other application might have done the same during the mean time. Given that it's a solid blob, I won't be able to "copy over" only the panel settings... Well, I did try to access the
dconf-editor
to find those settings and manually copy over, but didn't find them there :( -
Sam Brightman about 5 yearsUnfortunately StackExchange's bizarre anti-edit bias strikes again, so commenting here: the answer contains an error.
dconf dump
paths must end with slashes. In addition, the author requested to restore panel settings, and there is no need to restore the full/org/mate/
tree to do that - the panel settings are under/org/mate/panel/
.