Google Drive Sync for Linux Mint 14 & 15

Linux Mint 14I wanted to synchronize my files to my Google Drive in an easier format than opening up the web interface on my laptop which is running Linux Mint 14. I searched a few options, but many were outdated (such as the old Google Docs FS) or, as in the case of InSync, were a pay option. I stumbled upon Grive. It is fairly straight forward.  The Webupd8 PPA repository seems to be broken, and the application does not install. However, you can download and install the .deb package from UbuntuUpdates.org.

After installing the package, which will install three additional required packages, you can configure and use it doing the following:

Enter the following from your Linux terminal once it is installed:

First, let’s make a directory. You can call this drive anything you want. The name of the directory in this example is ‘grive’.

mkdir -p ~/grive

Navigate to your new directory.

cd ~/grive

We need to set up Google Drive for the first time. You must give the “-a” argument to grant permission to access your Google Drive.

grive -a

After running the command above, copy and paste the URL output into your browser. Google will ask you permission to “Allow Access” for the application. An authentication code will be returned once you allow access. Copy and paste this code into your terminal window and press “Enter”. Now you are set up and ready to sync.

Anytime you want to sync your drive, merely run the “grive” command (no arguments) after navigating to your Google Drive folder form a terminal window. And if you are savvy enough, you can write a shell script to perform this action every time you log in. It is not a fully automated solution, but it does work and takes the hassle out of uploading and downloading files through your web browser.

UPDATE

If you run into any problems, make sure you have the following installed:

  • git
  • cmake
  • build-essential
  • libgcrypt11-dev
  • libjson0-dev
  • libcurl4-openssl-dev
  • libexpat1-dev
  • libboost-filesystem-dev
  • libboost-program-options-dev
  • binutils-dev

And then download it from the repository and compile it to install. Sudo is your friend as well.

git clone git://github.com/Grive/grive.git
cd grive
mkdir build
cd build/
cmake ..
cd grive
make

Although, if you use the grive directory here, you may want to rename the directory you intend to use for your Google Docs.

UPDATE FOR LINUX MINT 15

The grive package that is available in the default repositories is out of date and does not work. Use webupd8’s build instead. The default version of grive that tries to install is version 2.0; the repository below installs 3.0 raring build.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install grive

AUTOMATED BACKUP

You can set up a cron job by doing the following:

crontab -e
Then place this into the file using the editor:

*/15 * * * * cd /home/username/grive && grive

This sets it to run the cron job every 15 minutes. Change the 15 to another variable if you want. Mine is set to run every 30. Username is obviously YOUR user name for your account. And change the grive directory to whatever you have named yours.

*/30 * * * * cd /home/angela/Google_Drive && grive
Angela

About The Author

is a blogger, writer, self-proclaimed geek & nerd, and the gyrl behind Ramblings of a Gyrl. A few cats shy of 'crazy cat lady' status and fully embraces her love of video games, films, cooking, and literature. She is currently writing her first novel for publication.

This article has 2 comments

  1. Angela

    If you attempt to install from the default repositories on Linux Mint 15, it will generate the following bug:

    grive: error while loading shared libraries: libbfd-2.23-system.so: cannot open shared object file: No such file or directory

    As noted here: https://bugs.launchpad.net/linuxmint/+bug/1196011

    However, some claim that on Ubuntu 13.04 that the solution of creating a system link will work:

    sudo ln -s /usr/lib/libbfd-2.23.2-system.so /usr/lib/libbfd-2.23-system.so

    (Source: https://bugs.launchpad.net/ubuntu/+source/grive/+bug/1155194)

    As of yet, this has not worked as a solution for Mint 15 and found the newer version from the updated repository to work instead.

  2. Angela

    Grive appears to have some issues on Linux Mint 16. As of this time, I’m no longer running Grive and have opted to use Dropbox instead. Of course, this saddens me because I liked using Google Drive over Dropbox. However, without a solution that can sync dependably with it, I am going to have to go another route.

Leave a Reply