A big thanks to Christian Mohn aka h0bbel for his article on syncing TweetDeck between multiple Windows installations. It quickly pointed me in the right direction on OS X. In many ways, it’s much easier on OS X because it has soft links as part of its Unix heritage. Since I no longer use Windows computers for communication, I’ll leave it to someone else to figure out how to keep multiple OSs in sync.
DropBox
The technique I use also happens to take advantage of DropBox. If you’re not familiar with DropBox you should be. There are many ways to keep files in sync on multiple computers, some easier than others. I consider DropBox to be the easiest, most pain-free method I’ve found to date. DropBox provides a client integration piece that simply appears in your file system. Put a file in a folder and it will show up on all of your other machines.
DropBox also allows you to create shared folders for transferring files between friends and co-workers. John and I use it fairly regularly to transfer files that aren’t in our subversion repositories. I’ve also used DropBox to safely get files to and from my servers with their web interface.
TweetDeck on OS X
This howto assumes that you are already using TweetDeck on at least one computer. It should also be noted that this technique has the same limitation as h0bble’s; You must only run TweetDeck on one machine at a time. If this becomes an issue for me, I’ve considered creating a launcher for TweetDeck that would place a lock file in the shared directory to help prevent accidental launches. The same launcher could also monitor a termination file to close the remote instance.
TweetDeck stores your configuration files in your Preferences folder. As mentioned in h0bbel’s article, a random number is part of the filename. I used the Unix command find to locate my TweetDeck files. Open a terminal window in your home directory and issue the following command.
find . -name TweetDeckFast.*
You will most likely see multiple results. You are interested in the folder Library/Preferences/TweetDeckFast.[random number]. Inside that folder is a sub-folder named Local Store that TweetDeck uses to store your configuration files. There are two files of interest in that folder.
preferences_[twitter_username].xml
td_26_[twitter_username].db
The Technique
The technique takes advantage of the soft links I mentioned earlier. For those unfamiliar with the term, a soft link is simply a name or alias that provides a direct link to another name anywhere in the file system. Soft links will be created to fool TweetDeck into thinking its files are where they have always been, when in fact, they’re going to reside in the DropBox. DropBox will insure that the contents of the TweetDeck files are synchronized on all other computers where you have a DropBox as long as those machines have a network connection.
The reason it is important to run TweetDeck on only one machine at a time is that DropBox will try and keep the files in sync thereby generating conflicts in the files. The other reason is that you will blow through your Twitter API limits in no time.
How
- Stop TweetDeck on all computers
- Open a Terminal window in your home directory
- Create a folder in your DropBox.
mkdir Dropbox/TweetDeck
- Change to your TweetDeck Local Store
cd Library/Preferences/TweetDeckFast.*/Local\ Store
- Move your files to your DropBox
mv preferences*.xml ~/Dropbox/TweetDeck
mv td_26_*.db ~/Dropbox/TweetDeck - Create your soft links. Please replace [twitter_username] with your twitter name. For example I used my twitter username donthorp.
ln -s /Users/$USER/Dropbox/TweetDeck/preferences_[twitter_username].xml preferences_[twitter_username].xml
ln -s /Users/$USER/Dropbox/TweetDeck/td_26_[twitter_username].db td_26_[twitter_username].db
On every other machine you want to use your synchronized TweetDeck files do the following
- Stop TweetDeck
- Open a Terminal window in your home directory
- Verify that DropBox has synchronized your TweetDeck files. You should see the .xml and .db files.
ls Dropbox/TweetDeck
- Change to your TweetDeck Local Store
cd Library/Preferences/TweetDeckFast.*/Local\ Store
- Remove your files so that you can create your symlink. Note: If you want to preserve them, copy them somewhere else before deleting.
rm preferences*.xml
rm td_26_*.db - Create your soft links. Please replace [twitter_username] with your twitter name. For example I used my twitter username donthorp.
ln -s /Users/$USER/Dropbox/TweetDeck/preferences_[twitter_username].xml preferences_[twitter username].xml
ln -d /Users/$USER/Dropbox/TweetDeck/td_26_[twitter_username].db td_26_[twitter_username].db
Now you are ready to enjoy TweetDeck with all of your setting synchronized between machines. While I used DropBox for this solution, it is not required. Any method you have of moving the actual TweetDeck files between machines will suffice. Personally, using DropBox made it simple, efficient, and took advantage of my current workflow.