Re: KCrorn - Solved
Hi Tzafrir, Your solution did it ! Thanks, Amichai. On Saturday 08 February 2003 21:37, you wrote: On Sat, 8 Feb 2003, Amichai Rotman wrote: Hi Clan, I am trying to run a cron job to use the record command as follows: KDEDIR/bin/konsole -e /usr/bin/record -cv -t 00:15 I am using KCron, so it will be easier, but I get errors. When I choose to Run Now in KCron, it runs perfectly: Opens a Konsole terminal with the record app and exits normaly. When waiting for the designated time it doesn't. The user runing it gets an e-mail saying: konsole: cannot connect to X server Guy has already mentioned that for this task (and probably for almost anything run under cron) is better done without running an X client. But since the question was asked... You should run something like: DISPLAY=:0 XAUTHORITY=$HOME/.Xauthority /path/to/X/program and its args (If there is problem with X authority you'll get a message about connction refused by server and previously something abut anauthorized). = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
KCrorn
Hi Clan, I am trying to run a cron job to use the record command as follows: KDEDIR/bin/konsole -e /usr/bin/record -cv -t 00:15 I am using KCron, so it will be easier, but I get errors. When I choose to Run Now in KCron, it runs perfectly: Opens a Konsole terminal with the record app and exits normaly. When waiting for the designated time it doesn't. The user runing it gets an e-mail saying: konsole: cannot connect to X server I know it works. I even re-started the crond service. Any ideas? 10x, Amichai. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: KCrorn
On Sat, 8 Feb 2003, Amichai Rotman wrote: Hi Clan, I am trying to run a cron job to use the record command as follows: KDEDIR/bin/konsole -e /usr/bin/record -cv -t 00:15 why are you trying to run an X application from within cron? just tell it to run the 'record' application directly, without the konsole, and see what it does. ofcourse, make sure 'record' records into a file, and a different file at each run (unless you want each run to override the previous run). note that yo need to make sure that the user running 'record' has access to the /dev/dsp device (the sound device) no matter who is logged into the console, and even if no one is logged into the console. by default, distributions tend to set the ownership of /dev/dsp to the user that's logged into the console, or to 'root' when no one is logged into the console. you'll probably have to either change the group of the device and add the user with the cron job to this group, or something else. note also that you'll have problems with this because KDE 'takes over' the /dev/dsp device, when it is running, and at that time, 'record' will probably fail opening /dev/dsp - and will need to be run using the kde program that simulates /dev/dsp for non-kde applications (i forgot this program's name). note that if your purpose is more limited, you might be able to get away with doing only a small part of this setup - just remember that the environment of a process running under 'crond', is not the same as that of processes you run from within your console. -- guy For world domination - press 1, or dial 0, and please hold, for the creator. -- nob o. dy = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: KCrorn
On Sat, 8 Feb 2003, Amichai Rotman wrote: Hi Clan, I am trying to run a cron job to use the record command as follows: KDEDIR/bin/konsole -e /usr/bin/record -cv -t 00:15 I am using KCron, so it will be easier, but I get errors. When I choose to Run Now in KCron, it runs perfectly: Opens a Konsole terminal with the record app and exits normaly. When waiting for the designated time it doesn't. The user runing it gets an e-mail saying: konsole: cannot connect to X server Guy has already mentioned that for this task (and probably for almost anything run under cron) is better done without running an X client. But since the question was asked... You should run something like: DISPLAY=:0 XAUTHORITY=$HOME/.Xauthority /path/to/X/program and its args (If there is problem with X authority you'll get a message about connction refused by server and previously something abut anauthorized). -- Tzafrir Cohen mailto:[EMAIL PROTECTED] http://www.technion.ac.il/~tzafrir = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]