Google Drive is an excellent choice for storing files in the cloud. It comes with good support for Windows, OsX and Android. It does however lack support for Linux at the moment, though Google have promised Linux support in the future.
We are for now left with community driven alternatives, Grive is one such great alternative. It works very well, even though it lacks on important feature; automatic sync on folder changes.
There are some sites that have nice descriptions on how to overcome this with periodic syncs. This is good enough most of the times, but it would be better if syncing could be triggered automatically on folder changes, including sub-folders.
There is actually already an existing package that can detect folder changes; Inotify. I have written a small script that utilizes that to detect folder changes and trigger an execution of Grive. That script is detailed full below. It’s small, simple and effective. Just add it to your automatic startup programs.
This is how you do that in Gome2 or Mate.
Follow this link for a guide on how to set up periodic syncs with Grive. It also details how to install Grive if you need help with that. I will neglect to describe that.
The below script should be added to your Startup Applications, save the script as grive.sh and add it.
# Google Drive Grive script that syncs your Google Drive folder on change
# This functionality is currently missing in Grive and there are still no
# official Google Drive app for Linux comming from Google.
# This script will only detect local changes and trigger a sync. Remote
# changes will go undetected and are probably still best sync on a periodic
# basis via cron.
# Kudos to Nestal Wan for writing the excellent Grive software
# Also thanks to Google for lending some free disk space to me
# Peter Österberg, 2012
GRIVE_COMMAND_WITH_PATH=~/bin/grive # Path to your grive binary, change to match your system
GDRIVE_PATH=~/GDrive # Path to the folder that you want to be synced
TIMEOUT=600 # Timeout time in seconds, for periodic syncs. Nicely pointed out by ivanmacx
inotifywait -t $TIMEOUT -e modify -e move -e create -e delete -r $GDRIVE_PATH
cd $GDRIVE_PATH && $GRIVE_COMMAND_WITH_PATH