autostart and lxterminal

LXTerminal is the standard terminal emulator of LXDE - http://wiki.lxde.org/en/LXTerminal
Locked
rolandvs
Posts: 1
Joined: Mon Oct 16, 2017 8:39 pm

autostart and lxterminal

Post 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?
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: autostart and lxterminal

Post by drooly »

if it works manually, i'd write a wrapper script and point your autostart to that.
Locked