Discussion:
display popup message on X with crontab
(too old to reply)
Hugo Vanwoerkom
2006-01-10 22:00:18 UTC
Permalink
Hi,

How would I popup an informative message on X from a crontab entry?

There is xmessage, but from crontab?

Thanks!

H
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Karsten M. Self
2006-01-10 22:40:09 UTC
Permalink
Post by Hugo Vanwoerkom
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.


Peace.
--
Karsten M. Self <***@ix.netcom.com> http://kmself.home.netcom.com/
What Part of "Gestalt" don't you understand?
Remember that the objective of any Microsoft product upgrade is to
stimulate sales.
- Robert X. Cringely
Hugo Vanwoerkom
2006-01-12 15:20:06 UTC
Permalink
Post by Karsten M. Self
Post by Hugo Vanwoerkom
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.

H
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Karsten M. Self
2006-01-13 02:40:09 UTC
Permalink
Post by Hugo Vanwoerkom
on Tue, Jan 10, 2006 at 03:41:52PM -0600, Hugo Vanwoerkom
Post by Hugo Vanwoerkom
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,
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 ;-)
Post by Hugo Vanwoerkom
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.
Post by Hugo Vanwoerkom
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 <***@ix.netcom.com> http://kmself.home.netcom.com/
What Part of "Gestalt" don't you understand?
Time is a great healer.
Hugo Vanwoerkom
2006-01-13 12:20:22 UTC
Permalink
Post by Hugo Vanwoerkom
on Tue, Jan 10, 2006 at 03:41:52PM -0600, Hugo Vanwoerkom
Post by Hugo Vanwoerkom
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,
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

H
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Hugo Vanwoerkom
2006-01-13 15:50:06 UTC
Permalink
Post by Hugo Vanwoerkom
Post by Hugo Vanwoerkom
on Tue, Jan 10, 2006 at 03:41:52PM -0600, Hugo Vanwoerkom
Post by Hugo Vanwoerkom
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,
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.
/usr/bin/X11/xmessage -file /xmessage.downmsg.msg -display :1.0
otherwise he complains that he cannot find xmessage.
/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
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Karsten M. Self
2006-01-13 22:00:10 UTC
Permalink
Post by Hugo Vanwoerkom
on Tue, Jan 10, 2006 at 03:41:52PM -0600, Hugo Vanwoerkom
Post by Hugo Vanwoerkom
Hi,
How would I popup an informative message on X from a crontab entry?
And xmessage has no beep facility.
The more general problem is that most sound servers suck, and if I'm
already accessing the sound device (e.g.: playing oggs in xmms), I
can't play an additional alert.

What's the recommended soundserver to use in this case?

I'm apparently running i810_audio, ac97_codec, and soundcore, and
possibly esound. I really haven't kept up with this.


Peace.
--
Karsten M. Self <***@ix.netcom.com> http://kmself.home.netcom.com/
What Part of "Gestalt" don't you understand?
Q: How does one properly cook a hyena?
A: Oh, that's easy. You just make a laughing stock.
- Brian Kane & Brendan McKeon
Michelle Konzack
2006-01-23 16:30:22 UTC
Permalink
Post by Karsten M. Self
The more general problem is that most sound servers suck, and if I'm
already accessing the sound device (e.g.: playing oggs in xmms), I
can't play an additional alert.
What's the recommended soundserver to use in this case?
I am using rplay all over my network.
Works perfectly, even via NET.
Post by Karsten M. Self
I'm apparently running i810_audio, ac97_codec, and soundcore, and
possibly esound. I really haven't kept up with this.
Me too.
Post by Karsten M. Self
Peace.
Greetings
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSM LinuxMichi
0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Karsten M. Self
2006-01-13 21:50:14 UTC
Permalink
Post by Hugo Vanwoerkom
on Tue, Jan 10, 2006 at 03:41:52PM -0600, Hugo Vanwoerkom
Post by Hugo Vanwoerkom
How would I popup an informative message on X from a crontab entry?
/usr/bin/X11/xmessage -file /xmessage.downmsg.msg -display :1.0
Perhaps. However it _does_ work as written.


Peace.
--
Karsten M. Self <***@ix.netcom.com> http://kmself.home.netcom.com/
What Part of "Gestalt" don't you understand?
I call bullshit on that one, sorry, no man pages no docs. Come on
now, what are they supposed do? Call up the Psychic Hotline?
- tek, describing GNOME documentation, on linux-elitists
Loading...