Page 1 of 1

autostart and lxterminal

Posted: Mon Oct 16, 2017 8:48 pm
by rolandvs
I'm using a raspi PI with stretch updated to the latest apt-get etc.

If I enter in terminal:

Code: Select all

lxterminal -e bash -c "cd /home/pi/project ; ./project.py; read -p 'hit return to end'"
A python program is started, the function is performed and afterwards I need to hit a button to close the session.

Now I have edited:

Code: Select all

/home/pi/.config/lxsessions/LXDE-pi/autostart
and added the above line together with the @ prefix:

Code: Select all

@lxterminal -e bash -c "cd /home/pi/project ; ./project.py; read -p 'hit return to end'"
I reboot the system, the terminal window briefly appears, see no output (text) and waiting for the key to close the terminal session is not working. The project.py is made executable with chmod +x and the top line of the file contains the #!/path/to/python.

What could be the problem?

Re: autostart and lxterminal

Posted: Tue Oct 17, 2017 7:54 pm
by drooly
if it works manually, i'd write a wrapper script and point your autostart to that.