Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-04-2007, 02:34 AM   #1
LQ Newbie
Registered: Aug 2007
Posts: 1

Rep: Reputation: 0
Script doesn't execute in crontab

Hi Gurus,

I am Linux newbie. I tried to run the following script in crontab with no success. However, it works in xterm. Could you please give me some advice?

/usr/bin/xterm -display :0 -e \
/usr/bin/gmplayer -fs -zoom -quiet -vo xv %s \
-cache 8192 -cache-min 80 -msglevel all=-1 \
-nolirc -ontop -playlist /home/cool2/PlayList/playlist.txt

24 18 * * * cool2 /home/cool2/


Old 08-04-2007, 05:00 AM   #2
Senior Member
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,160
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
In crontab, the script is executed in a totally different environment than from xterm.
For practice, make a script that exports the environment to a logfile.
refer to bash's manpage for how to do this

OTOH root ain't supposed to have access to X, as it's a security hole
Old 08-04-2007, 08:09 AM   #3
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 472Reputation: 472Reputation: 472Reputation: 472Reputation: 472
Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
script in crontab do not execute or take proper environment of user mayank_a Linux - Server 1 07-02-2007 06:03 AM
crontab : why root can't execute ?? bluenectar Linux - General 2 03-12-2007 04:21 AM
crontab execute consecutively SofNine Fedora 17 07-28-2006 02:34 PM
crontab entries will not execute when not logged fatra2 Linux - Software 2 05-23-2006 03:22 AM
Problem when using crontab to execute a .php file doublesheep Linux - General 3 06-10-2004 09:46 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:43 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration