Skip to content

Compass — Desktop Session Fixes, File Manager & Encryption

Date: 2026-07-06 Session: desktop-sessions-fm (continuation of audio-desktop) Status: ✅ TESTED (sway validate, configs parse) · 🔵 pending live login test · 🔴 FM decision open


1. Session / login architecture (how the desktop boots)

  • Login manager: greetd (OpenRC, started). Config /etc/greetd/config.toml: default_session = dms-greeter --command hyprland … (user greeter, vt2). So the greeter is dms-greeter (DankMaterialShell/Quickshell) running hyprland; it lists Wayland sessions.
  • Wayland sessions live in /usr/share/wayland-sessions/: nexus-desktop, nexus-labwc, nexus-terminal, nexus-tmux, nexus-tui, plus stock (sway, wayfire, labwc, hyprland, gnome…).
  • The NeXuS labwc-based sessions all Exec=labwc and differ by DesktopNames=. One shared ~/.config/labwc/autostart branches on the desktop name to launch the right shell: nexus-tui → foot+tuios, nexus-desktop → quickshell, nexus-labwc → waybar.

2. 🐛 FIX: NeXuS-TUI session = black screen, cursor, no keyboard

Symptom: pick "NeXuS TUI" at greetd → black screen + cursor, keyboard dead.

Root cause: nexus-tui.desktop sets DesktopNames=nexus-tui → greetd exports XDG_CURRENT_DESKTOP=nexus-tui but leaves XDG_SESSION_DESKTOP empty. The autostart used case "$XDG_SESSION_DESKTOP" → the nexus-tui) branch never fired → bare labwc with nothing launched → black screen, nothing to type into.

Fix (~/.config/labwc/autostart, backed up autostart.bak-<ts>):

case "${XDG_CURRENT_DESKTOP:-$XDG_SESSION_DESKTOP}" in     # was: $XDG_SESSION_DESKTOP
  nexus-tui)
    foot -e sh -c 'tuios --theme tokyo_night 2>/tmp/nexus-tui.log; exec fish' &   # shell fallback
    ;;
- Switching to XDG_CURRENT_DESKTOP makes the branch fire. - ; exec fish = never black-screen again: if tuios exits/crashes you land in a fish prompt; errors go to /tmp/nexus-tui.log. - tokyo_night verified as a real tuios theme (tuios --list-themes, 342 themes). Theme was NOT the bug.

Lesson: with greetd, key off XDG_CURRENT_DESKTOP (from DesktopNames), not XDG_SESSION_DESKTOP.


3. 🐛 FIX: sway wouldn't load

Cause: ~/.config/sway/config:24 → output * bg /home/user/Pictures/wallpapers/infographs/ fill — that path doesn't exist (directory, gone), so sway aborted the whole config (sway --validate failed on line 24).

Fix (backup config.bak-<ts>):

output * bg /home/user/Pictures/wallpapers/nexus-images/cyberspace.png fill #1a1b26
Real image + Tokyo-Night fallback color. sway --validate now exits 0. Wallpapers live in ~/Pictures/wallpapers/nexus-images/ (many NeXuS infographics).


4. File manager: PCManFM vs Thunar (DECISION OPEN)

Both installed. Leaning Thunar for "official NeXuS GUI FM":

Thunar 4.20.8 PCManFM (GTK)
Custom right-click actions ✅ first-class GUI (Configure custom actions, conditions) ⚠️ hand-edit .desktop, build-dependent
Auto-mount ✅ thunar-volman (GUI) ✅ gvfs toggles (needs session bus)
Archive right-click ✅ thunar-archive-plugin ➖ external
Bulk rename ✅ ❌
Maintenance ✅ active (XFCE) ⚠️ GTK ver stagnant

Plugins available: thunar-volman thunar-archive-plugin thunar-media-tags-plugin tumbler. The encrypt/decrypt scripts are FM-agnostic (take file args) → port to Thunar Custom Actions trivially. See [[project-pcmanfm-nexus-fm]] (update to Thunar if chosen).

Auto-mount status: ~/.config/pcmanfm/default/pcmanfm.conf [volume] already has mount_on_startup=1 mount_removable=1 autorun=1; udisks2 works. Remaining: run FM inside a session D-Bus (dbus-run-session) + apk add gvfs-fuse.


5. Encryption right-click actions (age)

  • Actions: ~/.local/share/file-manager/actions/nexus-encrypt.desktop / nexus-decrypt.desktop (libfm actions spec, %F = selected paths). Restart pcmanfm (pcmanfm -q; pcmanfm &) to load.
  • Backing scripts: ~/scripts/nexus-fm-encrypt.sh / nexus-fm-decrypt.sh — age -p passphrase; file → .age, folder → .tar.age; run in foot so age can prompt. FM-agnostic.
  • Tools present: age(+age-keygen), gpg, openssl, 7z, zip. age chosen (no keyring).

6. apks — fzf multi-select + clipboard

~/.config/fish/functions/apks.fish rewritten: apk search -iv | fzf --multi → selected names (awk '{print $1}' | sed 's/-[0-9].*//') → wl-copy + lolcat echo. Removed the preview (it was erroring on the right pane, a fish→fzf→sh quoting issue). Neutralised the duplicate config.fish:479 alias. Reload with exec fish (fish caches loaded funcs).


7. Handy facts locked in this session

  • Alpine auto-docs: apk add docs — the docs meta-pkg makes apk auto-pull every <pkg>-doc subpackage (via install_if). Add mandoc mandoc-apropos less to actually read them. → so never install *-doc by hand.
  • Path convention (user): a bare /foo means ~/foo (home-relative) unless he explicitly says "from root". See feedback memory.
  • NeXuS Dev apk pick (installed): acme.sh, aprilsh, shellcheck, oils-for-unix, watchbind, kapow, pipr, mcfly, atuin(+server), pdsh, doasedit, sexpect, todo.txt-cli, xdg-ninja, dasht, gum, webhookd.

8. Open / next

  • Live-test the two session fixes at greetd (sway + NeXuS-TUI); read /tmp/nexus-tui.log if TUI odd.
  • Decide FM (Thunar recommended) → then apk add thunar-volman thunar-archive-plugin tumbler, wire age actions into Thunar Custom Actions, update memory.
  • Still-open from audio-desktop compass: reconcile the 3 tmux-menus copies + nested ~/scripts/scripts (the duplication trap); refresh stale nexus-cheatsheet.py; fix prefix+Space→127 (tmux-resizable-popup.sh → deleted wtf-interactive-launcher.sh).