Run "sudo x" in the startup ubuntu
The question is probably silly, but nevertheless. How do you implement correctly run similar command: "sudo vh_runhub" in startup on ubuntu?
You could create the file /etc/init.d/verlihub and write "sudo vh_runhub"
chmod +x /etc/init.d/verlihub
rc-update add default verlihub
But it's not like working way...
asked October 8th 19 at 03:59
If vh_runhub need to run from Ruta, in this case, sudo should generally be omitted. The commands in init.d run root.
No sudo. Or human service script or /etc/rc.local.
If root can't run, and the user starts, he lacks any settings (all of a sudden he is somewhere in the ~ store, I don't know, haven't used) or some environment variables.
Depends on which version of Ubuntu. With 11.10 startup logic changed, and if these actions were enough to add to the startup, now is not enough.
And, as I said, in /etc/init.d/ sudo only need if you want to run the command on behalf of another user (not root), for example,
vasyapupkin sudo su-c "/usr/bin/SUPERFILE"
S. P. May, of course, you did not finish, but
not enough, you need to add
add a startup script in /etc/rc.local
or in a crontab file with the option to start at startup
Find more questions by tags UbuntuLinux