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 09-26-2006, 05:52 PM   #1
crashsystems
Member
 
Registered: May 2006
Location: Tennessee et. al
Distribution: Debian Sid, Etch
Posts: 138

Rep: Reputation: 15
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
 
Old 09-26-2006, 06:07 PM   #2
ygloo
Member
 
Registered: Aug 2006
Distribution: slack
Posts: 323

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

Last edited by ygloo; 09-26-2006 at 06:19 PM.
 
Old 09-27-2006, 10:24 AM   #3
crashsystems
Member
 
Registered: May 2006
Location: Tennessee et. al
Distribution: Debian Sid, Etch
Posts: 138

Original Poster
Rep: Reputation: 15
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
 
Old 09-27-2006, 11:21 AM   #4
ygloo
Member
 
Registered: Aug 2006
Distribution: slack
Posts: 323

Rep: Reputation: 30
try
"ps aux |grep x11vnc"
to see if program is running
 
Old 09-27-2006, 11:36 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,817

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
Use the full path to x11vnc.
 
Old 09-27-2006, 12:06 PM   #6
crashsystems
Member
 
Registered: May 2006
Location: Tennessee et. al
Distribution: Debian Sid, Etch
Posts: 138

Original Poster
Rep: Reputation: 15
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
 
Old 09-27-2006, 12:28 PM   #7
ygloo
Member
 
Registered: Aug 2006
Distribution: slack
Posts: 323

Rep: Reputation: 30
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

Last edited by ygloo; 09-27-2006 at 01:13 PM.
 
Old 09-27-2006, 12:34 PM   #8
ygloo
Member
 
Registered: Aug 2006
Distribution: slack
Posts: 323

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

Last edited by ygloo; 09-27-2006 at 12:45 PM.
 
Old 09-27-2006, 01:53 PM   #9
crashsystems
Member
 
Registered: May 2006
Location: Tennessee et. al
Distribution: Debian Sid, Etch
Posts: 138

Original Poster
Rep: Reputation: 15
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

Last edited by crashsystems; 09-27-2006 at 02:28 PM.
 
Old 11-06-2006, 09:45 AM   #10
Thulemanden
Member
 
Registered: Sep 2003
Location: Copenhagen, Denmark
Distribution: PC-BSD, PCLOS, MeeGo, Win 7
Posts: 189

Rep: Reputation: 30
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?
 
Old 11-06-2006, 05:30 PM   #11
ygloo
Member
 
Registered: Aug 2006
Distribution: slack
Posts: 323

Rep: Reputation: 30
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

Last edited by ygloo; 11-06-2006 at 05:32 PM.
 
  


Reply

Tags
cron, rclocal, resolved, x11vnc


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
simple cron job: not working Robert0380 Linux - Software 3 06-24-2008 04:45 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
Simple Cron Job question FreezEy Slackware 3 07-11-2006 01:30 PM
how to make a simple code for just restarting Apache via a Cron job hsa Programming 1 08-22-2005 04:15 AM
simple cron question Lleb_KCir Linux - General 9 03-03-2005 12:33 PM


All times are GMT -5. The time now is 07:02 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