send notifications to all users

Guido Berhoerster gber at opensuse.org
Sat Feb 21 09:26:57 PST 2015


* Thomas Koch <thomas at koch.ro> [2015-02-21 12:52]:
> I'd like to notify all logged in users of some system event, e.g. from a 
> script started by cron, anacron or systemd timers.
> 
> The internet is full of Q&A about this and many hacks to publish DBUS or 
> DESKTOP variables to the root user.
> 
> But now with all this systemd, consolekit and desktop-notification stuff: I 
> wonder whether there shouldn't be a better solution. And if there isn't, what 
> would be the right place to add this?

How about wall(1)? It's simple, works cross platform and is the
only mechanism that notifies all users[*] regardless of whether
they are logged in via SSH, on a virtual console, a terminal
emulator, or in a X session through a desktop notification via
kwrited (by default in KDE) or xwrited in any other DE that has a
XDG notification daemon.

[*] unless they explicitly disabled wall/write messages
-- 
Guido Berhoerster


More information about the xdg mailing list