Installing grive on Debian for Google Drive Sync


Prerequesites:

apt-get install cmake gcc make build-essential libjson0-dev libcurl4-openssl-dev binutils binutils-dev libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-test-dev libboost-test libqt4-core libqt4-dev libqt4-dev-bin libqt4-gui qt4-dev-tools libgcrypt11 libgcrypt11-dev libyajl-dev yajl-tools libjson-c-dev libjson-c2 libjson0-dev git

 

Installation:

git clone git://github.com/Grive/grive.git
cd gdrive
mkdir build
cd build
cmake ../
make
mkdir grive/bgrive/doc
touch grive/bgrive/doc/grive.1
make install

The file /root/grive/bgrive/doc/grive.1 was missing in my case, so I've created a dummy file in order to finish the installation. I didn't figure out however why it was missing. As it's only the man page for grive, I considered it less important.

 

Starting Synchronisation:

The first time, you need to authorize grive to access your Google Drive, there fore do:
/usr/local/bin/grive -a
And follow the instructions (you will have to log into your account with a browser, confirm that you want to allow grive to access your drive and copy paste the given code to the terminal, pretty easy).

Then start the synchronisation for example like this: /usr/local/bin/grive -p /home/<user>/<google-drive-folder>