[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: display popup message on X with crontab



Hugo Vanwoerkom wrote:
Hugo Vanwoerkom 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.
But I cannot get that to work from crontab and at the moment crontab is not mailing any actions that I can find.

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.


That should be:

/usr/bin/X11/xmessage -file /xmessage.downmsg.msg -display :1.0


otherwise he complains that he cannot find xmessage.

You can add font info:

/usr/bin/X11/xmessage -center -file /xmessage.downmsg.msg -display :0.0 -font -adobe-times-bold-r-*-*-25-*-*-*-*-*
-*-* -bg yellow -fg black


And xmessage has no beep facility. Better yet: program the speaker for a unique sound that makes this sort of message obvious.

So I wrote a Qt app. that does so and displays any richtext contained in a file and displays that file with a unique 3 beep warning that can be executed from crontab.

If anybody wants that, let me know at hugo van woerkom (but all one word) at yahoo dot com.

H










Reply to: