Saturday 24 July 2010

Ubuntu Tip: How To Synchronise Gnote Between PCs

In the great Tomboy vs Gnote debate one of the trump cards Tomboy has is it's ability to synchronise it's database of notes with other PCs. Not that it was ever a feature that worked brilliantly. However none the less it was a feature I used and the only reason I continued using Tomboy over Gnote.

How stupid I was?

Ubuntu as many Ubuntu users will know comes with a "cloud" service called Ubuntu One. Which while isn't that great provides us with the basic inspiration for what we're about to do. You see Canonical in their great wisdom decided it would be a great idea to integrate Tomboy with Ubuntu One. Fine. Excellent. If it works. It did for a time for me. Then sort of went a bit crappy. However there are more mature "cloud services" available for synchronising files between two PCs. And that incidentally is all Tomboy's synchronisation feature does so far as I can see. It simply copies files that have been created or changed recently to the PC that doesn't have the new version.

You see all of the notes you create in Tomboy or Gnote are stored in individual XML formatted files. And the Linux file system has a crafty little feature called symbolic links. Combine this with a service like Ubuntu One or Dropbox and all our notes are synchronised automagically so long as we have an active web connection.

Prerequisites:
  1. Tomboy or Gnote. I recommend Gnote. It's lighter and faster than Tomboy.
  2. Ubuntu One, Dropbox or similar service. I would recommend Dropbox.
Setup:
  1. Creat a new folder for yout notes in your Ubuntu One or Dropbox folder.
  2. Copy your existing notes to the folder you just created in your Ubuntu One or Dropbox folder. Tomboy notes can be found in /home/your-user-name/.local/share/tomboy. Gnote notes can be found in /home/your-user-name/.gnote.
  3. Replace the Tomboy or Gnote folder with a symbolic link. Open a terminal window and enter the following command adjust for your own PC;
    ln -vsf Dropbox/gnote /home/your-user-name/.gnote
  4. Repeat steps 1 and 3 on the second, third, fourth, etc PC.
NOTES:
  1. It's best to have Tomboy or Gnote already setup and working before you attempt this.
  2. It's also better to avoid using hidden directories with Dropbox. They don't work very well in my experience.
  3. If you're using Tomboy but would like to switch to Gnote that's not a problem. Gnote is a native Linux implementation of Tomboy that is free of all Mono dependencies. Both applications use exactly the same data file formats and both offer almost exactly the same feature set. So all you need to do is copy the Tomboy files to your Gnote folder.

No comments:

Post a Comment