Skip to content

Instantly share code, notes, and snippets.

@pegasd
Last active September 6, 2026 08:26
Show Gist options
  • Select an option

  • Save pegasd/048bd5d53558f066765253d55a456306 to your computer and use it in GitHub Desktop.

Select an option

Save pegasd/048bd5d53558f066765253d55a456306 to your computer and use it in GitHub Desktop.
Auto-sync screenshots from Steam Deck to Google Drive

Auto-sync screenshots from Steam Deck to Google Drive

Enable SSH (optional)

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 sshd

Afterwards, you can connect to your deck using ssh deck@steamdeck command on your desktop/laptop.

Configure Screenshot Directory

Let's configure where the screenshots are stored. Make a directory (I'm using ~/.screenshots, you can pick whatever you want):

$ mkdir ~/.screenshots

Then, 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.

Download rclone

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

Authenticate rclone to Google Drive

$ ~/bin/rclone config

The 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).

Write systemd service and path units

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

Enable systemd path unit

$ systemctl --user daemon-reload
$ systemctl --user enable --now sync_screenshots.path
@foosel

foosel commented Feb 11, 2023

Copy link
Copy Markdown

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.

@pegasd

pegasd commented Feb 11, 2023

Copy link
Copy Markdown
Author

@foosel Interesting! Thanks for your interest and response. I've only used PNGs for this set up, but I can do some testing and maybe update the gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment