on Thu, Jan 12, 2006 at 08:28:03AM -0600, Hugo Vanwoerkom (hvw59601@care2.com) wrote:
> Karsten M. Self wrote:
> >on Tue, Jan 10, 2006 at 03:41:52PM -0600, Hugo Vanwoerkom
> >(hvw59601@care2.com) wrote:
> >>Hi,
> >>
> >>How would I popup an informative message on X from a crontab entry?
> >>
> >>There is xmessage, but from crontab?
> >
> >Set your $DISPLAY variable appropriately.
> >
> > DISPLAY=:0.0 xmessage "My message"
> >
> >... should work, if not in your crontab entry itself then in a script
> >called by same. ":0.0" should work for most circumstances.
> >
>
> Karsten,
>
> Not that way, but:
>
> xmessage -file /xmessage.downmsg.msg -display :1.0
>
> works.
So does:
55 10 * * Mon export DISPLAY=:0; echo "Weekly Engineering \
meeting! $( date )" | fmt -w 32 | xmessage -file -
(as one line)
... in my current (user) crontab. I see that message regularly, so I
know ;-)
> But I cannot get that to work from crontab and at the moment crontab is
> not mailing any actions that I can find.
Are you trying to use your personal crontab or the system crontab
(/etc/crontab)? Should be your own, or you'll get user permissions
issues.
> It works execution a script with that in it.
>
> However, everybody (I have a 2 seater Debian) must issue xhost + from
> their session for it to be allowed.
Evil! Evil! *Never* do that.
Peace.
--
Karsten M. Self <kmself@ix.netcom.com> http://kmself.home.netcom.com/
What Part of "Gestalt" don't you understand?
Time is a great healer.
Attachment:
signature.asc
Description: Digital signature