Bug 1222281

Summary: wall / write don't work in plasma6
Product: [openSUSE] openSUSE Tumbleweed Reporter: robert spitzenpfeil <rs.opensuse>
Component: KDE Workspace (Plasma)Assignee: E-Mail List <opensuse-kde-bugs>
Status: NEW --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: fabian, kukuk, sbrabec
Version: CurrentFlags: fabian: needinfo? (sbrabec)
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description robert spitzenpfeil 2024-04-03 14:47:19 UTC
The plasma background-service "write daemon" claims to be on. Anything I do with "wall" and "write" is ignored ( mesg y )

It does not work with:

* latest tumbleweed installation ( 20240329 )
* tumbleweed kde live iso ( openSUSE-Tumbleweed-KDE-Live-x86_64-Snapshot20240329-Media )


The very same thing works as expected (notification popup in the panel) with:

* Debian bookworm + plasma5
* Leap 15.5 KDE live iso ( openSUSE-Leap-15.5-KDE-Live-x86_64-Build13.15-Media )
Comment 1 Fabian Vogt 2024-04-04 18:25:31 UTC
It's unrelated to plasma, it's caused by the move away from utmp to using info from logind. kwrited opens a pty and registers this in utmp, but this is no longer read by mesg.

Is there some alternative way already possible?

Not sure how useful this currently is beyond some rare uses of wall/write.
Comment 2 robert spitzenpfeil 2024-04-04 19:54:48 UTC
In my case I use wall in a script to conveniently get a message to anybody on the machine, including a GUI user. It just worked like magic.

I could use notify-send, but that doesn't come with an audible "ping" and it's very cumbersome, as I then have to do something like this:

sudo -u <target_user> DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/<target_user>/bus notify-send test

So I first need to figure out who's logged on ...
Comment 3 robert spitzenpfeil 2024-04-04 19:57:00 UTC
For posterity:

https://stackoverflow.com/questions/28195805/running-notify-send-as-root
Comment 4 Thorsten Kukuk 2024-04-05 06:44:28 UTC
(In reply to Fabian Vogt from comment #1)
> It's unrelated to plasma, it's caused by the move away from utmp to using
> info from logind. kwrited opens a pty and registers this in utmp, but this
> is no longer read by mesg.
> 
> Is there some alternative way already possible?
> 
> Not sure how useful this currently is beyond some rare uses of wall/write.

There is no alternative currently, as nearly nobody is interested in it. GNOME e.g. doesn't support wall/write since a very long time, similar for other display manager/desktop systems (if they did create utmp entries at all, they were often broken and don't work for write/wall).

Standard answer I got was: Desktop systems are normally booted by the user and don't need the message, remote users get them.

I see two possible solutions:
1. sddm forwards the message to the desktop
2. kwrited registers a fake session with systemd-logind

Upstream systemd does not like 2. and has some protections against it, and they plan to increase them even. But it should be possible by creating a new process group or so.