Mount Google Drive automatically at startup (as in Nautilus)
I use the mount point /run/user/<user_id>/gvfs/google-drive:host=<host>\,user=<username>/<folder_id>/ in an automated backup script to copy some files on Google Drive regularly, and it works well.
However, I need to click first on the Google Drive icon in Nautilus so that Google Drive is mounted. Is there a way to mount Google Drive automatically at startup?
2 Answers
To automount, you will need to find a command that does that through the command line. Try mounting a Google drive that is correctly configured through Gnome control center through the command line with:
gio mount google-drive://address@Unmount:
gio mount -u google-drive://address@Mount your drive using nautilus. You can then see the mount in the output of
gio mount -lOnce you have that command, include it in your autostart programs to have it executed automatically after login.
1google-drive-ocamlfuse seems to be what you’re looking for. You can use that to authenticate and mount Google Drive to your system. You can then use something like systemd to mount it on startup. Check out this tutorial on the matter:
There are also other mounting options if you don’t want to use systemd.
1