Gnome Popup Messages

Dave Hall dave.hall at skwashd.com
Tue Nov 18 04:07:07 GMT 2008


Hi Simon

On Tue, 2008-11-18 at 13:35 +1000, Simon Ives wrote:
> Hi all
> 
> I'm looking for a way to send Gnome Popup messages (I'm not sure of
> their proper name) to other computers on the network.  I've got root
> access via ssh if that's required too.  The network's quite small and
> has one central file-server (Ubuntu 8.04) and up to 10 clients at any
> given time (all running Ubuntu 8.10).  Ideally I'd like to send both
> network wide messages and messages to individual computers.  The reason
> I'm after Gnome messages is because all of the clients use Gnome and
> very rarely, if at all, have a terminal session open.

Put this in /usr/local/bin/popup

#!/bin/sh
# Popup message generator
# Written by Dave Hall - http://davehall.com.au
USER=`who | grep :0 | cut -d\  -f1`
export DISPLAY=:0
export XAUTHORITY=/home/$USER/.Xauthority
zenity --info text=$1

sudo chmod u+x /usr/local/bin/popup

then simply run
popup 'message'
as root or using sudo

For more info see zenity --help there is loads of info there

on the machine sending the messages you could just have something like
this kept in /usr/local/bin/network-popup

#!/bin/sh
# Remote Popup message generator
# Written by Dave Hall - http://davehall.com.au
BOXEN='box1 box2 box3' # you get the idea
for box in BOXEN; do
	ssh root@$box "/usr/local/bin/popup '$1' &"
done

Then simply run 
/usr/local/bin/network-popup 'message'

Even if this isn't exactly what you want, it give you some idea of what
to do.  btw this is completely untested, so you may have to fix bits of
it.  Feel free to ask for more info if you need it.

Cheers

Dave




More information about the ubuntu-au mailing list