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.
This commit is contained in:
The412Banner committed 2026-09-23 21:37:16 -04:00
1 parent 2df3d054e8
commit 66dafa6021
1 file changed
+15
+15
View File
@@ -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