My Profile

Keep Up to Date:
Blog RSS
Blog
Forum RSS
Forum
Post New Topic Post Reply
Posted 4 Months, 2 Weeks ago
gromit
Senior Boarder
Posts: 61
graphgraph
User Offline
 
Hi Everyone,

I want to run xterm every 1 minutes. Here is my crontab file:

SHELL=/bin/bash * * * * * /usr/X11R6/bin/xterm &

But it doesn't work. Instead I got email in my account like this: ###################################### Message 1: From gejun Sun Jun 15 17:43:00 2003 Date: Sun, 15 Jun 2003 17:43:00 -0500

X-Cron-Env: <SHELL=/bin/bash> X-Cron-Env: <HOME=/home/gejun> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=gejun>

/usr/X11R6/bin/xterm Xt error: Can't open display: #####################################

Can anyone help me?

Jun Ge
The administrator has disabled public write access.
Posted 4 Months, 2 Weeks ago
sweetfresa14
Senior Boarder
Posts: 60
graphgraph
User Offline
 
Specify the display it's to be run on. e.g.

* * * * * /usr/X11R6/bin/xterm -display :0.0 &
The administrator has disabled public write access.
Posted 4 Months, 2 Weeks ago
biddy
Senior Boarder
Posts: 68
graphgraph
User Offline
 
On 15 Jun 2003 15:48:18 -0700, Jason

Why do you want to open an xterm every minute? Trying to see how many you can have at one time? You need to set DISPLAY=:0
The administrator has disabled public write access.
Posted 4 Months, 2 Weeks ago
johndippel
Senior Boarder
Posts: 72
graphgraph
User Offline
 
After adding the -display, the xterm comes out!

In fact I am trying to make a simple alarm which will popup a window and beep the pc speaker, just reminding me to take a rest every one hour. But I failed many times. At first I tried to use a perl scrit like this: ######################### #!/usr/bin/perl -w use strict; my $interval = 3;

while(1) { sleep($interval); print 'time is up take a restn'; system('echo -e \a'; # print chr(7); ########################## It works well but the problem is that if I close the console from which I run the script, it won't work any more. Then I tried to use crontab. Now I can popup the window. But I still can't beep. I know two way to beep in script as follows, but they don't work in crontab. way 1: $ xkbbell (X only) way 2: $ echo -e \a

What should I do?

Thank you in advance.

Jun Ge
The administrator has disabled public write access.
Posted 4 Months, 2 Weeks ago
skyhog
Senior Boarder
Posts: 57
graphgraph
User Offline
 
'GJ'
The administrator has disabled public write access.
 
Copyright © 2006 - Nov 2008 My Linux Gang