Keyboard shortcuts files

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
all41
Level 15
Level 15
Posts: 5590
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Keyboard shortcuts files

Post by all41 » Thu Aug 15, 2019 1:11 pm

Greetings forum members,

I have a multitude of keyboard shortcuts that I use to wean myself from reaching for the mouse.
Where are these settings stored? I would like to copy them to a fresh install without having to re-enter
all the paths.

Thank you for reading.

gm10
Level 18
Level 18
Posts: 8740
Joined: Thu Jun 21, 2018 5:11 pm

Re: Keyboard shortcuts files

Post by gm10 » Thu Aug 15, 2019 1:59 pm

Handled by your window manager, so assuming you are using MATE with Marco, you'll find them in dconf under /org/mate/marco/. If you're keeping your home folder they will travel with you, otherwise run dconf dump /org/mate/marco/ > dconf-marco to store your window manager settings into a file dconf-marco, move that file to the new system and then dconf load /org/mate/marco/ < dconf-marco on the new system to restore.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

fernandocabral
Level 1
Level 1
Posts: 47
Joined: Wed Jun 04, 2014 6:15 am

Re: Keyboard shortcuts files

Post by fernandocabral » Thu Aug 22, 2019 11:19 am

What about cinnamon? Where can I find the equivalent file?
I have the same issue: I use three different machines and I try to keep them all synchronized so I can move from one to the next without having to learn something different or even re-entering information. Keyboard shortcuts is a case in point: when I create a new one in the first machine I'd like to have it duplicated in the other two machines.

Based on time stamps, I would guess the keyboard configuration is stored in the file ~/.config/dconf/user. It that's true, could I simply copy this file to the other machines?

If not, can I use dconf dump it and create a file that I could move and import in a different machine? If yes, where is this file?

Best regards

- fernando

gm10
Level 18
Level 18
Posts: 8740
Joined: Thu Jun 21, 2018 5:11 pm

Re: Keyboard shortcuts files

Post by gm10 » Thu Aug 22, 2019 11:39 am

fernandocabral wrote:
Thu Aug 22, 2019 11:19 am
What about cinnamon? Where can I find the equivalent file?
[...]
Based on time stamps, I would guess the keyboard configuration is stored in the file ~/.config/dconf/user. It that's true, could I simply copy this file to the other machines?
A Cinnamon user will have to tell you about the exact dconf path. dconf dump /org/cinnamon would comprise all of your Cinnamon settings though.

And yes, the file you pointed out is your dconf database. You could copy it or just keep your entire home folder.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

fernandocabral
Level 1
Level 1
Posts: 47
Joined: Wed Jun 04, 2014 6:15 am

Re: Keyboard shortcuts files

Post by fernandocabral » Thu Aug 22, 2019 2:54 pm

gm10 wrote:
Thu Aug 22, 2019 11:39 am
fernandocabral wrote:
Thu Aug 22, 2019 11:19 am
What about cinnamon? Where can I find the equivalent file?
[...]
Based on time stamps, I would guess the keyboard configuration is stored in the file ~/.config/dconf/user. It that's true, could I simply copy this file to the other machines?
A Cinnamon user will have to tell you about the exact dconf path. dconf dump /org/cinnamon would comprise all of your Cinnamon settings though.

And yes, the file you pointed out is your dconf database. You could copy it or just keep your entire home folder.
Thank you. Nevertheless, simply copying the ~/.config/dconf/user file did not work. It seems the machine I transported it to brings back the previous file as soon and a logout and login again.

gm10
Level 18
Level 18
Posts: 8740
Joined: Thu Jun 21, 2018 5:11 pm

Re: Keyboard shortcuts files

Post by gm10 » Thu Aug 22, 2019 2:59 pm

fernandocabral wrote:
Thu Aug 22, 2019 2:54 pm
Thank you. Nevertheless, simply copying the ~/.config/dconf/user file did not work. It seems the machine I transported it to brings back the previous file as soon and a logout and login again.
You probably tried replacing it while logged in. That will obviously not work for then that database is in memory and in use. That's why I gave the dconf load command for that works during runtime. If you want to replace the file log that user out and use a different user account or a live environment to replace it.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

User avatar
smurphos
Level 12
Level 12
Posts: 4110
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Keyboard shortcuts files

Post by smurphos » Thu Aug 22, 2019 11:40 pm

Backup

Code: Select all

dconf dump /org/cinnamon/desktop/keybindings > ~/my_keybindings
Restore

Code: Select all

dconf load /org/cinnamon/desktop/keybindings < ~/my_keybindings
To do the whole database

Code: Select all

dconf dump / > ~/my_dconf

Code: Select all

dconf load / < ~/my_dconf
As written this saves the settings in the root of you home directory and assumes you put the file in the same place on the other machine.

After restore a Ctrl-Alt-Esc is recommended to restart Cinnamon.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

fernandocabral
Level 1
Level 1
Posts: 47
Joined: Wed Jun 04, 2014 6:15 am

Re: Keyboard shortcuts files

Post by fernandocabral » Fri Aug 23, 2019 7:57 am

smurphos wrote:
Thu Aug 22, 2019 11:40 pm
Backup

Code: Select all

dconf dump /org/cinnamon/desktop/keybindings > ~/my_keybindings
Restore

Code: Select all

dconf load /org/cinnamon/desktop/keybindings < ~/my_keybindings
To do the whole database

Code: Select all

dconf dump / > ~/my_dconf

Code: Select all

dconf load / < ~/my_dconf
As written this saves the settings in the root of you home directory and assumes you put the file in the same place on the other machine.

After restore a Ctrl-Alt-Esc is recommended to restart Cinnamon.
Got it. It did work even without Crtl-Alt-Esc. Only a small correction was needed: I had to add a forward slash at the end, like so:

Code: Select all

dconf load /org/cinnamon/desktop/keybindings/ < ~/my_keybindings
Thank you very much. It delivered what I needed.

Post Reply

Return to “Other topics”