Ubuntu – How to restore MATE panel settings from old backup

matepanelrestore

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 or dconf/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.

Best Answer

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.

  1. So, first create a file named user2 in your home directory with content like this

    user-db:user2
    
  2. Put your old dconf database file in ~/.config/dconf/ directory with name user2. There should be a file with name user already.

  3. 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.

  4. 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.

Related Question