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 05-23-2007, 07:50 PM   #1
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:

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?

Old 05-23-2007, 08:02 PM   #2
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, 08:13 PM   #3
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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 :}



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 / openSUSE 11 01-04-2007 01: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 01:50 PM
calling a url from cron MSEC Linux - Newbie 1 02-12-2006 02:35 AM
Calling Ant buildfile from cron pcdude Programming 9 10-20-2004 05:11 AM
Calling a Php file from CRON every hours ? airbuzz *BSD 10 02-03-2004 02:04 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:23 AM.

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