{"id":772,"date":"2012-06-01T06:48:37","date_gmt":"2012-06-01T10:48:37","guid":{"rendered":"http:\/\/www.timelordz.com\/blog\/?p=772"},"modified":"2013-10-17T07:18:47","modified_gmt":"2013-10-17T11:18:47","slug":"google-drive-for-linux-grive","status":"publish","type":"post","link":"https:\/\/www.timelordz.com\/blog\/2012\/06\/google-drive-for-linux-grive\/","title":{"rendered":"Google Drive for Linux &#8211; grive"},"content":{"rendered":"<p>Google has yet to release a Linux client for its new <a title=\"Google Drive\" href=\"https:\/\/drive.google.com\/start\" target=\"_blank\">Google Drive<\/a> service, but thanks to some enterprising individuals an Open Source client called grive is available at this <a title=\"github repo\" href=\"https:\/\/github.com\/Grive\/grive\" target=\"_blank\">github repo<\/a>. Some additional info is available through the grive <a title=\"Grive on Google+\" href=\"https:\/\/plus.google.com\/116411649000013553715\/posts\" target=\"_blank\">Google+ site<\/a> and <a title=\"lbreda Site\" href=\"http:\/\/www.lbreda.com\/grive\/\" target=\"_blank\">here<\/a>.<\/p>\n<p>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.<\/p>\n<p><span style=\"color: #00ff00;\"><strong>Getting grive for Linux<\/strong><\/span><\/p>\n<p>For Ubuntu 11.10 or later grive should be in your repos.<br \/>\nFor other distros, building from source is fairly trivial, but the follow notes might be of assistance.<\/p>\n<p><span style=\"color: #00ff00;\"><strong>Building from source<\/strong><\/span><\/p>\n<p>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)<\/p>\n<p style=\"color: #3366ff;\">git clone git:\/\/github.com\/Grive\/grive.git<br \/>\ncd grive<br \/>\nmkdir build<br \/>\ncd build\/<br \/>\ncmake ..<br \/>\ncd grive<br \/>\nmake<\/p>\n<p>You can run the binary from here, without running make install.<\/p>\n<p>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:<\/p>\n<p><span style=\"color: #00ff00;\"><strong>Installing the library<\/strong><\/span><\/p>\n<p style=\"color: #3366ff;\"><span style=\"color: #000000;\">From the libgrive directory:<\/span><br \/>\ngrive\/build\/libgrive$ sudo make install<br \/>\n#ldconfig (as root)<\/p>\n<p>This should install to \/usr\/local\/lib\/libgrive.so<\/p>\n<p><span style=\"color: #00ff00;\"><strong>Rebuilding<\/strong><\/span><\/p>\n<p>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:<\/p>\n<p style=\"color: #3366ff;\"><span style=\"color: #000000;\">In your build directory:<\/span><br \/>\nmv grive\/ grive.old<br \/>\nmv CMakeCache.txt CMakeCache.txt.old<br \/>\ncmake ..<\/p>\n<p><span style=\"color: #00ff00;\"><strong>Okay, okay &#8211; let&#8217;s use it already!<\/strong><\/span><\/p>\n<p style=\"color: #3366ff;\"><span style=\"color: #000000;\">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):<\/span><\/p>\n<p style=\"color: #3366ff;\">mkdir ~\/Grive<br \/>\ncd ~\/Grive<br \/>\ngrive -a<\/p>\n<p>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.<\/p>\n<p>Now, push stuff up!<\/p>\n<p style=\"color: #3366ff;\">echo &#8220;Pushing this to my Google Drive.&#8221; &gt; grive.push.test.txt<br \/>\ngrive<\/p>\n<p>View your drive contents at https:\/\/drive.google.com\/#my-drive and verify your file has been pushed.<\/p>\n<p>That&#8217;s all there is to syncing folders &#8211; pretty easy. You can add the -V option for more verbose log messages.<\/p>\n<p><strong><span style=\"color: #00ff00;\">Security via Encfs<\/span><\/strong><\/p>\n<p>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 <a title=\"encfs and dropbox\" href=\"http:\/\/www.timelordz.com\/blog\/2011\/03\/dropbox-and-encfs-encrypting-local-files\/\" target=\"_blank\">here.<\/a> Though I&#8217;ve not tried it yet, I see no reason it could not also be used with Google Drive folders as well.<\/p>\n<p><span style=\"color: #00ff00;\"><strong>Conclusion<\/strong><\/span><\/p>\n<p>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 &#8211; 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&#8217;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.\u00a0 I also like Dropbox&#8217;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 &#8211; no action is required. Still, options are good!<\/p>\n<p>If you would like to try Dropbox, see this <a title=\"Dropbox post\" href=\"http:\/\/www.timelordz.com\/blog\/2009\/05\/dropbox-on-suse-111-with-kde\/\" target=\"_blank\">previous post<\/a> which also links to a referral that will give you (and me) an additional 250MB of storage.<\/p>\n<p>Another interesting option is <a title=\"SparkleShare\" href=\"http:\/\/sparkleshare.org\/\" target=\"_blank\">SparkleShare<\/a> which allows you to store your files in a git repo &#8211; 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.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-772","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts\/772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/comments?post=772"}],"version-history":[{"count":5,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts\/772\/revisions"}],"predecessor-version":[{"id":806,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/posts\/772\/revisions\/806"}],"wp:attachment":[{"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/media?parent=772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/categories?post=772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.timelordz.com\/blog\/wp-json\/wp\/v2\/tags?post=772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}