1

How to add all Gnome Desktop configuration settings in a Git Repo? Which files I need to put under revision control?

I configured in GUI "Settings" various things

examples

  • Focus-follows-mouse
  • Privacy options

When installing a new Ubuntu box, I wish to restore all my configurations from git.

0

1 Answer 1

1

First you need to make a script with the settings values you need and those are command line controllable..

For example:

gsettings get org.gnome.desktop.wm.preferences focus-mode
gsettings get org.gnome.desktop.interface clock-show-seconds

Above commands are easily understandable and both can be achieved both via GUI and CLI

Lets say you have set the above commands preferences via GUI and you want to make a text file of it.

Here is the script as an example:

#!/bin/bash

mkdir -p /home/admin/my_local_git_repo

#transfer the below commands to the file for git in local repository directory in a form of executable script file.

echo "
#!/bin/bash

gsettings set org.gnome.desktop.wm.preferences focus-mode $(gsettings get org.gnome.desktop.wm.preferences focus-mode)
gsettings set org.gnome.desktop.interface clock-show-seconds $(gsettings get org.gnome.desktop.interface clock-show-seconds)" > /home/admin/my_local_git_repo/preferences.sh

Here is the output when I ran the script with the command bash /home/admin/forgit.sh

enter image description here

You can add as many commands as you wish in the script named forgit.sh. Once you run the script It will create the script named preferences.sh in you local git repository directory.

for "How to make local git repository and further" you may go through this link https://docs.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line

So If you have run the script forgit.sh for the first time and then commit it to as per above link, you can write your comments "1st version" etc..

for the second time, "2nd version" some thing like that.. you can change script names, comment names, or even you can tweak the forgit.sh script such that it stright away push (git push) to the git repo..

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .