2

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

3
  • 1
    I think the gnome accounts implementation of Google drive does not support all file operations and not sure you can symbolic link it because of this. Personally I had problems/bugs with the implementation anyway so moved over to ocamlfuse which for me gives a proper share that acts just like any other drive or mount. You can do rsync and all sorts on it. See my post about it here: askubuntu.com/questions/1297241/…
    – codlord
    Mar 18 at 12:25
  • I think GNOME online accounts operate on application (eg. file manager) level, not on a filesystem level. So this seems to be impossible. Re - what's the point of using online accounts? - they allow your cloud data be accessed by GNOME applications.
    – raj
    Sep 20 at 22:56
  • Did you have a chance of testing what was suggested? Please post feedback. Sep 25 at 13:10
1
+100

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.