[Samba] winpopup

Michael Heironimus mkh01 at earthlink.net
Wed Jun 4 19:24:44 GMT 2003


On Wed, Jun 04, 2003 at 07:02:14PM +0000, Solymos P?ter wrote:
> got some winpopup probs. Sending goes okay, and I'd like to get an 
> xmessage window by receiving. Thus, I added a line like this to the 
> [global] section in /etc/samba/smb.conf:
> 
> 
>    message command = /bin/sh -c '/opt/scripts/winpopup.sh %m %f' &
> 
> 
> The invoked script (/opt/scripts/winpopup.sh) looks like this:
> -------------------------
> #!/bin/sh
> #$1 is the name of the sending machine, %m
> #$2 is the file where samba saves the message, %f
> 
> echo "" >> $2	#appends a blank line to the message
> echo $1 >> $2	#appends the name of the sending machine
> xmessage -center -file $2	#pops up a window with the whole thing
> rm $2		#removes the message file
> -------------------------
> 
> Prob is that by receiving a message, sender machine says "sent OK", but 
> nothing happens at all. Any ideas? (file permissions are okay, script is 
> working when invoked from command line)

The environment that's running the script probably doesn't have a
$DISPLAY, so xmessage can't run because it doesn't know what X display
to connect to.

-- 
Michael Heironimus



More information about the samba mailing list