[Techtalk] remote user notifications

Akkana Peck akkana at shallowsky.com
Fri Jan 2 12:08:47 EST 2004


Carla writes:
> Today's 'stump the gurus' question: what can you do for remote users who are 
> running X, like Gnome or KDE or some such, and who won't see console 
> messages? Especially shutdown or reboot messages? Or other vitally important 
> broadcasts from the local friendly BOFH? 

Various discussion about wall and making them run a console, then
Piglet asks:
> Ah, but can you train them to *look* at it?

How about something like this, to pop up a dialog on each
remote display? 

for machine in $(cat listofmachines`) ; do
  export DISPLAY=$machine:0
# zenity apparently replaces gdialog, use whichever is appropriate:
# gdialog --msgbox 'Hey you!' 200 100
  zenity --info --text='Hey you!'
done

If you don't have a list of machines already, then perhaps you can
use who piped to a script to separate out the remote machine part:
perhaps something like:

for machine in \
    $( who | grep '(' | sed -e 's/.*(//' -e 's/)//' | sort | uniq )
  do

(that works as a quickie first try, but you'd probably want to refine
it a bit more.)

	...Akkana


More information about the Techtalk mailing list