Enable Auto Run At Boot Raspbian OS

Setup Guide – Enable Auto Run At Boot Raspbian OS – Last Updated (2-5-2021)

This guide is to help setup auto start on the Raspberry Pi. This method uses the LXDE-pi/autostart file. All this guide does is set this up to be used a bit simpler.

NOTES: This installation if meant for Raspberry Pi and Raspbian OS but should work on any linux distribution. This guide also assumes that you already have basic terminal skills and know how to locate files and folders with it. It also assumes you have Geany Text Editor and Thonny Python Editor installed, Raspbian OS comes with these by default at the time of this guide. Also anything within quotations ” “, are terminal commands.

First you will want to open Terminal and run the following command

“sudo mkdir /startup”

Now you will want to enter “sudo geany /etc/xdg/lxsession/LXDE-pi/autostart”

At the very bottom add “@bin/bash /startup/startup.sh’ and then save and close.

Now we need to create the startup file. Enter “sudo geany /startup/startup.sh”

Now you can add the Google DNS to the startup script. I usually start with a 5 second delay to make sure the OS GUI and everything else has loaded properly before opening my programs. Just be sure that if you add more programs to this file to add an & at the end of each line as well as a 1 second delay. This helps keep the CPU from getting overloaded and failing to open things. In the picture below, to add more programs, copy and paste lines 2 and 3 to lines 4 and 5, then change the directory.

Once you have all your programs added, you can save and close.

To finish up, run “sudo reboot” to test and see if the program loads properly. Make sure that all programs added to this list have execution permissions or they will fail to run, or add the sudo prefix like in the previous image.

If you have any other questions, you can contact me at support@bintech-llc.com