Home Backup tools Backup And Restore Linux Desktop System Settings With Dconf
Backup And Restore Linux Desktop System Settings With Dconf Utility

Backup And Restore Linux Desktop System Settings With Dconf

By sk
1257 Views

A while ago, I have posted a guide that explained how to reset a Linux desktop settings, tweaks and customization to default state with a single command. Today, we are going to learn how to backup and restore Linux desktop system settings with Dconf tool. This will be useful when you wanted to transfer same system settings after reinstalling your Linux desktop system, without having to manually do them one by one.

Install Dconf On Linux

Dconf comes pre-installed in many Linux distributions. If it is not installed already, you can install it using the distribution's default package manager depending upon the distribution you use.

On Arch Linux, Manjaro Linux:

$ sudo pacman -S dconf

On Debian, Ubuntu, Pop OS, Linux Mint:

$ sudo apt install dconf*

On CentOS / Fedora:

$ sudo yum install dconf

Or,

$ sudo dnf install dconf

On openSUSE:

$ sudo zypper install dconf

Backup And Restore Linux Desktop System Settings With Dconf

Believe or not, it is one of the easiest way to backup and restore system settings with a just single command.

To backup your current Linux desktop settings, all you have to do is:

$ dconf dump / > ostechnix-desktop

The above command will save all customization and tweaks you made in your system, including the pinned applications in the Dock or Unity launcher, desktop panel applets, desktop indicators, your system fonts, GTK themes, Icon themes, monitor resolution, keyboard shortcuts, window button placement, menu and launcher behaviour etc., in a text file named ostechnix-desktop.

Please note that this command will only backup the system settings. It won’t save settings of other applications that doesn’t use dconf. Also, it won’t backup your personal data either.

You can view this file using any text editors or cat command.

$ cat ostechnix-desktop

Here is my Ubuntu 18.04 desktop settings:

view linux desktop system settings taken with dconf

Now reset your desktop settings to the factory defaults with command:

$ dconf reset -f /

After running the above command, your Linux desktop will turn into the old state when you installed it in the first time. Don't panic! Your personal data and installed applications will still be intact.

To restore the System settings, simply do:

$ dconf load / < ostechnix-desktop

It's that simple!!

Have a look at the following visual demo:

Keep the backup file in a safe place to use it later after reinstalling your Linux desktop. You can also use the same backup to multiple systems that runs the same OS version with same set of applications. For example if you have another Ubuntu 18.04 GNOME desktop, you can use this same file (i.e. ostechnix-desktop) to load the same settings as in your current system.

It is also possible to backup and restore settings for specific desktop environments like GNOME, MATE, Cinnamon etc.

Backup and restore GNOME-specific settings only

For example, to backup and restore settings related to GNOME shell, the command would be:

$ dconf dump /org/gnome/ > my_gnome_settings

Make sure you have mention the correct path of the DE if you multiple DEs on your system.

Reset to factory defaults:

$ dconf reset -f /org/gnome/

To restore Gnome-only settings:

$ dconf load /org/gnome/ < my_gnome_settings

You can even backup more specific settings like desktop or window manager.

$ dconf dump /org/gnome/desktop/wm/preferences/ > old_wm_settings

Backup and restore MATE-specific settings only

Backup settings:

$ dconf dump /org/mate/ > mate_settings

Reset to factory defaults:

$ dconf reset -f /org/mate/

To restore settings:

$ dconf load /org/mate/ < mate_settings

Backup and restore settings of CINNAMON desktop only

$ dconf dump /org/cinnamon/ > cinnamon_settings

Reset to factory defaults:

$ dconf reset -f /org/cinnamon/

To restore settings:

$ dconf load /org/cinnamon/ < cinnamon_settings

For more details, check man pages.

$ man dconf

Related read:


Hope this helps.

Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like

4 comments

W. Anderson March 6, 2020 - 3:47 am

there was no reference to backing up KDE Desktop

Reply
sk March 6, 2020 - 2:55 pm

As far as I know, KDE doesn’t use dconf. So this tutorial doesn’t help for KDE users. May be you can find the settings saved in .kde/share/config/kioslaverc. I don’t have a KDE system now, so I can’t confirm.

Reply
KOUASSI GERARD March 7, 2020 - 1:55 am

I LOST THE BACKED FILE (localhost.localdomain.desktop , fedora 31) so i wasn’t able to restore my desktop configuration

Reply
Vladimir March 16, 2020 - 2:47 am

For KDE configs, check this out:
https://github.com/shalva97/kde-configuration-files

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More