You are not logged in.
After making some changes to my shell config or X resource files, I often find myself having to synchronize them to my different computers. I'm a simple guy and I like to work in the same environment (e.g. aliases and scripts + terminal colors and font) wherever I choose to work. So far I've just used a hosted git repo to push and pull these files from. The steps would be something like this:
1. Modify a config file
2. Commit and push the changes in the repo tracking the file
3. ssh to the other box and pull in the changes
4. vimdiff the changes and apply changes
This solution works ok but makes me wonder if there's a simpler way to do this. How do you sync your enviroments? What tools are you using?
Thanks
Last edited by hesse (2012-07-12 21:38:10)
Offline
1. Scripts - stored in ~/.local/src/scripts.git. Synced with central git repo on my server as needed. Scripts only used on a particular computer are symlinked into ~/.local/bin
2. Dotfiles - synced with unison using a bash script, cronjob and different profile files: (I sync my mail, media and documents this way, too)
$ ls .unison
default.prf
desktop.prf
dotfiles.prf
homeserver.prf
laptop.prf
mail.prf
unison.log
For example - default.prf
# Common Unison preferences file
# Files
path = .unison/default.prf
path = .unison/dotfiles.prf
path = .unison/laptop.prf
path = .unison/desktop.prf
path = .unison/homeserver.prf
path = .unison/mail.prf
path = .unison/usapparel.prf
path = .weather
# Ignores
ignore = Name .*~
ignore = Name *.swp
ignore = Name *.pyc
ignore = Name *.pyo
## Miscellaneous settings
confirmbigdeletes = true
perms = -1
owner = true
group = true
times = true
prefer = newer
sortbysize = true
sortnewfirst = true
maxthreads = 50
rshargs = -C
log = true
dotfiles.prf:
## $HOME Dotfiles to sync with Unison
# Directories
path = .colors
path = .config/dwb
path = .config/feh
path = .config/gtk-3.0
path = .config/keepassx
path = .config/mopidy
path = .config/mpd
path = .config/pianobar
path = .config/ranger
path = .config/tmux
path = .config/zathura
path = .fonts
path = .gnupg
path = .ICAClient
path = .local/share/mpd/playlists
path = .texlive
path = .themes
path = .vim
path = .weechat
# Files
path = .abcde.conf
path = .bashrc
path = .bashrc.gui
path = .config/user-dirs.dirs
path = .credentials
path = .dmenurc
path = .fehrc
path = .gitconfig
path = .gitignore
path = .gtkrc-2.0
path = .inputrc
path = .lftp/bookmarks
path = .lftprc
path = .local/share/mpd/mpd.db
path = .my.cnf
path = .ncmpcpp/config
path = .ncmpcpp/keys
path = .pentadactylrc
path = .smbpasswd
path = .Xdefaults
path = .xinitrc
ignore = Path .config/dwb/dwb-uni.fifo
ignore = Path .config/pianobar/ctl
ignore = Path .config/pianobar/nowplaying
ignore = Path .config/ranger/bookmarks
ignore = Path .gnupg/gpg-agent.env
ignore = Path .vim/view
ignore = Path .weechat/logs
ignore = Path .weechat/weechat.log
ignore = Path .weechat/weechat_fifo*
The trick with syncing dotfiles like this via unison is making sure that any platform specific configurations are handled...for example I've got some if/then switches in .bashrc to set certain variables depending on whether it's for the laptop or the server.
I've been pretty happy with this setup for the past several months.
Scott
Offline
Dropbox with 3 folders full of symlinks from a Thunar custom action.
Dropbox/Config/Local
Dropbox/Config/Global
Dropbox/Config/Scripts
No interaction required. But if you use Dropbox, I suggest to encrypt the whole Dropbox folder with Encfs.
Offline
You could use unison. It's simple and requires no third party.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Sounds like unison is a good tool for this kind job. I will definitely try this tool and see what happens. Noticed that it's cross-platform (Windows + UNIX) which is most appealing. Any other suggestions or comments?
Offline
Similar to defears, I have a dotfiles folder on an encfs encrypted dropbox where I store some config files.
Offline