Tell me more ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I am trying to execute a script when my Raspberry Pi boots up. I would like the web browser to open up automatically.

I have tried to find a simple solution, (like dropping my script in some "startup" directory or something similar) but I am not seeing anything like that.

I have looked into Upstart, but I'm struggling to grasp how that works. Any scripts I've tried have not worked when I test them out.

share|improve this question

1 Answer

up vote 6 down vote accepted

For running Midori on startup, take a look at this tutorial. For DIY solutions, read on.


You can add your script executable command to the bottom of .bashrc that will run your script every time you log in.

  1. Make sure you are in the pi folder: $ cd ~
  2. Write a script to run: $sudo nano superscript
  3. Exit and save: Ctrl+X, Y, Enter
  4. Open up .bashrc for configuration: $ sudo nano .bashrc
  5. Scroll down to the bottom and add the line ./superscript
  6. Exit and save: Ctrl+X, Y, Enter

If you are looking for a solution that works on bootup, take a look at this link. Basic rundown:

  1. Create a file for your startup script: $ sudo nano /etc/init.d/superscript
  2. Write your script in the file.
  3. Exit and save: Ctrl+X, Y, Enter
  4. Make the script executable: $ sudo chmod 755 /etc/init.d/superscript
  5. Register script to be run at start-up: $ sudo update-rc.d superscript defaults
share|improve this answer
The tutorial on setting up Midori on startup was just what I was looking for. Not sure why there are so many ways to do such a simple thing, but I'm glad it's working now. – Tyler Murry Aug 2 at 1:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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