pythonlinuxraspbian

Open and execute command on visual terminal on startup raspberry pi


I have a python script that includes a webserver and i want to run it on a terminal when the rpi boots. Before that I also have to use iptables to do some routing, dependent on the configuration. All that works with python code already and it can also be run on startup. In case that an error occurs, i would want to be able to actually see the terminal and interact with it as well as being able to close the program easily. This is pretty much necessary as people with next to zero computer experience will have to use this. I'd accept any kind of solution, no matter how bad it is, it just has to work somehow. I've tried stuff like crontab as well as even xautomation for simulating keystrokes in order to do it as if it was a keyboard, but i couldn't get it to do anything at all. This can't be that hard can it?


Solution

  • Ok QA style: I found a solution which I will have to tinker with a little in the future, but it basically works now. I followed the steps on this site: https://forums.raspberrypi.com/viewtopic.php?t=282988#:~:text=So%20in%20a,file%20and%20exit and it worked just fine.