3

As per this article, I am able to get nautilus integration with google drive and can manually copy files into google drive via the GUI, however I would like to be able to write a small shell script to do backups periodically via cron. I cannot seem to find where this is actually mounted?

Via nautilus I see it at google-drive://my.email@gmail.com/ however am a bit confused how this is actually connected/mounted so nautilus can see it and where I can cp files to?

  • 1
    Maybe Use ocamlfuse, and create a Local Folder to use....github.com/astrada/google-drive-ocamlfuse. The startup is not exactly right...Here's mine....@reboot sleep 30 && google-drive-ocamlfuse -o allow_other ~/google/ – EODCraft Staff Dec 1 '18 at 21:05
  • By Default, ocamlfuse is only available to root, so that is why -o allow_other is necessary. Authorization Step is Here...github.com/astrada/google-drive-ocamlfuse/wiki/Authorization – EODCraft Staff Dec 1 '18 at 21:12
  • 2
    Given that I can drag and drop files for syncing with nautilus, is there not a way to do this without using a third party application? Given that I am using Ubuntu 18.04 which has built in support via Setting -> Online Accounts -> Google – mgilbert Dec 2 '18 at 17:03
  • 1
    If it were a mounted filesystem, then you'd be able to see it. There is no mounted filesystem. That files app.... it just uses api calls to get a file listing, and show you some files in a window, then when you click on them or drag them etc, it copies that one file to wherever... Just like using the google drive web interface. – EODCraft Staff Dec 3 '18 at 13:45
  • 1
    Ahhh, okay thanks for clearing up the confusion @EODCraftStaff – mgilbert Dec 3 '18 at 14:05
2

Nautilus integration with google drive uses GVfs (abbreviation for GNOME Virtual file system). You can find GVfs mountpoints in:

/run/user/XXXX/gvfs

where XXXX is the UID of your user.

In my computer, google drive mountpoint is on /run/user/1000/gvfs/....

You can find the list of GVfs mounted filesystems running the following command:

gvfs-mount --list -i

If you want copy Google Drive files using terminal, you must use the gvfs-copy command instead cp.

As despicted here, there are specific gvfs-... type commands to process files in remote locations.

| improve this answer | |

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.