aut start program which requires root password

Asked by Dick Hampikian

I have am using weewx (weather system logger) that I want to start up automatically on login. It requires root privileged.
Manually i enter at command prompt: sudo /etc/init.d/weewx start
This works fine, it asks for root password, which I enter....all OK.
How do I get this to run automatically on boot?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Run:

sudo gedit /etc/rc.local

If the file is empty, add the below 2 lines:

/etc/init.d/weewx start
exit 0

If there is text in the file, add the line:

/etc/init.d/weewx start

ABOVE the "exit 0" line

It will now run each boot and as root

Can you help with this problem?

Provide an answer of your own, or ask Dick Hampikian for more information if necessary.

To post a message you must log in.