On Tue, Sep 09, 2003 at 11:51:43PM -0500, Andrew Gaffney wrote:
> Martin J. Brown wrote:
> >When I use 'at' to execute a command that involves displaying a dialog on
> >X/gnome,
> >it never works: "Can't open display" .
> >
> >I have done: 'xhost +', and 'xhost +local:root'. Still no go.
> >
> >example:
> >
> > $ at now + 35 minutes -f ~mjbjr/bin/washer_done.sh
> >
> >
> >washer_done.sh:
> >
> >[EMAIL PROTECTED] mjbjr $ cat bin/washer_done.sh
> >beep -f 1000 -n -f 2000 -n -f 1500 -n -f 10 -l 750 -n -f 1000 -n -f 2000
> >-n -f 1500 -n -f 10 -l 750 -n -f 1000 -n -f 2000 -n -f 1500
> >
> >gdialog --title "User Notice" --msgbox " WASHER IS FINISHED " 300 400
> >
> >----
> >'beep' gets executed, 'gdialog' does not.
> >
> >If I replace 'gdialog' with 'xmessage', same thing .
> >If I (mjbjr) execute 'washer_done.sh' directly (no 'at'), it works fine.
> >
> >The man page for 'at' says that it doesn't pay attention to the $DISPLAY
> >env var.
>
> Set the DISPLAY var within the script:
>
> DISPLAY=":0.0" gdialog --title "User Notice" --msgbox " WASHER IS \
> FINISHED " 300 400
>
>
> --
> Andrew Gaffney
Yes, that works. Thank you.
Interestingly, if you put the DISPLAY part (DISPLAY=":0.0") on the line
_before_ the 'gdialog' part. It doesn't work.
Can you explain why it works, and why it doesn't when split?
I thought I had figured it out, now, I'm not sure.
Thank you
--
- Martin J. Brown, Jr. -
- [EMAIL PROTECTED] -
Public PGP Key ID: 0xDB184F7B keyserver: http://certserver.pgp.com/
--
[EMAIL PROTECTED] mailing list