Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Rasbian run automatically after boot-up

  1. Oct 25, 2016 #1
    hello my friends, i need our help to explain to my. i am in project camera surveillance using raspberry pi 3 and i using rasbian. so the problem is every time i startup, i need to open the phyton and run them. i want to know if possible to run the file automatically after boot like bare metal..
     
  2. jcsd
  3. Oct 25, 2016 #2

    jedishrfu

    Staff: Mentor

  4. Oct 26, 2016 #3
    cron is one way. The other way, that I was somewhat familiar with from Ubuntu is editing the rc.local file. Similar structure in Raspberian:

    https://www.raspberrypi.org/documentation/linux/usage/rc-local.md

    see link for more.
     
  5. Oct 26, 2016 #4

    jedishrfu

    Staff: Mentor

    Yes that looks like a good solution too with the caveat that you must do what the directions say ie:
    - running the command in the background

    or else the Pi won't complete the boot process.
     
  6. Oct 26, 2016 #5
    I thought the "&" option took care of that?

    Either way, I learned something - I wasn't aware of the "@reboot" approach to have cron run something at boot up, I had only ever used the time functions.
     
  7. Oct 26, 2016 #6

    jedishrfu

    Staff: Mentor

    Yes the ampersand runs it in the background. The article said dont forget to use it otherwise the PI will be stuck in the boot sequence waiting for the command to finish running.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Rasbian run automatically after boot-up
Loading...