Effortlessly Sync Configurations & Shortcuts in Linux Mint (Debian)
If you have recently migrated from Windows to Linux Mint (LMDE or other Debian-based distributions), and you're hooked on configurations and shortcuts, this article will demonstrate how to effortlessly sync your customized settings between machines.
1. Prerequisites
Ensure you have the following tools installed:
rsync- a fast and versatile file-copying toolgit- a distributed version control system
2. Create a Configuration Repository
Create a local Git repository to store your dotfiles (hidden configuration files) and sync them across systems:
git init ~/.dotfiles
3. Ignore Specific Files
Create a .gitignore file in the ~/.dotfiles directory to exclude specific files or directories from version control:
touch .gitignore
4. Track Configuration Files
Add desired configurations to the Git repository by creating symbolic links:
ln -s ~/.dotfiles/.* ~
5. Sync Configurations
To keep configurations in sync across multiple machines, clone the repository, pull any updates, and create symbolic links:
git clone @:/path/to/.dotfiles ~/.dotfiles
git pull
ln -s ~/.dotfiles/.* ~
6. Automate Syncing with a Script
Automate syncing using a shell script. This script should backup existing configurations, pull updates from the repository, and replace the existing files with the updated ones:
#!/bin/ash
set -e
BACKUP_DIR=~/dotfiles-backup-`date +%Y-%m-%d-%H:%M:%S`
mkdir -p $BACKUP_DIR
mv -t $BACKUP_DIR ~/.dotfiles/.*
git clone @:/path/to/.dotfiles ~/.dotfiles
git pull
ln -s ~/.dotfiles/.* ~
7. Shortcuts
For global shortcuts, create or modify a custom keyboard layout in Linux Mint with ibus-setup and store it (~/.config/ibus) in the Git repository.
8. Automate Shortcut Syncing
Include the shortcut configuration directory in the Git repository and follow the same steps as with the configuration files.