When

# shutdown +5

is run all the terminals (including pseudo terminals) are sent broadcast messages saying system is about to go down.

Is it possible for user to receive this in the form of OSD or system tray notification so that he will be informed even if he is not running any terminal emulator or running it but minimized it and working with something else?

link|improve this question

60% accept rate
1  
There's a guy who hacked one together - his mailing list post is here. – new123456 Jul 17 '11 at 15:14
feedback

1 Answer

up vote 1 down vote accepted

Yes, it's possible. Tools like wall or shutdown write the messages to each "user" entry in /run/utmp, and a fake entry can easily be added.

I have written a tool wallnotify to redisplay these broadcasts as GNOME notifications. It works as long as you have read the README file.

link|improve this answer
Great. They should include this in distro's by default. Or at least in repos. – Akilan Jul 18 '11 at 7:56
@Akilan: This is only a temporary fix. I'd rather have shutdown use DBus for notifications... but feel free to suggest the program to your distro's developers. – grawity Jul 18 '11 at 8:33
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.