<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Rclone on foosel.net</title><link>https://foosel.net/tags/rclone/</link><description>Recent content in Rclone on foosel.net</description><generator>Hugo</generator><language>en-us</language><copyright>Gina Häußge (foosel)</copyright><lastBuildDate>Sun, 19 Feb 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://foosel.net/tags/rclone/feed.xml" rel="self" type="application/rss+xml"/><item><title>How to automatically sync screenshots from the Steamdeck to Google Photos</title><link>https://foosel.net/til/how-to-automatically-sync-screenshots-from-the-steamdeck-to-google-photos/</link><pubDate>Sun, 19 Feb 2023 00:00:00 +0000</pubDate><guid>https://foosel.net/til/how-to-automatically-sync-screenshots-from-the-steamdeck-to-google-photos/</guid><description>&lt;p&gt;As a follow-up to &lt;a href="https://foosel.net/til/how-to-automatically-sync-screenshots-from-the-steamdeck-to-google-drive/"&gt;my earlier post about how to sync screenshots to Google Drive&lt;/a&gt; here&amp;rsquo;s how to achieve the same but with a dedicated &amp;ldquo;Steamdeck&amp;rdquo; album on Google Photos instead.&lt;/p&gt;
&lt;p&gt;Once again we are using &lt;code&gt;rclone&lt;/code&gt; for syncing.&lt;/p&gt;
&lt;p&gt;First I created a new target &lt;code&gt;gphoto&lt;/code&gt; by running &lt;code&gt;~/bin/rclone config&lt;/code&gt; again and then following &lt;a href="https://rclone.org/googlephotos/"&gt;these steps&lt;/a&gt;. Quick summary:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;New remote&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gphoto&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Empty application ID and secret&lt;/li&gt;
&lt;li&gt;Full access&lt;/li&gt;
&lt;li&gt;No advanced config&lt;/li&gt;
&lt;li&gt;Use web browser to authenticate&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I then created a new album:&lt;/p&gt;</description><content:encoded><![CDATA[<p>As a follow-up to <a href="/til/how-to-automatically-sync-screenshots-from-the-steamdeck-to-google-drive/">my earlier post about how to sync screenshots to Google Drive</a> here&rsquo;s how to achieve the same but with a dedicated &ldquo;Steamdeck&rdquo; album on Google Photos instead.</p>
<p>Once again we are using <code>rclone</code> for syncing.</p>
<p>First I created a new target <code>gphoto</code> by running <code>~/bin/rclone config</code> again and then following <a href="https://rclone.org/googlephotos/">these steps</a>. Quick summary:</p>
<ol>
<li><code>New remote</code></li>
<li><code>gphoto</code></li>
<li>Empty application ID and secret</li>
<li>Full access</li>
<li>No advanced config</li>
<li>Use web browser to authenticate</li>
</ol>
<p>I then created a new album:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>rclone mkdir gphoto:album/Steamdeck
</span></span></code></pre></div><p>and adjusted <code>~/bin/sync_screenshots</code> to use the new remote and remote path:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>REMOTE_NAME<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;gphoto&#39;</span>
</span></span><span style="display:flex;"><span>REMOTE_DIR<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;album/Steamdeck&#39;</span>
</span></span></code></pre></div><p>That was all.</p>
<p>Obviously the same can be done with any of the other sync targets that <code>rclone</code> supports, of which <a href="https://rclone.org/overview/">there are many</a>. For ownCloud or NextCloud it looks like <a href="https://rclone.org/webdav/">WebDAV</a> is the right option to choose.</p>
<p><em>Update 2025-03-25</em>: There&rsquo;s now also a <a href="/til/how-to-automatically-sync-screenshots-from-the-steamdeck-to-immich/">TIL on how to do the same for Immich</a>.</p>
]]></content:encoded></item><item><title>How to automatically sync screenshots from the Steamdeck to Google Drive</title><link>https://foosel.net/til/how-to-automatically-sync-screenshots-from-the-steamdeck-to-google-drive/</link><pubDate>Sat, 11 Feb 2023 00:00:00 +0000</pubDate><guid>https://foosel.net/til/how-to-automatically-sync-screenshots-from-the-steamdeck-to-google-drive/</guid><description>&lt;p&gt;I wanted to automatically sync the screenshots I take on my Steamdeck to some cloud, without having to manually do it for every single one in the Steamdeck&amp;rsquo;s own uploader.&lt;/p&gt;
&lt;p&gt;I came across &lt;a href="https://gist.github.com/pegasd/048bd5d53558f066765253d55a456306"&gt;this gist by pegasd&lt;/a&gt; that accomplishes this via rclone, a path monitoring systemd service and some reconfiguration in Steam. However, I had to adjust things slightly for everything to really work - I could imagine that some past Steam update changed things slightly vs when the gist was created:&lt;/p&gt;</description><content:encoded><![CDATA[<p>I wanted to automatically sync the screenshots I take on my Steamdeck to some cloud, without having to manually do it for every single one in the Steamdeck&rsquo;s own uploader.</p>
<p>I came across <a href="https://gist.github.com/pegasd/048bd5d53558f066765253d55a456306">this gist by pegasd</a> that accomplishes this via rclone, a path monitoring systemd service and some reconfiguration in Steam. However, I had to adjust things slightly for everything to really work - I could imagine that some past Steam update changed things slightly vs when the gist was created:</p>
<ol>
<li>I had to make sure that I selected the option to make Steam create uncompressed screenshots.</li>
<li>I had to manually start the path watcher.</li>
</ol>
<p>Here&rsquo;s a quick summary of how I managed to make things work on my deck (all credits go to <a href="https://github.com/pegasd">@pegasd</a>, replicating things here mostly so they don&rsquo;t get lost in the future).</p>
<h2 id="prerequisites">Prerequisites</h2>
<p>First of all I switched into Desktop mode.</p>
<p>Since I had not yet done this since upgrading my Deck&rsquo;s SSD, I set a password for my user account by opening a terminal and running <code>passwd</code>. I also made sure to install Firefox from the package manager.</p>
<h2 id="setting-up-the-screenshot-directory">Setting up the screenshot directory</h2>
<p>I opened a terminal and created a dedicated screenshot folder:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>mkdir ~/.steam_screenshots
</span></span></code></pre></div><p>Next I had to tell Steam to use this folder. Still in desktop mode I opened Steam settings and on the &ldquo;In-Game&rdquo; tab set the screenshot folder to the one I had just created. I also made sure to check &ldquo;Save uncompressed copy&rdquo;, as <a href="https://steamcommunity.com/discussions/forum/1/4329623982989743690/#c4329623982989971883">otherwise Steam won&rsquo;t use the just configured custom folder</a>.</p>
<h2 id="installing-and-configuring-rclone">Installing and configuring rclone</h2>
<p>Next, still on the deck, I <a href="https://rclone.org/downloads/">downloaded rclone</a> (&ldquo;Intel/AMD - 64 Bit / Linux&rdquo;). I opened the file browser, opened the archive I had just downloaded and extracted the <code>rclone</code> binary into <code>~/bin</code> (if that doesn&rsquo;t exist yet, just create it).</p>
<p>I then went back to the terminal, ran <code>~/bin/rclone config</code> and configured a new remote <code>gdrive</code> following <a href="https://rclone.org/drive/">these steps</a>. Quick summary:</p>
<ol>
<li><code>New remote</code></li>
<li><code>gdrive</code></li>
<li>Empty application ID and secret</li>
<li>Full access to all files</li>
<li>No service account credentials file</li>
<li>Use web browser to authenticate</li>
<li>Not configured as a shared drive</li>
</ol>
<h2 id="automatic-sync">Automatic sync</h2>
<p>I created a file <code>~/bin/sync_screenshots</code></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e">#!/usr/bin/env bash
</span></span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>RCLONE_BIN<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>HOME<span style="color:#e6db74">}</span><span style="color:#e6db74">/bin/rclone&#34;</span>
</span></span><span style="display:flex;"><span>REMOTE_NAME<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;gdrive&#39;</span>
</span></span><span style="display:flex;"><span>REMOTE_DIR<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;Privat/Steamdeck/Screenshots&#39;</span>
</span></span><span style="display:flex;"><span>SOURCE_DIR<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>HOME<span style="color:#e6db74">}</span><span style="color:#e6db74">/.steam_screenshots&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#e6db74">${</span>RCLONE_BIN<span style="color:#e6db74">}</span> sync <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>SOURCE_DIR<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span> <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>REMOTE_NAME<span style="color:#e6db74">}</span><span style="color:#e6db74">:</span><span style="color:#e6db74">${</span>REMOTE_DIR<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span>
</span></span></code></pre></div><p>and made it executable with <code>chmod +x ~/bin/sync_screenshots</code>.</p>
<p>Then I created a service file for it, <code>~/.config/systemd/user/sync_screenshots.service</code>:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>[Unit]
</span></span><span style="display:flex;"><span>Description=Sync Steam Screenshots
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>[Service]
</span></span><span style="display:flex;"><span>Type=oneshot
</span></span><span style="display:flex;"><span>ExecStart=%h/bin/sync_screenshots
</span></span></code></pre></div><p>and another file setting up a path watcher, <code>~/.config/systemd/user/sync_screenshots.path</code>:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-plain" data-lang="plain"><span style="display:flex;"><span>[Unit]
</span></span><span style="display:flex;"><span>Description=Sync Steam Screenshots
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>[Path]
</span></span><span style="display:flex;"><span>PathModified=%h/.steam_screenshots
</span></span><span style="display:flex;"><span>Unit=sync_screenshots.service
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>[Install]
</span></span><span style="display:flex;"><span>WantedBy=default.target
</span></span></code></pre></div><p>I enabled the automation:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo systemctl daemon-reload
</span></span><span style="display:flex;"><span>systemctl --user enable sync_screenshots.path
</span></span><span style="display:flex;"><span>systemctl --user start sync_screenshots.path
</span></span></code></pre></div><h2 id="a-quick-test">A quick test</h2>
<p>I checked that the path watcher was up and running with <code>systemctl --user status sync_screenshots.path</code>.</p>
<p>Then I created a quick test file in the synced folder</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>touch ~/.steam_screenshots/test
</span></span></code></pre></div><p>and verified it showed up in the target folder on my Google Drive.</p>
<p>Next I deleted the file on the deck and verified it got deleted in Google Drive.</p>
<p>Finally I booted back into Game mode, took a screenshot there as well with <code>Steam</code>+<code>R1</code> and verified this showed up on my Drive.</p>
<p><img alt="A freshly synced screenshot of my Steamdeck&rsquo;s home screen" loading="lazy" src="/til/how-to-automatically-sync-screenshots-from-the-steamdeck-to-google-drive/screenshot.png"></p>
<p>Success!</p>
<p><em>Update 2023-02-19</em>: There is now also a <a href="/til/how-to-automatically-sync-screenshots-from-the-steamdeck-to-google-photos/">TIL on how to do the same for Google Photos</a>.
<em>Update 2025-03-25</em>: And now there&rsquo;s also a <a href="/til/how-to-automatically-sync-screenshots-from-the-steamdeck-to-immich/">TIL on how to do the same for Immich</a>.</p>
]]></content:encoded></item></channel></rss>