启动时自动挂载 Google Drive(如 Nautilus)

Mar*_*arc 5 nautilus gvfs

/run/user/<user_id>/gvfs/google-drive:host=<host>\,user=<username>/<folder_id>/在自动备份脚本中使用挂载点定期复制 Google Drive 上的一些文件,并且运行良好。

但是,我需要先单击 Nautilus 中的 Google Drive 图标,以便安装 Google Drive。有没有办法在启动时自动挂载 Google Drive?

van*_*ium 5

要自动挂载,您需要找到一个通过命令行执行此操作的命令。尝试通过命令行安装通过 Gnome 控制中心正确配置的 Google 驱动器:

gio mount google-drive://address@gmail.com/
Run Code Online (Sandbox Code Playgroud)

卸载:

gio mount -u google-drive://address@gmail.com/
Run Code Online (Sandbox Code Playgroud)

使用 nautilus 挂载您的驱动器。然后您可以在输出中看到挂载

gio mount -l
Run Code Online (Sandbox Code Playgroud)

获得该命令后,将其包含在自动启动程序中,以便在登录后自动执行。