ffd18edf7ef6519653ff5de057d7141d78a0c557
The classroom desktop belongs to the classroom user and mako sits on that user's D-Bus session. An administrator over SSH is in a different session where nothing owns org.freedesktop.Notifications, so notify-send asked D-Bus to start a second mako, which had no display to open and timed out with NoReply. Find the running sway process for the classroom user and deliver into its session instead. XDG_RUNTIME_DIR and the bus address are read from that process, falling back to /run/user/<uid> and its bus socket when the environment cannot be read — root has ptrace access on the endpoint, but that is not somewhere to be brittle. The Wayland display is read the same way, and failing that from the wayland-N.lock sway holds open, so no socket name is ever assumed. notify-send only needs the bus, so a display that cannot be resolved is not worth refusing to send over. Refuses to send when mako is not already running, rather than letting D-Bus start one, and says plainly what is wrong when there is no session, no privileges, or no bus socket. --dry-run reports what it resolved without sending. Behaviour inside the session is unchanged, and the sample notifications and styling are untouched. The tests stand a real background process in for sway so /proc/<pid>/environ is genuine rather than mocked, and cover both invocation paths plus the fallbacks and every refusal. The build runs them. Co-Authored-By: Claude Opus 5 <[email protected]>
Description
No description provided
113 MiB
Languages
Shell
50.9%
Python
48.1%
JavaScript
1%