3

I have a question to ask, how can I create a symbolic link into the drive's path from my local directory? In the past, I've done it using the OpenDive package, but never tried with gnome's online accounts. Since my drive it seems mounted in nautilus how can I do something like this?!

P.S. if I have to use OpenDrive to do this what's the point of using gnome's online accounts?

Thanks

TassosK
  • 143

1 Answers1

3

You could:

  1. Mount the Google drive
  2. Set a symbolic link as usual

Mount a google drive

  1. Install google-drive-ocamlfuse

    $ sudo add-apt-repository ppa:alessandro-strada/ppa
    $ sudo apt update
    $ sudo apt install google-drive-ocamlfuse
    
  2. Authorize with

    $ google-drive-ocamlfuse
    

    You will be directed to a few screens to authorize gdfuse to use your account, and select which account to use.

  3. Mount your Google drive

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

That's it, you have your Google drive mounted at ~/google-drive. You could check with df -h.

Whenever you want to unmount the Google drive folder, execute the command fusermount -u ~/google-drive.


(Digression) Direct access to the gvfs

Note that you could create a symlink to your (previously gvfs-mounted) Google drive with (typically, YMMV)

$ ln -s /run/user/1000/gvfs/google-drive\:host\=gmail.com\,user\=<your gmail user>/ google-drive/

and then navigate it as a directory. But the file names will be "scrambled", compare what you get by listing the contents with

  1. ls,
  2. gio list google-drive://<your name>@gmail.com/,
  3. gio list google-drive://<your name>@gmail.com/ -ud.

I could even open a pdf in my GDrive directly with okular <scrambled name>.


Related:

  1. https://ostechnix.com/how-to-mount-google-drive-locally-as-virtual-file-system-in-linux/
  2. https://www.techrepublic.com/article/how-to-mount-your-google-drive-on-linux-with-google-drive-ocamlfuse/
  3. https://confluence.cc.lehigh.edu/display/LKB/Ubuntu%3A+Mount+Lehigh+LAN+file+storage+from+the+command+line+with+gio
  4. Creating symbolic link to gio mounted directory results in weird chicken-like symbol instead of colon