2

I use Ubuntu 16.04 LTS whose GUI allows customization. These include

  1. Launcher Icon Size
  2. Behaviour of the launcher (hides, size of launcher, reveal sensitivity)
  3. System Language
  4. My dual display settings, their positioning
  5. My items docked on the launcher

Basically, all such settings I applied to the system via GUI for my ease.

I want some sort of a hack to back up such settings to a file and reapply them when I reinstall the OS.

Volker Siegel
  • 13,065
  • 5
  • 49
  • 65
Denis
  • 337
  • 4
  • 18
  • 1
    Generic answer: each of these settings can be set through command line. 1 and 2 are done with gsettings, 3 is editing 2 text files, 4 and 5 are probably also text files. So put the commands to edit these files in a script and save that script. Execute when needed. AskUbuntu expects 1 question per topic and there are 5 here. 1+2 are likely already answered. 3 and 4 probably also will have an answer. 5 is probably about setting a .desktop file you can store somewhere so you can reapply; will also have a topic+answer on AU. – Rinzwind Feb 16 '18 at 09:08
  • 1
    Icon size: https://askubuntu.com/questions/809914/ubuntu-16-04-launcher-icon-size-gsettings-command-line 2: probably https://askubuntu.com/a/132394/15811 but you will get the gist: gsettings set, you need the key, and a value to change a setting. Language: https://askubuntu.com/questions/133318/how-do-i-change-the-language-via-a-terminal (related: keyboard: https://askubuntu.com/questions/209597/how-do-i-change-keyboards-from-the-command-line/209598 ) – Rinzwind Feb 16 '18 at 09:11
  • 1
    AFAIK they are all config files stored in ~/.config/. So if you copy over your home directory, or at least that (hidden) folder, you should see most(all?) your settings restored. – Robert Riedl Feb 16 '18 at 11:23
  • @Robert Riedl This is exactly what I wanted. Please post this as asnwer. – Denis Feb 18 '18 at 04:10

3 Answers3

6

They are all stored as config files in ~/.config/ or ~/.<software-name>

So if you copy over your home directory, or at least that (hidden) folder, you should see most(all?) your settings restored

Robert Riedl
  • 4,351
  • No, not all settings are restored. A lot may be missing. ~/.config/ contains data from "modern, well behaved" programs. Examples of programs storing their configuration elsewhere: vim, Skype, mpd, ssh, and many more. Look for directories like ~/.vim etc. – Volker Siegel Feb 28 '18 at 21:52
  • 1
    @VolkerSiegel, thats why I said to copy the whole home directory – Robert Riedl Feb 28 '18 at 21:56
  • Oh, sorry - seems like I only read the first and last line. Copying the home directory completely would work, right. Or just all hidden directories and hidden files. – Volker Siegel Feb 28 '18 at 22:06
3

tar is your friend.

I recently updated from mint 17.3 to 18.2 and I wanted it to be as smooth as a transition as possible and it was thanks to tar.

  1. Create a backup of your home directory
    • tar -cvf home_backup.tar ~/*
    • ~/* is all the files in your home directory
  2. Put the tarball on a separate drive or machine
  3. Extract the tarball right ontop of your home directory (in new machine)
    • cd ~
    • tar -xf home_backup.tar
0

My anwer is restricted to a certain Desktop Manager: it concerns XFCE.

Saving all XFCE Desktop settings

The settings of the XFCE Manager are at /home/<user_name>/.config/xfce4/. Therefore, if you copy the whole directory and then transfer it into a fresh XFCE installation it should work. I guess that for other Desktop Managers (such as Gnome or Unity) an analogous directory must exist.

Saving only XFCE Desktop Panels

That said, if you were only concerned with thee GUI panels, again in XFCE, you can back them up through the GUI. Do as follows:

  1. Go to the panel and right click with the mouse on it: Panel > Panel Preferences enter image description here

  2. Click on Backup and restore. There you can save the current configuration in the path you indicate or load a stored backup. Per default the backups are stored in /home/<your user>/.local/share/xfpanel-switch/

    enter image description here

I hope it help someone.