Gnome Popup Messages

Simon Ives simon at simonives.info
Tue Nov 18 12:14:23 GMT 2008


Changed the line so the file now reads:

#!/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 --title="Broadcast message" --text="$1"

Executing with:

sudo popup 'lorem ipsum'

and receiving the following error:

export: 6: simon/.Xauthority: bad variable name

do I need to somehow configure settings to do with Xauthority?

Thanks.
-- 

Simon Ives

simon at simonives.info
www.simonives.info

Please consider the environment before printing this email or any
attachments.


On Tue, 2008-11-18 at 21:48 +1100, Dave Hall wrote:
> On Tue, 2008-11-18 at 19:56 +1000, Simon Ives wrote:
> > Thanks for the response Dave.
> > 
> > I'm having a problem where the popup message always displays:
> > 
> > "All updates are complete"
> > 
> > The window title is:
> > 
> > "Information"
> 
> That is a weird default - keep reading for the (tested) solution :)
> 
> > 
> > I'll document the steps I took below:
> > 
> > ------------------------
> > 
> > Logged in to client machine via ssh.
> > 
> > sudo nano /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
> 
> My bad - change this line to
> zenity --info --title="Broadcast message" --text="$1"
> 
> That way you get your message, and a nicer title.
> 
> It should work better now :)
> 
> Cheers
> 
> Dave
> 




More information about the ubuntu-au mailing list