0

So, I'm using the Pi 3 as a soundboard using the code found here:

What I am looking to accomplish here is to have the Pi automatically run the code upon boot. So far, I have changed the default directory for console to the location of the code, that way all I have to pass into the console is python3 main.py to get it run.

However, it runs the script in the console and after about 1 second it automatically closes. It is no longer interactive. This code essentially runs in the console interactively until you decide to exit.

I have entered the following into /etc/xdg/lxsession/LXDE-pi/autostart

@lxterminal -e python3 /home/pi/Downloads/soundboard-master.main.py

I have tried so many different solutions, and this was the only one that got the console to open up and run the command automatically. I tried creating an autostart folder and file, that did not work.

I have also tried all of the following: Python Programs to open up automatically on boot up into Desktop No methods for running python script on startup are working https://thepihut.com/blogs/raspberry-pi-tutorials/34708676-starting-something-on-boot https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/ https://medium.com/salted-bytes/running-a-python-script-on-boot-a7051ee8d948 Python run script in new console on startup

The list goes on and on. Any help would be appreciated to help me get this up and running by tomorrow morning for a Christmas present to my girlfriend's father.

Thank you so much, and Happy Holidays!

  • Looks like you're missing the link from your question ("found here"). – Mark Smith Dec 25 '18 at 2:04

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.