1

I have 4 python scripts running continuously. How I can open them in separate windows on startup? I need see the terminals when it's booting up.

I tried rc.local: it's working but I can't see the terminals of each script. I need that after reboot I can see 4 terminal windows like when I start scripts myself. There is way to do that?

1

I'm assuming your using Raspbian Stretch with Desktop or Raspbian Buster with Desktop.

Edit the autostart file using:

sudo leafpad /etc/xdg/lxsession/LXDE-pi/autostart

Autostart file should look similar to:

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
point-rpi

Add your 4 Python programs to the end using @lxterminal:

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
point-rpi
@lxterminal -e python3 /home/pi/test1.py
@lxterminal -e python3 /home/pi/test2.py
@lxterminal -e python3 /home/pi/test3.py
@lxterminal -e python3 /home/pi/test4.py
  • Thanks!!!! you are the best! – Aurimas Šiaulys Jul 1 at 14:29
  • it is launch scripts in /etc/xdg/lxsession/LXDE-pi/autostart autostart folder? – Aurimas Šiaulys Jul 1 at 14:44
  • No, my example launches scripts located in /home/pi (the path before the test<n>.py). – CoderMike Jul 1 at 15:04
  • if script crashes ? where can find logs? – Aurimas Šiaulys Jul 2 at 10:14

Your Answer

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

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