https://rclone.org/install/
gcpにて
https://drive.google.com/ からマウント元フォルダを作成しておく
mkdir ~/gdrive
vi ~/.config/systemd/user/rclone-mount.service
cat ~/.config/systemd/user/rclone-mount.service
[Unit]
Description=rclone mount Google Drive
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount gdrive:マウント元フォルダ名 %h/gdrive \
--vfs-cache-mode full \
--vfs-read-chunk-size 16M \
--vfs-cache-max-age 24h
ExecStop=/bin/fusermount -u %h/gdrive
Restart=on-failure
[Install]
WantedBy=default.target
※「ExecStartの行のgdrive:のgdrive」はrclone configで設定した名前
systemctl --user daemon-reload
systemctl --user enable --now rclone-mount.service
ocarina@ocarina-AB350-Pro4:~$ cat ~/.config/user-dirs.dirs
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/gdrive/desktop"
XDG_DOWNLOAD_DIR="$HOME/ダウンロード"
XDG_TEMPLATES_DIR="$HOME/テンプレート"
XDG_PUBLICSHARE_DIR="$HOME/公開"
XDG_DOCUMENTS_DIR="$HOME/gdrive/documents"
XDG_MUSIC_DIR="$HOME/ミュージック"
XDG_PICTURES_DIR="$HOME/gdrive/pictures"
XDG_VIDEOS_DIR="$HOME/gdrive/videos"
xdg-user-dirs-update
ログインし直すと新しい設定が反映される