Gnote – How to Sync Gnote Notes

gnote

I'm looking for a way to keep a desktop and a laptop in sync. Something that I want to keep in sync are Gnote notes.

If it matters I can connect to my desktop from anywhere via an URL but my laptop is harder to access since it might be behind NAT and such.

Best Answer

Gnote holds its notes in the folder ~/.local/share/gnote

Therefore you could use something like Unison (install unison-gtk from software centre) to sync the gnote folder between the two computers if they are on the same network.

Unison

Since you are behind a NAT then you can use the concept of reverse ssh connections - rather than duplicate, there is an excellent step-by-step in this AU question and answer. However during my testing, I found that the version of unison in Natty doesnt work with the openssh version in Natty.

So here is a guide to get Unison to work.

On each PC you'll need to install openssh-server to enable you to ssh between each PC at any one time together with unison

sudo apt-get install openssh-server unison unison-gtk

Now open your browser and download the Debian version of unison-gtk - i386 for 32bit and amd64 for 64bit Natty and install it N.B. the version in Natty has a serious SSH bug and does not work.

cd Downloads
sudo dpkg -i unison-gtk_2.32.52-3+b1_i386.deb

Follow the openssh-server guide above to setup a SSH link between your two computers. Test the link both ways to confirm you can see both computers home directory.

i.e. from desktop pc to NAT pc

ssh -p 6222 localhost

and from NAT pc to desktop pc

ssh username@desktoppc

Now configure a unison configuration on your desktop pc

unison-gtk &

enter the FULL path to your gnote folder as per this picture

enter image description here

Now enter both the NAT pc gnote folder and the socket number 62222

enter image description here

Then click the SSH radiobutton and enter the host name localhost

enter image description here

You will now be able to sync folders either manually or automatically.

To do the same from the NAT pc start unison-gtk, configure the local gnote folder as above, and the desktop pc folder as per this picture

enter image description here

Related Question