How To mount Google drive and use in Linux Mint17 Cinnamon

  6 years ago

How To mount and use your Googledrive in Linux Mint

and other on Ubuntu based Linux                                  TuX on Gdrive       

This short tutorial was created for Mint newcomers which own a Gmail account and have no idea how to access their Googledrive in Linux Mint.

It was made simple as possible, inspired by the detailed "How to mount Google Drive on Linux" -

all credits goes to Dan Nanni on and the developer Allessandro Strada

(Copy and paste following commands into your terminal, without the  $  and the following space,

f.e. for "$ sudo apt-get update"  - you just copy and paste   sudo apt-get update )

First of all,

you have to install google-drive-ocamlfuse by adding the official PPA: 
$ sudo add-apt-repository ppa:alessandro-strada/ppa
$ sudo apt-get update
$ sudo apt-get install google-drive-ocamlfuse 
Now you you have to add your username to the (executing)- fuse group: NOTE: 
you have to replace  ?your-username?  with your real username that you use at login! : 
$ sudo usermod -a -G fuse ?your-username?
$ exec su -l $USER  $ google-drive-ocamlfuse ( <- copy & paste the whole line after the first "$" )
Now Firefox (by system default) will open up a window, 
asking you to log in to your Google account. 
Log in with your Google account name and password.
After logging in, Google is requesting for permission. 
Click on "Accept". 
Next you have to grant "gdfuse OAuth2 Endpoint" access to your Google account.
Click on "Allow". 
Then you should see a message saying that google-drive-ocamlfuse was successfully granted access. 
Close the Firefox tab / window to finalize.  
Now a mount point need to be created, 
for that you can access to your Googledrive as a mounted volume, 
it will appear in the window of your "Files" manager (in Cinnamon = Nemo, by default): 
$ mkdir ~/googledrive $ google-drive-ocamlfuse ~/googledrive
$ mount 
Now you should see your "googledrive" - additional attached as a volume in your filemanger,
you can use it like an usual attached device, like an USB stick, f.e. 
It will be available until you shutdown/restart your system.
If you wish to disconnect your googledrive manually, paste this command:
$ fusermount -u ~/googledrive
Once installed as above, 
you can mount your googledrive always with the following terminal command:
$ google-drive-ocamlfuse ~/googledrive 
The "googledrive" will appear again as described above. 
That's it.

A little comfort: Just double-click a file for mount / unmount :
Optional you can go ahead and create a simple mount
and a simple un-mount script on an easy way:
For mounting googledrive by your request:
  1. Create a new document with gedit.
  2. Paste in: google-drive-ocamlfuse ~/googledrive
  3. Safe as f.e: Mount Googledrive  on a certain destination, f.e. desktop
  4. Close gedit.
  5. Locate the file and right-click on it,
     choose properties;
  6. click on access-rights
  7. Mark the field "allow executing as application"
  8. Close the properties window
  9. Double-click your file
 10. Choose  execute  on upcoming window =
     googledrive becomes available / getting mounted
For UN-mounting googledrive by your request:

  1. Create a new document with gedit.
  2. Paste in: fusermount -u ~/googledrive
  3. Safe as f.e: Unmount Googledrive  on a certain destination, f.e. desktop
  4. Close gedit.
  5. Locate the file and right-click on it,
     choose properties;
  6. click on access-rights
  7. Mark the field "allow executing as application"
  8. Close the properties window
  9. Double-click your file
 10. Choose  execute  on upcoming window =

     googledrive gets disconnected / unmounted

Note: You can safe/move these both files to any destination

      inside your home directory you like


Note: Known Bug (moderate):

If you are using Dropbox and you are connected to your Dropbox account

the same time you are connected to your googledrive -

the googledrive unmount command will fail

until you also get disconnected from Dropbox.


If you wish to have additional information and more options like 

automount during startup and more you can check the extended How To as origin,

written by Dan Nanni on

! for synchronisation check out:

Additional Note: The former as working known "grive" is not supported anymore,

even the newer "grive2" is buggy, so leave it alone better.

Rebel450 6 years ago

exactly: 'the system required me an password' ...
So ?

(Note: This How2 is for Linux Mint 17.x, for 18 not checked yet)

sunreal 6 years ago

