Files
command-center/omp-docs/tools/niri/screenshots.md
T
Frank 8da6cdc9cd niri: fix screenshots on 2+ outputs — Mod+Shift+S captures all monitors
flameshot full dies docked: its portal path hits niri's
screenshot_all_outputs ensure!(outputs.len()==1) (upstream niri#4313,
niri 26.04), so every Print press on the home desk produces error
bubbles. niri's built-in screenshot UI selects only one output, so add
scripts/screenshot-desk.sh: per-monitor focus + screenshot-screen with
explicit --path, focus restored, one PNG per monitor in
~/Pictures/Screenshots. Bind Mod+Shift+S (Frank's call); noctalia
settings moves to Mod+Shift+O. Restore screenshot-path (was null, now
root-level as config.screenshot_path requires) for UI saves. Live-
verified docked: valid 1920x1080 PNGs for eDP-1 + DP-2, focus restored;
bats 27/27 incl. niri validate on both desk profiles.
2026-10-14 17:21:10 -07:00

3.8 KiB

type, title, description, tags, verified
type title description tags verified
reference Screenshot Matrix Which screenshot binds work on blankpad as a function of output count — flameshot full is dead on 2+ outputs (niri D-Bus screencopy single-output limit, upstream niri#4313); Mod+Shift+S runs scripts/screenshot-desk.sh, the niri-native all-monitor capture.
niri
flameshot
screenshots
multi-monitor
portal
2026-10-14

Screenshot Matrix

Three capture stacks coexist on blankpad: flameshot (portal → niri D-Bus screenshot API), niri's built-in screenshot UI, and scripts/screenshot-desk.sh (drives niri per-output actions). The flameshot full-screen path breaks the moment the laptop docks to a second output.

Bind matrix by output count

Bind Tool 1 output (portable) 2+ outputs (docked home)
Print / Ctrl+Shift+1 flameshot full ✅ ❌ error bubbles
Alt+Print / Ctrl+Shift+2 flameshot screen (focused) ✅ ✅ single-output request
Ctrl+Print / Ctrl+Shift+3 flameshot gui (region) ✅ ✅ (watch scaling on mixed-res, flameshot#4449)
Mod+Shift+S screenshot-desk.sh — one PNG per monitor ✅ ✅ the docked full-desk path

Mod+Shift+S used to open noctalia settings; noctalia settings moved to Mod+Shift+O.

Why flameshot full dies docked

  • Flameshot 14 full-screen capture → xdg-desktop-portal → xdg-desktop-portal-gnome → niri's GNOME-Screenshot compatibility D-Bus service.
  • That service calls Niri::screenshot_all_outputs (src/niri.rs), which starts with ensure!(outputs.len() == 1) (FIXME: multi-scale/crop unsupported). On a 2-output virtual screen the request is refused; flameshot pops an error bubble after the portal round-trip — the "bunch of errors after a delay".
  • Compositor-side fingerprint (journalctl --user -u niri): WARN niri::niri: error taking a screenshot: Condition failed: outputs.len() == 1 (2 vs 1)
  • Upstream: niri#4313 (identical stack: niri 26.04 + Flameshot 14 + portal-gnome; closed as duplicate, unfixed in 26.04/8ed0da4).

Why not niri's built-in screenshot UI

niri 26.04's default screenshot action opens the interactive screenshot UI, and its selection is single-output by design ("this implementation allows only single-output selections for now", src/ui/screenshot_ui.rs). One press = one monitor.

The all-monitor path: scripts/screenshot-desk.sh

  • Bind: Mod+Shift+S in keybindings.
  • Deploy form: symlink ~/.local/bin/screenshot-desk.sh → ~/.omp/scripts/screenshot-desk.sh (same convention as desk.sh).
  • Algorithm: for each active output from niri msg --json outputs, focus-monitor → screenshot-screen --path (absolute, one PNG), then restore the previously focused monitor. All niri-native, no grim, no portal.
  • Files: ~/Pictures/Screenshots/Screenshot from YYYY-MM-DD HH-MM-SS <connector>.png (dir overridable via SCREENSHOT_DIR). Also honors screenshot-path in misc.kdl for the UI/screenshot-screen default when no --path is passed.
  • Verified 2026-10-14 docked: two valid PNGs (eDP-1, DP-2), focus restored.

Census commands

niri msg outputs                                     # how many outputs live
journalctl --user -u niri --since today | grep -i screenshot   # portal-path failures
pgrep -a flameshot                                   # daemon state

See Also

  • displays — desk profiles: 1 output portable vs 2 docked
  • keybindings — generated cheat sheet (source of the binds)
  • noctalia-shell — shell settings moved to Mod+Shift+O