Google Drive for Linux – grive
by admin on Jun.01, 2012, under Linux
Google has yet to release a Linux client for its new Google Drive service, but thanks to some enterprising individuals an Open Source client called grive is available at this github repo. Some additional info is available through the grive Google+ site and here.
Google Drive, similar to Dropbox and other file sharing services, allows you to store documents online, share them with others, etc. with a 5GB allocation to start with.
Getting grive for Linux
For Ubuntu 11.10 or later grive should be in your repos.
For other distros, building from source is fairly trivial, but the follow notes might be of assistance.
Building from source
Install the needed libs listed in the README, and cmake then build as below, which uses the typical cmake build process that create a Makefile, etc. (For Suse 12.2: zypper install cmake libgcrypt-devel libjson-devel curl-devel libexpat-devel boost-devel)
git clone git://github.com/Grive/grive.git
cd grive
mkdir build
cd build/
cmake ..
cd grive
make
You can run the binary from here, without running make install.
Running make install did not install the libgrive.so library correctly for me. You can verify if yours did with ldd `which grive` and see. If needed, you can install the library separately:
Installing the library
From the libgrive directory:
grive/build/libgrive$ sudo make install
#ldconfig (as root)
This should install to /usr/local/lib/libgrive.so
Rebuilding
As a note, if you relocate your git repo cmake will freak out as the paths will be wrong. Another lovely benefit of cmake. To clean up and rebuild if needed:
In your build directory:
mv grive/ grive.old
mv CMakeCache.txt CMakeCache.txt.old
cmake ..
Okay, okay – let’s use it already!
Run the resultant binary and connect it to your Google Drive via the nifty Google API. (Create a sync folder first, in which to they sync contents):
mkdir ~/Grive
cd ~/Grive
grive -a
Go to the Google link provided and then enter the API key so grive can talk to your Google Drive. Grive then downloads your drive contents to the local folder.
Now, push stuff up!
echo “Pushing this to my Google Drive.” > grive.push.test.txt
grive
View your drive contents at https://drive.google.com/#my-drive and verify your file has been pushed.
That’s all there is to syncing folders – pretty easy. You can add the -V option for more verbose log messages.
Security via Encfs
For the security conscious, encfs can transparently encrypt files stored in an encfs mounted directory. I use this to mount a encrypted folder in Dropbox to an unencrypted mount point in my home directory. Anything dropped in the mount point dir is AES encrypted and stored in the folder in Dropbox. I find this extremely useful and it integrates with Dropbox well. More information on encfs and integrating it Dropbox is here. Though I’ve not tried it yet, I see no reason it could not also be used with Google Drive folders as well.
Conclusion
Google, despite being a bit late to this game, is sure to win over many people with Google Drive especially heavy Google Docs users or who may be otherwise new to this type service. There is a lot of competition with Dropbox, Spideroak, S3, and Sky Drive – but Google has not exactly been first to market in other areas, which they then dominated. For myself, Google Drive is somewhat handy but I’ve been using Dropbox for a good while now, and Google Drive really offers me nothing more compelling feature wise than I enjoy with Dropbox. I also like Dropbox’s file recovery options (the pack rat option makes available all previous versions of an object, nothing is ever really deleted) and I like how all clients are automatically synced – no action is required. Still, options are good!
If you would like to try Dropbox, see this previous post which also links to a referral that will give you (and me) an additional 250MB of storage.
Another interesting option is SparkleShare which allows you to store your files in a git repo – be it github, gitorious or a bare repo on your own server. Very cool. The open source client is available for Linux, OSX and Windows. This is also an interesting and compelling new way to centrally save, distribute and share files.
Leave a Reply
You must be logged in to post a comment.
June 19th, 2012 on 6:56 pm
Updated info here
http://www.lbreda.com/grive/installation
October 13th, 2012 on 9:28 pm
Great instructions, I ran into difficulties with the installation instructions from the grive site itself on opensuse 12.1.
I just followed the instructions above to the letter and it worked a charm. Currently downloading the contents of my Google Drive.
Thanks a lot.
December 17th, 2012 on 1:32 pm
thanks from belgium
a sabayon user
git clone git://github.com/Grive/grive.git
December 17th, 2012 on 7:06 pm
Updated the github link – thanks!