Hey folks. Wanted to share a little something I came up with last night.
Please note....this is a very long post.

USING GOOGLE DRIVE ON LINUX:
----------------------------------------------------

Thought I would share a solution to something that something that has
been vexing me for awhile. With the help of a friend & a little
searching I have a solution that is liveable for synching Google Drive
on Linux. Plus it allows me to give back to the FLOSS community that has
given me so much.

First a little about my environment. I have a number of Google accounts
for different purposes. This also corresponds to the folder structure in
my Home Drive. See example below:
[ABC]
[DEF]
[123]
[456]

The original article is located at
http://www.howtogeek.com/130380/how-to-use-google-drive-on-linux-2-unofficial-solutions/).
I followed it, but did try some experimentation & was able to get things
working the way I wanted them (God bless FLOSS!).

There is also a project out there aiming to provide a GUI, but it looks
like it has been discontinued. The link is here –
https://github.com/bdalenoord/grive-gtk.

I have included the steps from the original article, but where
appropriate I have also provided my customizations as they appear on my
machine (Kubuntu 12.10).

I used konsole as my terminal software, but I am sure anyone will do.

Step 1: Install Grive.
***********************

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

Step 2: Create Folders.
**************************

Original:
------------
mkdir ~/grive

Customization:
---------------------
mkdir ~/home/<username>/[ABC]/@Grive

You can also manually created the folder as well. I found that you can
also change the name on the fly & the sync will still work!

Step 3: Switch to Directory.
*******************************

Original:
------------
cd ~/grive

Customization:
---------------------
cd ~/home/<username>/[ABC]/@Grive

Step 4: Authenticate Grive.
*******************************

grive -a

You will need to copy the authentication string & paste it into the
address bar of your browser & hit enter. You will be prompted to login
to your Google account & allow access. Take the resulting authentication
code & paste it in the terminal window & hit enter.

Step 5: Synching Grive.
**************************

Original:
------------
cd ~/grive

grive

Customization:
---------------------

Running my customization below works just fine, but I wanted to be able
to run int from a menu. Thanks to a tip from a friend I put the
following into a bash file:

cd ~/home/<username>/[ABC]/@Grive
grive

I saved the file as “ABC_Sync.sh” (no quotes).

Step 6: Using Grive.
***********************
I then saved it to my Home folder & then copied it into /bin by doing
the following:

sudo mkdir /bin/Grive

You will be asked to authenticate with your password. Copy the script
into the Grive folder by doing the following:

sudo cp /home/<username>/ABC_Sync.sh /bin/Grive

Step 7: Menu Entries.
*************************

The last step for me was to create easy to use menu entries to making
synching easier. With KDE Menu Editor I created a “Web Services” menu
entry & under that an entry called “Google Drive.” (Both with no quotes)

I then created menu entries for each of my accounts with the following
parameters:

saved it to my Home folder & then copied it into /bin by doing the
following:
Name: [ABC]
Description: I left this blank but you can fill it in if you like.
Comment: I left this blank but you can fill it in if you like.
Command: bash /bin/Grive/ABC_Sync.sh

You can edit further with an icon if you wish.

Step 8: The Acid Test.
**************************

While the above bash script can be run from a terminal window, I wanted
to make sure it would work from the menu.

After placing some random files in the Grive folder, I navigated to its
menu location; clicked on the appropriate entry & voila! A terminal
window comes up showing the synchronization & the graciously closes.
Looking at Google drive on my android & the website, shows the new files.

This isn't the most elegant solution, but until Google gets its head out
of its arse & decides to actually make good on their promise, this will
do me just fine. I would be happy to share the script with anyone if
they wish.

_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to