Re: Gnome Popup Messages

2008-11-18 Thread Simon Ives
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

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

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

sudo popup 'Lorem Ipsum'



So I am getting a popup message but it's not displaying the text I'm
inputing.  I don't want to move on to the next step (the centralised
script) until I've sorted this out.

Thanks.
-- 

Simon Ives

[EMAIL PROTECTED]
www.simonives.info

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



-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au


Re: Gnome Popup Messages

2008-11-18 Thread Simon Ives
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

[EMAIL PROTECTED]
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
 


-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au


Re: Gnome Popup Messages

2008-11-18 Thread Christopher Lees
You could use the notify-send command (man notify-send) for this task as
well, if you put it into the script instead of the zenity line:

notify-send -t 5 Message from Simon Ives $1

This gives you one of the popup balloon messages, so it won't eat your
clients' keypresses or interrupt their work, but it will remain on the
screen for about 30 seconds. Increase the number if necessary, and add
extra options if you want (such as -u critical for an eye-catching
balloon, or -i important for an exclamation mark icon).


-- 
ubuntu-au mailing list
ubuntu-au@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au