From 66dafa602197e8bcd85c9d9de87af11cbf7122f2 Mon Sep 17 00:00:00 2001 From: The412Banner Date: Wed, 23 Sep 2026 21:37:16 -0400 Subject: [PATCH] Desktop: remote runs from ~/.cache/droiddeck/run behind ~/.droiddeck-remote-run For driving the desktop from a debugger: a script dropped there runs once inside the session. Off unless the marker exists. --- tools/linuxfs/desktop/autostart | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/linuxfs/desktop/autostart b/tools/linuxfs/desktop/autostart index e66666a0a6..3aa88e9061 100644 --- a/tools/linuxfs/desktop/autostart +++ b/tools/linuxfs/desktop/autostart @@ -36,3 +36,18 @@ swaybg -m fill -i /usr/share/backgrounds/steamdeck.png & run pcmanfm-qt pcmanfm-qt --desktop --profile lxqt run lxqt-panel lxqt-panel /usr/lib/xdg-desktop-portal-wlr >/dev/null 2>&1 & +# Remote runs, for driving the desktop from a debugger: with ~/.droiddeck-remote-run present (only +# the app or root can create it), each script dropped into ~/.cache/droiddeck/run/ is run once, +# inside the session with its environment, its output tagged into the desktop log. +if [ -f "$HOME/.droiddeck-remote-run" ]; then + mkdir -p "$HOME/.cache/droiddeck/run" + ( + while sleep 1; do + for f in "$HOME"/.cache/droiddeck/run/*.sh; do + [ -f "$f" ] || continue + mv -f "$f" "$f.running" || continue + ( echo "[run] $(basename "$f") started"; bash "$f.running" 2>&1 | sed "s/^/[run] /"; echo "[run] $(basename "$f") exited"; rm -f "$f.running" ) & + done + done + ) & +fi