0

I'm not sure how this is a duplicate of anything that was mentioned.

The script I'm trying to run needs Sudo to work, none of the answers say anything about getting a script that needs "super user" privelages to run at startup.

None of the answers have worked so far, I think Upstart would need my password in it somewhere to run the sh.

I'm trying to run a sudo sh at startup, none of these methods seem to work.

I tried adding

sudo //usr/local/include/temp_throttle.sh 80

to Startup Applications. It doesn't run or even ask for password.

I tried

gksudo //usr/local/include/temp_throttle.sh 80

to Startup Applications. It pops up asking for a Password for almost half a second then dissappears but doesn't run.

I tried making a .desktop file and tested it, it runs it but not in sudo so it doesn't work.

Just tried putting my .sh in /etc/init.d/ and used update-rc.d. It runs the script at startup but without sudo privlages so it doesn't work.

I'm not sure what to do to make this work.

Note, Upstart is installed and working but will not launch this script properly.

0

If it's just a simple bash(.sh) script you should be able to add it to the crontab file. I used it to play a video at start-up on my Raspberry Pi but it should work with Ubuntu.

So here is what I use:

@reboot /path/to/script/video_script /path/to/script/video_file

Yours should look like this:

usr/local/include/temp_throttle.sh 80

Add this to the crontab entry using crontab -e. The format is really important but it should give you detailed instructions.

  • 1
    The script needs sudo privelages to work – Cyber_GELF Oct 21 '13 at 23:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.