Google Drive for Linux

Thursday, December 27. 2012

So, Google intros a new service, Drive, and there are clients for Android, Win* and OSX. But not Linux. Many comments, requests, a blog entry with the news that Google is working on it,  "coming really soon now" - and nothing about it since then.

I didn't miss it until I was playing with some files on my android phone and the usb-connection was bitching on me again. Android offered to send the files to my Google Drive, fine, I could always install Drive in a win virtual machine. But before I did this some Google searching led me to a third party project: grive 

Just reached alpha after some weeks of fast developüment. There are binary packages available for Fedora and Debian testing 64, the latter fits my environs but I soon remove the package again, those binaries are from a very outdated version not capable of much. Current version (2012-06-16) is grive version 0.2.0.

Thus: compile it yourself. I fetch the sources as a .zip from and unpack it all in an empty folder.

Or do it the git way:

cd /path/to/yourGriveSourceCodeDir
git clone git://

and for updates:

cd /path/to/yourGriveSourceCodeDir
cd ./grive
git pull origin master

next I turn root to install some packages:


apt-get install libjson0-dev
apt-get install libcurl4-openssl-dev
apt-get install binutils-dev
apt-get install libboost-dev
apt-get install libboost-filesystem-dev

cd into the source folder and there:

mkdir build
cd build
cmake ../
make install

Switching back to my user account I enter  grive -a  which produces n authentication request which I copy from the console output into my browser's adress field, as a result of it I get an authentication key which I enter into the waiting prompt at my console again. Hit enter and grive creates a file ./.grive to store the key within.

The next thing is to create a folder to be my Google Drive, i.e.  ~/documents/GoogleDrive/, cd to it, enter grive in the console synchronzation starts.

Unlike the android or win* clients grive does not sync all the GoogleDocs files (.gttable, .sheet, gdoc) that may be in Google Drive nee Google Docs.And there is no grive demon watching the folder for changes and autosyncing it. Well I can always script a cron job for that.

I notice a somewhat unexpected behavior about the .grive file as grive always expects this file to be in the currently active directory (and not, as I would have expected, in ~/). This might let me set up several independant google drive syncs next to each other but it forces me to always navigate to the local Google Drive root folder before starting the sync or else grive asks for a fresh authentication. I would prefer a config at ~/.grive, possibly with a list of Googledrive folder paths and auth keys.

While grive 0.1.0 didn't sync in the upload direction (local only files were regarded as "deleted on remote" and renamed to hidden) grive 0.2.0 actually uploads them. There is a new Readme which plans a daemon mode for a future release, I worked my way around this manko using iWatch to watch for filechanges on the local side.

But all in all it's not bad for a start, certainly beats what Google has to offer ;-)

grive accepts these parameter:

  • a   authentification
  • l   log
  • v   version
  • V   verbose
  • f   force

Sync with  log goes like:
grive -l.griveLog.txt

The log confirms what I saw before: hidden files and google documents are actively ignored.

grive version 0.2.0 has a number of new options, the sources come with a updated and informative readme and it even has a man page now, so man grive will tell you what it does. 
Some usefull info is at , currently related to version 0.1.1 

(Page 1 of 1, totaling 1 entries)