astrada / google-drive-ocamlfuse

FUSE filesystem over Google Drive
https://astrada.github.io/google-drive-ocamlfuse/
MIT License
5.6k stars 354 forks source link

Raspbian #571

Open mouzzampk2014-zz opened 5 years ago

mouzzampk2014-zz commented 5 years ago

Hi, Is it possible to use this on raspberry pi 3b+? Thank you

BurgInThailand commented 5 years ago

pi3: yes,working. Raspbian 10. I've done it yesterday. Try something like this:

$ sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) $ opam init # ok $ opam update # ok $ opam install depext # ok $ opam depext google-drive-ocamlfuse # ok $ opam install google-drive-ocamlfuse # takes 20+ minutes

BurgInThailand commented 5 years ago

And just now I installed it to my new Pi4, Raspbian GNU/Linux 10 (buster)

I accepted all defaults (hit enter) during install

  1. this will install /usr/local/bin/opam $ sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)

  2. opam init needs bubblewrap (and m4 recommended) $ sudo apt-get install bubblewrap m4

  3. $ opam init # (accept all defaults). Takes 14 min on my pi4

  4. $ opam update # ok

  5. $ opam install depext # OK

  6. $ opam depext google-drive-ocamlfuse # Ok

  7. $ opam install google-drive-ocamlfuse # 9 min

  8. I found out that you have to install fuse as well: $ sudo apt-get update fuse

Now you need to get your security token from google Drive. My pi4 is a headless server so this:

google-drive-ocamlfuse -label YOURNAME

will give you an error (he needs a browser to go to Drive to get the token)

Solution that worked for me: I installed google-drive-ocamlfuse on my desktop Ubuntu 18 and got my token from Drive. Worked. I copied (scp) my state file to the headless server: scp $HOME/.gdfuse/YOURNAME/state headless_server_ip:$HOME/.gdfuse/YOURNAME/state

and on your headless server: google-drive-ocamlfuse -label YOURNAME /mnt/dirXYZ

Bingo.

astrada commented 5 years ago

There is also an option for headless devices.

BurgInThailand commented 5 years ago

I did check out the headless option. But how do I get my Client ID and secret from google without a browser?