Skip to content

Commit 5a4d4ff

Browse files
PhotoboothPhotobooth
authored andcommitted
docs(faq): USB sync, sudoers, and move2usb/copy.chk
- Expand automatic USB sync: Polkit, sudoers 021, installer re-run, FAT/exFAT label. - Document move2usb same target as Synctodrive and copy.chk at USB root. - Rebuild static faq/ site (mkdocs). - en.json + install comment: no standalone setup script; use install-photobooth.sh USB Sync policy. Made-with: Cursor
1 parent c4d1a53 commit 5a4d4ff

File tree

8 files changed

+59
-26
lines changed

8 files changed

+59
-26
lines changed

docs/faq/index.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -261,20 +261,35 @@ Take a look for "Loaded Configuration File" to get the path of your php.ini, you
261261

262262
## Automatic picture syncing to USB stick
263263

264-
This feature will automatically and in regular intervals copy (sync) new pictures to a plugged-in USB stick
264+
This feature copies (syncs) new pictures to a plugged-in USB stick on a schedule using `rsync` on Linux.
265265

266-
Use the [Photobooth Setup Wizard](https://photoboothproject.github.io/install/setup_wizard) to get the operating system setup in place.
266+
### Operating system setup (Linux)
267267

268-
- 6. Permissions -> USB Sync policy
268+
The web server user (`www-data`) must be allowed to mount and unmount the stick. Options:
269269

270-
The target USB device is selected through the admin panel.
270+
- [Photobooth Setup Wizard](https://photoboothproject.github.io/install/setup_wizard) -> **Permissions** -> **USB Sync policy** installs Polkit rules for `udisksctl` and passwordless sudo for `mount` / `umount` (and `mkdir` under `/media`) via `/etc/sudoers.d/021_www-data-usb-sync`. Polkit and sudoers are applied as independently as possible: if one step fails, the other may still succeed. The same menu entry applies during a fresh install (general permissions) and can be run again after system updates to re-apply the rules.
271271

272-
A USB drive / stick can be identified either by the USB stick label (e.g. `photobooth`), the operating system specific USB device name (e.g. `/dev/sda1`) or the USB device system subsystem name (e.g. `sda`). The preferred method would be the USB stick label (for use of a single USB stick) or the very specific USB device name, for different USB stick use. The default config will look for a drive with the label photobooth. The script only supports one single USB stick connected at a time
272+
Prefer a **FAT32 or exFAT** volume whose **volume label** matches the identifier you set in the admin panel.
273273

274-
Pictures will be synced to the USB stick matched by the pattern, as long as it is mounted (aka USB stick is plugged in)
274+
### Admin configuration
275275

276-
Debugging: Check the server logs for errors at the Debug panel: [http://localhost/admin/debugpanel](http://localhost/admin/debugpanel) (
277-
or [http://localhost/photobooth/admin/debugpanel](http://localhost/photobooth/admin/debugpanel)).
276+
Enable sync, interval, and target in the admin panel (Synctodrive / USB sync settings).
277+
278+
A USB drive can be matched by:
279+
280+
- Volume label (e.g. `photobooth`) -- best for one dedicated stick
281+
- Block device (e.g. `/dev/sda1`)
282+
- Short subsystem name (e.g. `sda`)
283+
284+
Use only **one** connected USB stick at a time. Sync runs while the matching volume is mounted.
285+
286+
### Remote buzzer "Move to USB"
287+
288+
The **`move2usb`** action uses the **same** USB target and rsync layout as automatic sync and needs the **same** Linux permissions. After a successful run the server checks for **`copy.chk` on the root of the USB volume** (not under a `data` folder). See [Remote Buttons](remote-button.md).
289+
290+
### Debugging
291+
292+
Check server logs in the admin Debug panel: [http://localhost/admin/debugpanel](http://localhost/admin/debugpanel) (or [http://localhost/photobooth/admin/debugpanel](http://localhost/photobooth/admin/debugpanel)).
278293

279294
---
280295

docs/faq/remote-button.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Notes
6161

6262
- Channel: `photobooth-socket`
6363
- Commands: `start-picture`, `start-collage`, `collage-next`, `start-custom`, `start-video`, `print`, `rotary-cw`, `rotary-ccw`, `rotary-btn-press`, `move2usb`
64+
- `move2usb` runs the same rsync-based copy as **Synctodrive** to the USB target configured in the admin panel. On Linux it needs the same mount/umount setup as [automatic USB picture sync](index.md#automatic-picture-syncing-to-usb-stick). After rsync, the remotebuzzer server expects **`copy.chk` at the root of the USB volume** to confirm success.
6465
- Response: `completed` after the workflow finishes.
6566

6667
## 4) Remote trigger via simple web requests (HTTP)
@@ -76,7 +77,7 @@ Notes
7677
- `[Base URL]/commands/start-custom`
7778
- `[Base URL]/commands/start-print`
7879
- `[Base URL]/commands/start-video`
79-
- `[Base URL]/commands/start-move2usb`
80+
- `[Base URL]/commands/start-move2usb` (same USB target and OS permissions as Synctodrive; see note on `move2usb` above)
8081
- `[Base URL]/commands/reboot-now`
8182
- `[Base URL]/commands/shutdown-now`
8283
- `[Base URL]/commands/rotary-cw`

faq/faq/index.html

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,16 @@
131131
<li class="toctree-l2"><a class="reference internal" href="#how-to-adjust-the-phpini-file">How to adjust the php.ini file?</a>
132132
</li>
133133
<li class="toctree-l2"><a class="reference internal" href="#automatic-picture-syncing-to-usb-stick">Automatic picture syncing to USB stick</a>
134+
<ul>
135+
<li class="toctree-l3"><a class="reference internal" href="#operating-system-setup-linux">Operating system setup (Linux)</a>
136+
</li>
137+
<li class="toctree-l3"><a class="reference internal" href="#admin-configuration">Admin configuration</a>
138+
</li>
139+
<li class="toctree-l3"><a class="reference internal" href="#remote-buzzer-move-to-usb">Remote buzzer "Move to USB"</a>
140+
</li>
141+
<li class="toctree-l3"><a class="reference internal" href="#debugging">Debugging</a>
142+
</li>
143+
</ul>
134144
</li>
135145
<li class="toctree-l2"><a class="reference internal" href="#raspberry-touchpanel-dsi-simultaneously-with-hdmi">Raspberry Touchpanel DSI simultaneously with HDMI</a>
136146
</li>
@@ -451,20 +461,26 @@ <h2 id="how-to-adjust-the-phpini-file">How to adjust the <code>php.ini</code> fi
451461
<p>Take a look for "Loaded Configuration File" to get the path of your php.ini, you need <em>sudo</em> rights to edit the file.</p>
452462
<hr />
453463
<h2 id="automatic-picture-syncing-to-usb-stick">Automatic picture syncing to USB stick</h2>
454-
<p>This feature will automatically and in regular intervals copy (sync) new pictures to a plugged-in USB stick</p>
455-
<p>Use the <a href="https://photoboothproject.github.io/install/setup_wizard">Photobooth Setup Wizard</a> to get the operating system setup in place.</p>
464+
<p>This feature copies (syncs) new pictures to a plugged-in USB stick on a schedule using <code>rsync</code> on Linux.</p>
465+
<h3 id="operating-system-setup-linux">Operating system setup (Linux)</h3>
466+
<p>The web server user (<code>www-data</code>) must be allowed to mount and unmount the stick. Options:</p>
456467
<ul>
457-
<li>
458-
<ol>
459-
<li>Permissions -&gt; USB Sync policy</li>
460-
</ol>
461-
</li>
468+
<li><a href="https://photoboothproject.github.io/install/setup_wizard">Photobooth Setup Wizard</a> -&gt; <strong>Permissions</strong> -&gt; <strong>USB Sync policy</strong> installs Polkit rules for <code>udisksctl</code> and passwordless sudo for <code>mount</code> / <code>umount</code> (and <code>mkdir</code> under <code>/media</code>) via <code>/etc/sudoers.d/021_www-data-usb-sync</code>. Polkit and sudoers are applied as independently as possible: if one step fails, the other may still succeed. The same menu entry applies during a fresh install (general permissions) and can be run again after system updates to re-apply the rules.</li>
469+
</ul>
470+
<p>Prefer a <strong>FAT32 or exFAT</strong> volume whose <strong>volume label</strong> matches the identifier you set in the admin panel.</p>
471+
<h3 id="admin-configuration">Admin configuration</h3>
472+
<p>Enable sync, interval, and target in the admin panel (Synctodrive / USB sync settings).</p>
473+
<p>A USB drive can be matched by:</p>
474+
<ul>
475+
<li>Volume label (e.g. <code>photobooth</code>) -- best for one dedicated stick</li>
476+
<li>Block device (e.g. <code>/dev/sda1</code>)</li>
477+
<li>Short subsystem name (e.g. <code>sda</code>)</li>
462478
</ul>
463-
<p>The target USB device is selected through the admin panel.</p>
464-
<p>A USB drive / stick can be identified either by the USB stick label (e.g. <code>photobooth</code>), the operating system specific USB device name (e.g. <code>/dev/sda1</code>) or the USB device system subsystem name (e.g. <code>sda</code>). The preferred method would be the USB stick label (for use of a single USB stick) or the very specific USB device name, for different USB stick use. The default config will look for a drive with the label photobooth. The script only supports one single USB stick connected at a time</p>
465-
<p>Pictures will be synced to the USB stick matched by the pattern, as long as it is mounted (aka USB stick is plugged in)</p>
466-
<p>Debugging: Check the server logs for errors at the Debug panel: <a href="http://localhost/admin/debugpanel">http://localhost/admin/debugpanel</a> (
467-
or <a href="http://localhost/photobooth/admin/debugpanel">http://localhost/photobooth/admin/debugpanel</a>).</p>
479+
<p>Use only <strong>one</strong> connected USB stick at a time. Sync runs while the matching volume is mounted.</p>
480+
<h3 id="remote-buzzer-move-to-usb">Remote buzzer "Move to USB"</h3>
481+
<p>The <strong><code>move2usb</code></strong> action uses the <strong>same</strong> USB target and rsync layout as automatic sync and needs the <strong>same</strong> Linux permissions. After a successful run the server checks for <strong><code>copy.chk</code> on the root of the USB volume</strong> (not under a <code>data</code> folder). See <a href="remote-button/">Remote Buttons</a>.</p>
482+
<h3 id="debugging">Debugging</h3>
483+
<p>Check server logs in the admin Debug panel: <a href="http://localhost/admin/debugpanel">http://localhost/admin/debugpanel</a> (or <a href="http://localhost/photobooth/admin/debugpanel">http://localhost/photobooth/admin/debugpanel</a>).</p>
468484
<hr />
469485
<h2 id="raspberry-touchpanel-dsi-simultaneously-with-hdmi">Raspberry Touchpanel DSI simultaneously with HDMI</h2>
470486
<p>When using a touchscreen on DSI and an HDMI screen simultaneously, the touch input is offset. This is because both monitors are recognized as one screen.</p>

faq/faq/remote-button/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ <h2 id="3-remote-trigger-via-socketio">3) Remote trigger via Socket.io</h2>
236236
<ul>
237237
<li>Channel: <code>photobooth-socket</code></li>
238238
<li>Commands: <code>start-picture</code>, <code>start-collage</code>, <code>collage-next</code>, <code>start-custom</code>, <code>start-video</code>, <code>print</code>, <code>rotary-cw</code>, <code>rotary-ccw</code>, <code>rotary-btn-press</code>, <code>move2usb</code></li>
239+
<li><code>move2usb</code> runs the same rsync-based copy as <strong>Synctodrive</strong> to the USB target configured in the admin panel. On Linux it needs the same mount/umount setup as <a href="../#automatic-picture-syncing-to-usb-stick">automatic USB picture sync</a>. After rsync, the remotebuzzer server expects <strong><code>copy.chk</code> at the root of the USB volume</strong> to confirm success.</li>
239240
<li>Response: <code>completed</code> after the workflow finishes.</li>
240241
</ul>
241242
<h2 id="4-remote-trigger-via-simple-web-requests-http">4) Remote trigger via simple web requests (HTTP)</h2>
@@ -251,7 +252,7 @@ <h2 id="4-remote-trigger-via-simple-web-requests-http">4) Remote trigger via sim
251252
<li><code>[Base URL]/commands/start-custom</code></li>
252253
<li><code>[Base URL]/commands/start-print</code></li>
253254
<li><code>[Base URL]/commands/start-video</code></li>
254-
<li><code>[Base URL]/commands/start-move2usb</code></li>
255+
<li><code>[Base URL]/commands/start-move2usb</code> (same USB target and OS permissions as Synctodrive; see note on <code>move2usb</code> above)</li>
255256
<li><code>[Base URL]/commands/reboot-now</code></li>
256257
<li><code>[Base URL]/commands/shutdown-now</code></li>
257258
<li><code>[Base URL]/commands/rotary-cw</code></li>

faq/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,5 +255,5 @@ <h2 id="contribute-to-this-documentation">Contribute to this documentation</h2>
255255

256256
<!--
257257
MkDocs version : 1.6.1
258-
Build Date UTC : 2026-03-22 08:54:23.893573+00:00
258+
Build Date UTC : 2026-03-22 12:18:10.177875+00:00
259259
-->

faq/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

install-photobooth.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ EOF
12701270

12711271
function install_usb_sudoers() {
12721272
local sudoers_file="/etc/sudoers.d/021_www-data-usb-sync"
1273-
# Match manual helper scripts/setup-usb-sync.sh (portable paths; some distros use /bin vs /usr/bin).
1273+
# Portable paths: some distros use /bin vs /usr/bin for mount/umount/mkdir.
12741274
cat >"$sudoers_file" <<'EOF'
12751275
# Photobooth USB Sync — passwordless mount/umount/mkdir for www-data (sync-to-drive.js, move2usb).
12761276
# Use together with Polkit rules for udisksctl; this covers sudo fallbacks in the Node scripts.

resources/lang/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@
758758
"manual:sound:sound_fallback_enabled": "Use EN sounds as fallback if the current language is not supported yet",
759759
"manual:sound:sound_test": "Play a random test sound",
760760
"manual:sound:sound_voice": "Which voice to use for sounds",
761-
"manual:synctodrive:synctodrive_enabled": "Enable automatic syncing of new pictures to a USB device using rsync. On Linux the web server user (<code>www-data</code>) must be allowed to mount the stick: the Photobooth install wizard can install Polkit rules and passwordless sudo for <code>mount</code>/<code>umount</code> (Permissions → USB Sync policy, or during install via general permissions). You can also run <code>scripts/setup-usb-sync.sh</code> as root after updates. Use a labelled FAT32 or exFAT volume where the label matches the identifier below.",
761+
"manual:synctodrive:synctodrive_enabled": "Enable automatic syncing of new pictures to a USB device using rsync. On Linux the web server user (<code>www-data</code>) must be allowed to mount the stick: run <code>install-photobooth.sh</code> and use Permissions → USB Sync policy (or general permissions during install) to install Polkit rules and passwordless sudo for <code>mount</code>/<code>umount</code>. Run that menu entry again after system updates if you need to re-apply the rules. Use a labelled FAT32 or exFAT volume where the label matches the identifier below.",
762762
"manual:synctodrive:synctodrive_interval": "Seconds between automatic sync attempts (interval while the USB Sync process is running).",
763763
"manual:synctodrive:synctodrive_target": "Pattern to identify the USB device: usually the volume label of the stick (e.g. <code>photobooth</code>), or the block device path (e.g. <code>/dev/sda1</code>) or short name (e.g. <code>sda1</code>). Must match a removable USB device.",
764764
"manual:theme_title": "Use the Themes box to save current theme fields, load another, export a ZIP (config + referenced images), or import that ZIP to install a theme. Import or save will overwrite an existing theme with the same name.",

0 commit comments

Comments
 (0)