Monday, October 14, 2013

Grive – A Command Line Based [Unofficial] Google Drive Client For Linux

http://mylinuxbook.com/grive-a-command-line-google-drive-client-for-linux-2

With Linux users still waiting for an official Google drive client, there are some unofficial clients that are being used by the Linux community. In this 4-part series, we will cover four different unofficial Google drive clients that you can use till an official client is release by the search engine giant. In this article, we will discuss about a command line google drive client for Linux — Grive.

Grive

grive-main
A snapshot from the man page of Grive
Grive is an open source Google drive client for Linux that is developed in C++ programming language and is released under GPLv2 license. It uses Google Document List API for its interaction with Google servers.

Testing Environment

  • OS – Ubuntu 13.04
  • Shell – Bash (4.2.45)
  • Application – Grive 0.2.0-1

A Brief Tutorial

Once installed, follow these steps to get started with this google drive client :
  1. Create a folder (let’s say gDrive) in your home directory –> mkdir ~/gDrive
  2. Change your current directory to gDrive –> cd gDrive
  3. Run the authorization token command inside the same directory –> grive -a
Ideally the step-3 (mentioned above) should kick-start the authentication process but because of this known BUG in Ubuntu 13.04, I got the following error :
grive-1
As a workaround (mentioned in the comments under the bug report), I tried the following command :
grive-2
After this work around, I repeated the step-3 again and this time the authorization process started. Firstly, a very long URL was produced in output which the user is supposed to open in a web browser. So, I copied it.
grive-3
and then opened it in Firefox web browser.
grive-4
After accepting the terms and conditions, I was presented with the a code:
grive-5As instructed, I copied the code on the command prompt
grive-6
and the authentication process completed. Gdrive then automatically started syncing the files from my google drive account.
grive-7
and it continued doing so until it finished the syncing process.
grive-8
After the syncing process completed, I could see all the google drive files in my folder gDrive.
Now, it was the time to test this command line application, so I created a test file named test_grive.txt in the folder gDrive and executed the command grive (to initiate syncing process, -a option is not required now) from the same directory.
grive-9
Once the file was synced, I opened the web interface of my google drive to confirm whether the file was really synced or not.
grive-10
As you can see, the file test_grive.txt was actually synced back to the google drive.
NOTE – Grive does not sync with google drive servers automatically. You can either create a cron job or create an alias of ‘cd ~/grive && grive‘ to let this command line application sync with google drive servers.

Download/Install

Here are some of the important links related to this application:
Ubuntu users can also download Grive from Ubuntu Software Centre.

Pros

  • Can download as well as upload the changes.
  • Being command line based, It offers quick syncing with the google drive servers
  • It can be extended easily as it is open source.

Cons

  • File and folders with multiple parents are not supported.
  • Downloading Google documents is also not supported.

Conclusion

Grive is a good command line alternative for those who are still waiting for an official Google drive client. It does basic (download, upload) stuff neatly and can be used for day-to-day work. You can give it a try, it won’t disappoint you.

No comments:

Post a Comment

Post a Comment