LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 05-23-2007, 08:50 PM   #1
Plastech
Member
 
Registered: Jul 2006
Posts: 63

Rep: Reputation: 15
Arrow calling startx from cron, no go


Logged in as user "frame" and ran crontab -e. Setup cron to launch a shell script which ends with "startx" (which really just starts a feh slideshow thanks to .xsession settings). Trouble is, when the shell script is called with cron, I get:

Code:
xauth: creating new authority file /home/frame/.serverauth.4008

X: user not authorized to run the X server, aborting.
giving up.
xinit:  Connection refused (errno 111): unable to connect to X server
xinit:  No such process (errno 3):  Server error.
Couldnt get a file descriptor referring to the console
Any idea how to fix this? Is there a way to make that command come from "frame" instead of whichever random user cron uses?

Thanks.
 
Old 05-23-2007, 09:02 PM   #2
Plastech
Member
 
Registered: Jul 2006
Posts: 63

Original Poster
Rep: Reputation: 15
Okay, it seems that for startx to work, the command has to come from the console (which apparently it doesn't when using cron?). Is there a way to spoof this through my shell script?
 
Old 05-23-2007, 09:13 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
I still don't think that cron is necessarily the right way to go, and
if you hadn't started several threads with little chunks of a bigger
problem you would possibly have a working solution already :}


Cheers,
Tink
 
  


Reply


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
cron not working from crontab nor form /etc/cron/cron.d. What did SuSE change? JZL240I-U Suse/Novell 11 01-04-2007 02:57 AM
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 02:50 PM
calling a url from cron MSEC Linux - Newbie 1 02-12-2006 03:35 AM
Calling Ant buildfile from cron pcdude Programming 9 10-20-2004 06:11 AM
Calling a Php file from CRON every hours ? airbuzz *BSD 10 02-03-2004 03:04 PM


All times are GMT -5. The time now is 04:05 PM.

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