Create Symbolic link into Gnome's online account --googleDrive?

Solution 1:

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