Files
DroidDeck/tools/linuxfs/desktop/autostart
T
The412Banner 3d4cfededf Desktop: keep Firefox out of Work Offline, and probe the network in debug runs
Firefox decides whether it is online by dumping the routing table over
netlink, which Android denies to apps; it sees no default route, switches to
Work Offline and every page fails while the network is fine. A defaults file
staged into Firefox's pref directory turns that off, and drops the process
sandboxes that have nothing to set up under proot. Debug runs now log a name
lookup and a fetch over IPv4 and IPv6 from inside the session.
2026-09-20 04:51:50 -04:00

32 lines
1.7 KiB
Plaintext

# What the desktop is made of, started once labwc is up. Everything logs into the session log.
# With ~/.steamdeck-desktop-debug present, the panel and the file manager also log what they
# say to the compositor about their windows (shell, layer, output), capped so it stays readable.
run() {
local tag=$1; shift
if [ -f "$HOME/.steamdeck-desktop-debug" ]; then
# Everything it says goes to ~/.cache/steamdeck/<tag>.log; the window-related protocol
# traffic also goes into the session log, capped.
mkdir -p "$HOME/.cache/steamdeck"
WAYLAND_DEBUG=1 "$@" 2>&1 | tee "$HOME/.cache/steamdeck/$tag.log" | awk -v t="[$tag]" '!/^\[[0-9:.]+\] +\{/ || (c<120 && /layer_s|xdg_toplevel|fullscreen|wl_output|xdg_output|configure\(/) {print t, $0; c++; fflush()}' &
else
"$@" 2>&1 | sed "s/^/[$tag] /" &
fi
}
# The output at the app's real size, in case rc.xml's mode did not take.
[ -n "${BL_WIDTH:-}" ] && wlr-randr --output WL-1 --custom-mode "${BL_WIDTH}x${BL_HEIGHT}" 2>&1 | sed 's/^/[wlr-randr] /'
# In debug runs, ground truth on the network from inside the session: name lookup, then a
# fetch over IPv4 and over IPv6, so a browser's "no internet" can be placed.
if [ -f "$HOME/.steamdeck-desktop-debug" ]; then
(
echo "[net] getent: $(getent hosts example.com 2>&1 | head -2 | tr '\n' ' ')"
for f in 4 6; do
echo "[net] curl -$f: $(curl -$f -sS -m 8 -o /dev/null -w '%{http_code} %{remote_ip}' https://example.com 2>&1)"
done
) &
fi
swaybg -m fill -i /usr/share/backgrounds/steamdeck.png &
# Desktop icons (pcmanfm-qt manages the desktop surface) and the panel with the app menu.
run pcmanfm-qt pcmanfm-qt --desktop --profile lxqt
run lxqt-panel lxqt-panel
/usr/lib/xdg-desktop-portal-wlr >/dev/null 2>&1 &