Before you start, you can enable SSH server on your Steam Deck so it's a little easier to go through some of these steps:
$ passwd # SSH won't work if user password is not set
$ sudo systemctl enable --now sshdAfterwards, you can connect to your deck using ssh deck@steamdeck command on your desktop/laptop.
Let's configure where the screenshots are stored. Make a directory (I'm using ~/.screenshots, you can pick whatever you want):
$ mkdir ~/.screenshotsThen, in Desktop mode, go to Steam Settings and in the In-Game tab check the Save an external copy of my screenshots option. Select the /home/deck/.screenshots directory for the screenshots (the one we made before).
Note: the original screenshots are still stored in ~/.steam/steam/userdata/${your_steam_id}/760/remote/${steam_game_id}/screenshots/, we're reconfiguring Steam to use a single directory for a PNG copy.
Go to https://rclone.org/downloads/ and download the Intel/AMD - 64 Bit / Linux version. Unzip it, upload just the rclone binary to
your Deck, and put it in a easily accessible directory.
$ unzip rclone-v*-linux-amd64.zip
$ scp rclone-v*-linux-amd64/rclone deck@steamdeck:And then on the Deck:
$ mkdir ~/bin
$ mv ~/rclone ~/bin$ ~/bin/rclone configThe process is a little tedious but is very well described at https://rclone.org/drive/.
Make note of the remote name you configure for your Google Drive (I'll be using google_drive).
First, a service unit (put it in ~/.config/systemd/user/sync_screenshots.service:
[Unit]
Description=Sync Steam Screenshots
[Service]
Type=oneshot
ExecStart=%h/bin/rclone copy %h/.screenshots google_drive:screenshots/%H
The google_drive:screenshots/%H part is where the screenshots will be uploaded. %H translates to the hostname (steamdeck by default on your Steam Deck), so the final directory will be screenshots/steamdeck in your Google Drive.
Then, a path unit that will trigger the service every time a directory is modified
(put it in ~/.config/systemd/user/sync_screenshots.path):
[Unit]
Description=Sync Steam Screenshots
[Path]
PathModified=%h/.screenshots
Unit=sync_screenshots.service
[Install]
WantedBy=default.target
$ systemctl --user daemon-reload
$ systemctl --user enable --now sync_screenshots.path
Thank you for the write-up! I found that unless I tell Steam (in Desktop mode) to save the uncompressed screenshots, it would not use the custom folder. Apparently the custom folder really only applies to PNGs, not JPGs. See also this forum post.