Hi, when I insert this line:
exec su -l $USER $ google-drive-ocamlfuse
the system required me an password, I have try with my google-account password and with my mint user, but anyway case the konsole it's closed automatically (crasch?).
It's my error? Wich password I must insert?

handler 6 years ago

Just wondering but is there a way to add more than one google drive? Or is it as easy as signing out of google via the browser and then signing in with another account and then just use a different mount point. Correct?

scrognoid 7 years ago

I was hoping to use luckybackup to backup and sync my files to googledrive. Luckybackup does not see googledrive. I can see googledrive and cp files to it from the command line and with the file manager.

Linux Mint 17.3 Mate

scrognoid 7 years ago

Got it. This line

$ mkdir ~/googledrive $ google-drive-ocamlfuse ~/googledrive

should be

$ mkdir ~/googledrive
$ google-drive-ocamlfuse ~/googledrive

scrognoid 7 years ago

How do I use this? I believe the install worked; I have ~/googledrive and ~/google-drive-ocamlfuse. I tried copying a file to each, expecting to see that file on My Drive when I log in to the web interface at No such luck.

Rebel450 7 years ago


are possible (!), tested with Rafaela and Rosa

interesting, isn't it ...

Rebel450 7 years ago

BTW: "Syncronize"
is working, as told before, manually only.
Means, the Google Drive needs to be mounted - then the googledrive folder
inside your user directory can be used as a pseudo-syncfolder.
as soon as the Google Drive gets disconnected, that folder appears empty.

Real Sync is possible with Dropbox yet.

Rebel450 7 years ago

@duketate: (and others who are concerned)
At first make sure that Firefox is still your default browser application.

On 17.3 Cinnamon I encountered similar naughty behavior of Rosa;
seems, that cheeky Lady needs a little bit treatment..

So, if
you get no effect after
$ google-drive-ocamlfuse (Firefox is not coming up, and/or terminal just shut down)

we need to open the "terminal as root" respectively open the terminal and type:
$ su
enter your password
(your input will be invisible, don't get confused and hit enter when finished)
and put in these commands:
$ exec su -l $USER
$ google-drive-ocamlfuse

Now your Firefox starts up and shows the Google login window;
continue as described above
and leave the root terminal with
$ exit
( !! )

Then continue the same way as described above.


duketate 7 years ago

I had re-installed Mint 17 and just tried adding Google drive according to those instructions, up to this point: "Now Firefox (by system default) will open up a window, asking you to log in to your Google account." This never happens. Only terminal window closes.

Rebel450 7 years ago

Thanks for your informative input :-)

Rebel450 7 years ago

something went wrong during the authorization at google, I guess.
May be it is becoming more clear if you check your google account -
which processes are granted successful already.

dickheijkoop 7 years ago

Hi - thank you for this tutorial!
I am following this step by step and after running this command:

a request for permission window is opened firefox. I press allow and I get a message saying that
¨The application was successfully granted access. Please wait for the client to retrieve the authorization tokens.¨
In the terminal window I am getting this error message::
(process:3467): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Segmentation fault

When trying to mount with command ¨google-drive-ocamlfuse ~/googledrive¨ I am getting firefox again with the authorization question and same error.

Any idea?

PalmaHutabarat 7 years ago

why i can't Used!!! error with installation.
invalid invalid invalid

duketate 7 years ago

@Rebel450 - no change after "grive" was removed. Still no sync between Google and my local folder.

duketate 7 years ago

@Rebel450 - I will try removing "grive" and will see if anything changes.

Rebel450 7 years ago

For me sync is working.
"apps" has nothing to do with it at all.

duketate 7 years ago

OK - so I have it installed and have a "googledrive" folder on my machine, under Home. However, there is no sync between the folder and GDrive. When I look into apps in google drive (on-line) it shows that there is "grive" and the only option is to disable it.

Any ideas what is going on?

MagicMint 7 years ago

@Velfess & others: Once for all: The dollar sign ‘$’ stands for the prompt of the command line, hence even if it stands by inadvertence on the same line in some examples above, it always does mean a new command line !

Rebel450 7 years ago

I guess - no -
but may be there is workaround when you allow access to the other
Gmail account manually ;-)

astaria 7 years ago

