Jump to content

Headless ocamlfuse google drive


EODCrafter
Go to solution Solved by EODCrafter,

Recommended Posts

EODCrafter

Correct Procedure added as Best Answer.... 

Edited by EODCrafter
Link to comment
Share on other sites

  • Solution
EODCrafter

Got it @@Luke ! Please add this to your Wiki for Linux users...

 

Installation

  1. Open a terminal window.
  2. Add the necessary PPA with the command sudo add-apt-repository ppa:alessandro-strada/ppa.
  3. When prompted, type your sudo password and hit Enter.
  4. Update app with the command sudo apt-get update.
  5. Install the software by issuing the command sudo apt-get install google-drive-ocamlfuse.

Authorization

 

The next step is to authorize google-drive-ocamlfuse so it will have access to your Google account. To do this, go back to the terminal window and issue the command google-drive-ocamlfuse. This command will open a browser window that will either prompt you to log into your Google account or, if you're already logged in, ask you to allow google-drive-ocamlfuse access to your Google account. If you've not logged in, do so and then click Allow. The next window (which appeared on a Ubuntu 16.04 desktop, but not an Elementary OS Freya desktop) will ask you to grant permission for both gdfuse and OAuth2 Endpoint to access your Google account. Click Allow again. The next browser screen will inform you to wait until the authorization tokens have downloaded; you can minimize the browser at this point. When your terminal prompt returns (Figure A), you know the tokens have been downloaded, and you're ready to mount.

 

Headless Authorization Requires following this >>> Guide

Figure A

googledriveocamlfuse3.png

 

The app has been authorized, and you're ready to go. Mounting your Google Drive

Before you mount your Google Drive, you must create a folder to serve as the mount point. From the terminal, issue the command mkdir ~/google to create a new folder in your home directory. Finally, issue the command google-drive-ocamlfuse ~/google to mount your Google Drive to the google-drive folder.

At this point, you should see your Google Drive files/folders populate in the google-drive folder. You can work with Google Drive as if it were a local folder system.

When you want to unmount the google-drive folder, issue the command fusermount -u ~/google.

It's no GUI, but it works like a champ

The mount is not accessible to other users, not even to root user or Emby. (That's a FUSE feature.) To allow
access for other users:

​add/uncomment a line user_allow_other to /etc/fuse.conf

$sudo nano /etc/fuse.conf

and -o allow_other or o -allow_root option to google-drive-ocamlfuse command

$google-drive-ocamlfuse -o allow_other ~/google

Wullah! Google Drive is now accessible to Emby! 

To add to Reboot and automatically Mount at each reboot make a Cron Job....

 

5bc7a0cf2108c_Screenshotfrom201810171536

 

* Ignore my TV Guide Refresh...you only need the 1st line.

Edited by EODCrafter
Link to comment
Share on other sites

  • 1 month later...
reneboulard

Maybe you can help me with setting up google-drive-ocamlfuse to automount on reboot of ubuntu headless system.

 

I followed the instruction available on the wiki of ocamlfuse without sucess.

 

When I rebout the system I need to start ocamfule manualy, would be nice to have it automount.

 

thank you for your help.

Link to comment
Share on other sites

EODCrafter

Re-did my Tutorial for all Steps please See above.....

Edited by EODCrafter
Link to comment
Share on other sites

reneboulard

Make a cron job to mount it......

 

$crontab -e

 

Add this line at the bottom of the file.....

@[member="reboot"] sleep 30 && google-drive-ocamlfuse -o allow_other ~/google/
 

^^^^^The shouldn't allow users with names like that lol.

 

Thank you for the answer,

 

I set  up the cron job.  It wait 30 sec and try to start ocamfuse but it fail.

 

the following message is in the logfile CRON[682]: (CRON) info (No MTA installed, discarding output)

 

Will need to investigate further on another day.

Link to comment
Share on other sites

EODCrafter

Re-Did Tutorial Please delete all these....

Edited by EODCrafter
Link to comment
Share on other sites

reneboulard

Thank you for the answer,

 

I set  up the cron job.  It wait 30 sec and try to start ocamfuse but it fail.

 

the following message is in the logfile CRON[682]: (CRON) info (No MTA installed, discarding output)

 

Will need to investigate further on another day.

 

I managed to get it to work.

 

I resetted everything, rebuild the vps from scratch, and everthing is working.

 

I think my initial mistake was to setup ocamlfuse with the emby account.

 

thank for the support

 

 
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...