I have edited ~/.config/lxsession/LXDE-pi/autostart using nano (without sudo) to open a lxterminal and run a simple python script that contains an infinite while loop with a print statement.
In my autostart file I have the following command:
@lxterminal -e python3 ~/Desktop/t.py
However, whenever I boot into Desktop environment, I see a lxterminal window pop up for a split second then disappear.
When I also add @lxterminal -e python3 -v into the autostart file, it runs perfectly and the lxterminal window stays there.
I have changed t.py to have one line: print('hello'). The result is the same. A terminal window will open for a split second then close. I don't believe a print statement should cause an exception.
Does anyone know what could be causing my issue?
Thanks
t.pyso that it will run without error in python 2.7 and try rebootingprint('hello'). The result is the same. A terminal window will open for a split second then close. I don't believe a print statement should cause an exception.