From f10919d4bebe319d581de20b03715e6d82cd0eec Mon Sep 17 00:00:00 2001 From: The412Banner Date: Sun, 20 Sep 2026 04:28:46 -0400 Subject: [PATCH] Desktop: give pcmanfm-qt's desktop the wallpaper, and a debug marker that logs window mapping The desktop came up black with the panel alive but unseen. pcmanfm-qt's desktop surface, unconfigured, paints solid black over swaybg's wallpaper; it now gets the wallpaper. With ~/.steamdeck-desktop-debug present, labwc logs at debug level and the panel and file manager log their shell, layer and output protocol traffic, capped, so where a window went can be read off the session log. --- tools/linuxfs/desktop/autostart | 14 ++++++++++++-- tools/linuxfs/desktop/steamdeck-desktop | 12 ++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/tools/linuxfs/desktop/autostart b/tools/linuxfs/desktop/autostart index b590d0436..b1995228c 100644 --- a/tools/linuxfs/desktop/autostart +++ b/tools/linuxfs/desktop/autostart @@ -1,6 +1,16 @@ # 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 + WAYLAND_DEBUG=1 "$@" 2>&1 | awk -v t="[$tag]" 'c<120 && /layer_s|xdg_toplevel|xdg_surface@[0-9]+\.(set_|get_)|fullscreen|wl_output|xdg_output|rror|WARN|configure\(/ {print t, $0; c++}' & + else + "$@" 2>&1 | sed "s/^/[$tag] /" & + 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. -pcmanfm-qt --desktop --profile lxqt 2>&1 | sed 's/^/[pcmanfm-qt] /' & -lxqt-panel 2>&1 | sed 's/^/[lxqt-panel] /' & +run pcmanfm-qt pcmanfm-qt --desktop --profile lxqt +run lxqt-panel lxqt-panel /usr/lib/xdg-desktop-portal-wlr >/dev/null 2>&1 & diff --git a/tools/linuxfs/desktop/steamdeck-desktop b/tools/linuxfs/desktop/steamdeck-desktop index 249194fbe..79d115dff 100644 --- a/tools/linuxfs/desktop/steamdeck-desktop +++ b/tools/linuxfs/desktop/steamdeck-desktop @@ -19,14 +19,22 @@ cp -f /etc/xdg/labwc/rc.xml "$HOME/.config/labwc/rc.xml" cp -f /etc/xdg/labwc/autostart "$HOME/.config/labwc/autostart" [ -f "$HOME/.config/lxqt/panel.conf" ] || cp /etc/xdg/lxqt/panel.conf "$HOME/.config/lxqt/panel.conf" [ -f "$HOME/.config/lxqt/lxqt.conf" ] || cp /etc/xdg/lxqt/lxqt.conf "$HOME/.config/lxqt/lxqt.conf" +# pcmanfm-qt paints the desktop; left unconfigured it paints it black, over swaybg's wallpaper. +if [ ! -f "$HOME/.config/pcmanfm-qt/lxqt/settings.conf" ]; then + mkdir -p "$HOME/.config/pcmanfm-qt/lxqt" + printf '[Desktop]\nWallpaper=/usr/share/backgrounds/steamdeck.png\nWallpaperMode=zoom\nBgColor=#1b1030\nShowHidden=false\n' \ + > "$HOME/.config/pcmanfm-qt/lxqt/settings.conf" +fi # The runtime directory outlives a session. lxqt-panel and pcmanfm-qt are single-instance # programs that leave a lock and a socket there; finding last session's, they decide they are # already running and exit without a word - a desktop with a wallpaper and nothing on it. # Only the app's own compositor socket (wayland-0) is kept. find "$XDG_RUNTIME_DIR" -mindepth 1 -maxdepth 1 ! -name 'wayland-0*' ! -name 'keymap.xkb' -exec rm -rf {} + 2>/dev/null echo "== steamdeck-desktop: labwc ($WLR_RENDERER) on $WAYLAND_DISPLAY" +# ~/.steamdeck-desktop-debug: labwc's own debug log (views and layer surfaces mapping) too. +DEBUG=; [ -f "$HOME/.steamdeck-desktop-debug" ] && DEBUG=-d # A session bus: the panel's menus, the file manager and the portal all expect one. if command -v dbus-run-session >/dev/null 2>&1; then - exec dbus-run-session -- labwc -C "$HOME/.config/labwc" + exec dbus-run-session -- labwc $DEBUG -C "$HOME/.config/labwc" fi -exec labwc -C "$HOME/.config/labwc" +exec labwc $DEBUG -C "$HOME/.config/labwc"