LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Simple cron problem (http://www.linuxquestions.org/questions/linux-general-1/simple-cron-problem-487217/)

crashsystems 09-26-2006 05:52 PM

Simple cron problem
 
I need to make the following line of code execute when my computer starts:
Code:

x11vnc -rfbauth /home/admin/vncpass -forever -bg
I've tried to use cron to do this (I read up on the tutorials on this site before posting), and I always get the following error in /var/log/syslog:
Quote:

Sep 26 17:00:19 backup-server cron[4664]: Error: bad minute; while reading /etc/cron.d/x11vnc
Sep 26 17:00:19 backup-server last message repeated 10 times
Does anyone know of what I might be doing wrong, or how I should go about getting x11vnc to start with the computer (before the gui login). Thanks for your help.

crashsystems

ygloo 09-26-2006 06:07 PM

cron is used to run tasks every hour,day,week...
put what you want to run at the end of "rc.local" file

crashsystems 09-27-2006 10:24 AM

Ok, so I put the this line of code in /etc/rc.local...
Code:

x11vnc -rfbauth /home/admin/vncpass -forever -bg
but the program is still not starting up when I hit runlevel 5. I copied and pasted the exact same line in bash to see if the command simply had some syntax error I wasn't seeing, but the command worked fine. Last but not least, I looked through all my system logs, but none of them are reporting any errors. Does anyone have any idea what this could be?

crashsystems

ygloo 09-27-2006 11:21 AM

try
"ps aux |grep x11vnc"
to see if program is running

michaelk 09-27-2006 11:36 AM

Use the full path to x11vnc.

crashsystems 09-27-2006 12:06 PM

I used ps aux | grep x11vnc to check if it was running, and it is not. Also, I followed ygloo's sugjestion and put the full path in rc.local, rebooted, and did ps again, and its still not running. I can start it manually, but I want to set it up as a headless server.

crashsystems

ygloo 09-27-2006 12:28 PM

see file permissions of rc.local
in order to start at boot it should look like this:
-rwxr-xr-x 1 root root 1877 2006-08-19 15:21 rc.local

ygloo 09-27-2006 12:34 PM

-rwxr-xr-x 1 root root 1877 2006-08-19 15:21 rc.local

crashsystems 09-27-2006 01:53 PM

After much searching through google, I have found a solution. For anyone who is interested, check it out at http://ubuntuforums.org/showthread.p...ghlight=x11vnc Thank you everyone for your help.

crashsystems

Thulemanden 11-06-2006 09:45 AM

Quote:

Originally Posted by ygloo
cron is used to run tasks every hour,day,week...
put what you want to run at the end of "rc.local" file

ok, but where is that rc.local file to be stored? Is it to be a hidden file preceded by a dot?

ygloo 11-06-2006 05:30 PM

rc.local is not a hidden file...
it is stored in /etc/rc.d/ or somewhere in /etc... along with
these and other startup files:

rc.A
rc.K
rc.M
rc.S
rc.X


All times are GMT -5. The time now is 05:32 AM.