Google Drive: Difference between revisions

From LWP-Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
Line 7: Line 7:
  sudo apt-get install google-drive-ocamlfuse
  sudo apt-get install google-drive-ocamlfuse
Create the folder you want to use for Google Drive:
Create the folder you want to use for Google Drive:
  mkdir <the folder you want to use for google drive>
  mkdir "${gdrive:=~/gdrive}"  #  replace ~/gdrive for <the folder you want to use for google drive>
Run the following command to open a browser, directing you to a page that will ask you to allow access to your Google
Run the following command to open a browser, directing you to a page that will ask you to allow access to your Google
account (this might take a minute):
account (this might take a minute):
  google-drive-ocamlfuse
  google-drive-ocamlfuse
The next command will actually mount your Google Drive on your folder:
The next command will actually mount your Google Drive on your folder:
  google-drive-ocamlfuse <the folder you want to use for google drive>
  google-drive-ocamlfuse "${gdrive:=~/gdrive}" # replace ~/gdrive for <the folder you want to use for google drive>
Because you don't want to do that every time you login, add the following to your ~/.bashrc file:
Because you don't want to do that every time you login, add the following to your ~/.bashrc file:
  [ -d "${gdrive:=~/gdrive}" ] || mkdir -p "${gdrive}"  # or any other path
  [ -d "${gdrive:=~/gdrive}" ] || mkdir -p "${gdrive}"  # or any other path

Latest revision as of 13:33, 5 February 2024

Google Drive has no desktop client for linux. There is however a tool which let's you mount your Google Drive. Here's how to use it.


Install the tool:

sudo apt-get install google-drive-ocamlfuse

Create the folder you want to use for Google Drive:

mkdir "${gdrive:=~/gdrive}"  #  replace ~/gdrive for <the folder you want to use for google drive>

Run the following command to open a browser, directing you to a page that will ask you to allow access to your Google account (this might take a minute):

google-drive-ocamlfuse

The next command will actually mount your Google Drive on your folder:

google-drive-ocamlfuse "${gdrive:=~/gdrive}" # replace ~/gdrive for <the folder you want to use for google drive>

Because you don't want to do that every time you login, add the following to your ~/.bashrc file:

[ -d "${gdrive:=~/gdrive}" ] || mkdir -p "${gdrive}"  # or any other path
if mount -v | grep -q "fuse.google-drive-ocamlfuse" ; then
    google-drive-ocamlfuse "${gdrive}"
fi