LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   calling startx from cron, no go (https://www.linuxquestions.org/questions/linux-general-1/calling-startx-from-cron-no-go-556216/)

Plastech 05-23-2007 07:50 PM

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.

Plastech 05-23-2007 08:02 PM

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?

Tinkster 05-23-2007 08:13 PM

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


All times are GMT -5. The time now is 08:44 PM.