- After 5 min of no touch/motion, dashboard hides behind a fullscreen photo slideshow with centered time and date overlay - Photos loaded from PHOTOS_PATH env var (defaults to ~/Pictures/dashboard) via IPC + file:// URLs; traversal-guarded, recursive up to 2 levels - Motion or touch exits idle back to dashboard - Theme repainted warm cream / sage / stone ink with Nunito font and rounded cards; dark tokens kept so component classes still resolve - Adds PHOTO_FRAME.md with Samba cifs mount + systemd env instructions
2.5 KiB
Photo Frame (Digital Picture Frame)
After VITE_PHOTO_FRAME_IDLE_TIMEOUT ms of no touch/mouse/keyboard activity
(default 5 minutes), the dashboard is covered by a full-screen photo frame
that cycles images from a local directory with a clock overlay. Touching the
screen exits idle and returns to the dashboard. Motion detected by the
Electron MotionDetector also cancels idle.
Photo source
The Electron main process reads photos from the directory set in the
PHOTOS_PATH environment variable. If unset, it falls back to
~/Pictures/dashboard. Files are served via a photo:// custom protocol
so the renderer never exposes raw filesystem paths.
Supported extensions: jpg, jpeg, png, webp, gif, heic, heif. Subdirectories are scanned up to two levels deep.
Mounting the Samba share on the kiosk
On the kiosk (192.168.1.190):
# 1. Install cifs-utils
sudo apt install -y cifs-utils
# 2. Create a credentials file (chmod 600)
sudo tee /etc/samba/credentials-dashboard <<'EOF'
username=YOUR_SAMBA_USER
password=YOUR_SAMBA_PASSWORD
EOF
sudo chmod 600 /etc/samba/credentials-dashboard
# 3. Create mountpoint
sudo mkdir -p /mnt/family-photos
# 4. Add to /etc/fstab (replace server/share with actual values)
echo '//SERVER_IP/SHARE_NAME /mnt/family-photos cifs credentials=/etc/samba/credentials-dashboard,uid=1000,gid=1000,iocharset=utf8,vers=3.0,ro,_netdev,x-systemd.automount 0 0' | sudo tee -a /etc/fstab
# 5. Mount
sudo mount -a
ls /mnt/family-photos
Pointing the app at the share
Option A — systemd unit (if you run the app as a service):
# /etc/systemd/system/imperial-command-center.service (append to [Service])
Environment=PHOTOS_PATH=/mnt/family-photos
Then sudo systemctl daemon-reload && sudo systemctl restart imperial-command-center.
Option B — desktop launcher (if started from the GUI):
Edit ~/Desktop/imperial-command-center.desktop and set:
Exec=env PHOTOS_PATH=/mnt/family-photos /opt/imperial-command-center/imperial-command-center --no-sandbox --ozone-platform=wayland
Option C — shell wrapper used by current deployment:
sudo -u chrisryn PHOTOS_PATH=/mnt/family-photos \
XDG_RUNTIME_DIR=/run/user/1000 WAYLAND_DISPLAY=wayland-0 \
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus \
/opt/imperial-command-center/imperial-command-center --no-sandbox --ozone-platform=wayland
Tuning
VITE_PHOTO_FRAME_IDLE_TIMEOUT— idle timeout in ms (default 300000)VITE_PHOTO_FRAME_INTERVAL— ms between photo transitions (default 15000)
These are baked at build time.