Linux Mint Cinnamon 18键盘快捷键保存文件位置咨询
Hey there! Let me walk you through exactly where your keyboard shortcuts live in Linux Mint Cinnamon 18, plus how to back them up and restore using a symlink after a system reinstall—super handy for getting your setup back to normal quickly.
Where Your Keyboard Shortcuts Are Stored
Cinnamon uses the dconf configuration system to store most desktop settings, including custom keyboard shortcuts. Here's the key file you need:
- Primary configuration database:
~/.config/dconf/userThis single file holds all your Cinnamon-specific settings—not just keyboard shortcuts, but panel layouts, applet preferences, and more. It's the most comprehensive backup target.
- Optional: Export shortcuts to a readable text file
If you want a plain-text copy of just your keyboard shortcut settings (for reference or selective restoration), run this command in the terminal:dconf dump /org/cinnamon/desktop/keybindings/ > cinnamon-keybindings-backup.txt
Step-by-Step Backup Process
Option 1: Full dconf Backup (Recommended)
This captures all your Cinnamon settings, so you won't miss anything:
- Open a terminal and run:
Replacecp ~/.config/dconf/user ~/path-to-your-backup-folder/dconf-user-backup~/path-to-your-backup-folderwith an external drive, cloud sync folder, or any secure location outside your system drive.
Option 2: Shortcut-Only Text Backup
If you only care about keyboard shortcuts:
- Run the dump command mentioned earlier, then move the output file to your backup location:
mv cinnamon-keybindings-backup.txt ~/path-to-your-backup-folder/
Restoring with Symlink (Post-Reinstall)
For the Full dconf Backup
- After reinstalling Linux Mint Cinnamon 18, first back up the default fresh configuration (just in case):
mv ~/.config/dconf/user ~/.config/dconf/user-default - Create a symlink from your backup file to the active dconf location:
ln -s ~/path-to-your-backup-folder/dconf-user-backup ~/.config/dconf/user - Log out and back in (or restart Cinnamon with
Alt+F2, typer, and press Enter) to apply the changes. Your shortcuts (and all other Cinnamon settings) will be back.
For the Text-Based Shortcut Backup
If you only want to restore shortcuts, run this in the terminal:
dconf load /org/cinnamon/desktop/keybindings/ < ~/path-to-your-backup-folder/cinnamon-keybindings-backup.txt
Again, log out and back in to see the changes take effect.
内容的提问来源于stack exchange,提问作者Lucien Chardon