Nice :) by the way to launch firefox verification, the line
$ exec su -l $USER $ google-drive-ocamlfuse
didn't work,
I ran only this: $ google-drive-ocamlfuse .
I assume right now there isn't a way to link two different google drives?

Rebel450 7 years ago

Looks that you encounter problems with your rights.
No Idea what went wrong - did you run as root (?) = do not (!)
for sure, here is already something not as it should be:
"/dev/sda5 on / type ext4 (rw,errors=remount-ro)"
Just begin again from the start

Rebel450 7 years ago

Good to know,
enjoy !

snowball 7 years ago

Thanks Rebel450

Rebel450 7 years ago

Finally -
someone can say "thanx" ;-)

MagicMint 7 years ago

@kyris: Actually, these should be two commands:

exec su -l $USER


Rebel450 7 years ago

are you sure that you followed step by step ?
Which is your Linux ?

Rebel450 7 years ago

you have to paste:
exec su -l $USER $ google-drive-ocamlfuse

exec su -l $USER $ google-drive-ocamlfuse (<-copy&paste; all after1st"$ ")

try & reply

saintdanbert 7 years ago

When I try the commands as posted, I get the following:
exec su -l $USER $ google-drive-ocamlfuse (<-copy&paste; all after1st"$ ")

bash: syntax error near unexpected token `('
Since the article does not describe what this command is supposed to do, I'll try to discover what is happening and update my comment when I find out.
~~~ 0;-/ Dan

MagicMint 7 years ago

@Rebel450: It depends on what you call by a “beginner”, I think. But you could take a look at any tutorial of @chilipadi too see good examples of what the HTML editor is intended for (viz. to make text better readable) ;-)

Rebel450 7 years ago

"...the command line and the explanations — which could be somewhat more precise, by the way..."

well, as said before - short as possible and in case you need to know more details - link to the extended how to - which will make a newbie confused and tired, I guess.
But am open to constructive critic - can you link " a very easy to understand article for beginners" - I could not find a good example on your articles ;-)

your comment is appreciated anyway

MagicMint 7 years ago

@Rebel450: Good point; you’re in control and that for a trial period much longer than 15 days :-). But @chilipadi is right that the tutorial in its current form be not well suited for a beginner.

For example, the commands, the command line and the explanations — which could be somewhat more precise, by the way — are not clearly delimited. I find the font chosen a bit agressive too ;-)

Rebel450 7 years ago

Thanks for your comment, appreciated.

This How2 was made for users on beginner level;
copy&paste; is not that hard (?!)

You are right with Insync, it is a nice solution AND
it comes with a free try out period of 15 days.

Since I want to avoid that users get ripped off by beta and bleeding edge
or rolling release software -
I do recommend this way, also because am using it by myself without problems and so I do know what am talking about.
Another plus is, that you always have in control,
what you up- and down-load because manual actions are needed for it.
Since the given File manager Nautilus can view a "split view" it is very easy to see, what is going on with your Googledrive online and your googledrive folder in your home directory.

I will add a "script" for unmount/mount, for making the use a bit more comfortable.

chilipadi 7 years ago

Thanks for your tutorial Rebel450 (+1 from me) and thanks also to Dan Nanni for his How to mount Google Drive on Linux article.

I am running Linux Mint 17.2 on my computer and tried to hook up to Google Drive earlier this year using the Grive tool. I quickly found out that Google Drive had changed their API on the 20th Apr 2015 and stopped serving the defunct Document List API (which the Grive tools relied on) so that didn't go too well.

In the end I managed to hooked up to Google Drive using insync which is based out of Singapore, for a one off lifetime payment of $20 USD.

Getting Insync installed and set up on my computer was fairly painless and the software works well for me. If BEGINNER LEVEL Linux Mint units struggle to mount Google Drive using google-drive-ocamlfuse / ppa:alessandro-strada/ppa etc, they shouldn't give up on the idea of being able to access Google Drive from Linux Mint.

Free is always nice, but if you are new to Linux (like me), getting work done on your desktop is also necessary whilst you build your Linux prowess. Swallow your pride and take insync up on their 15 day trial period.

Other projects of interest, out there on the bleeding edge, might include overGrive: Linux Google Drive Desktop Client (Version 3.0.10 beta. Linux Mint is supported. Requires $4.99 USD license.