I have tried a number of the methods that I've seen posted, but
none seems to be working on my Pi-3 running the current Debian
raspbian.
I'm using a script adapted from AndrewH7 to catch a power-down
logic bit (emergency shutdown - impendling power loss). The
script is called in /etc/rc.local. This works perfectly.
However my script, which has to run in a terminal - no go.
I've tried a line in /home/pi/.config/lxsession/LXDE-pi/autostart:
@lxterminal -e "/usr/bin/python /home/pi/proj/program.py"
and in /home/pi/.config/autostart/program.desktop
[Desktop Entry]
Name=program
Exec=lxterminal -e "/bin/bash home/pi/program.sh"
Type=Application
{note that program.sh is a script:
#!/bin/bash
echo "Trying" >> /home/pi/evidence
/usr/bin/python program.py
If I run program.sh from a terminal/CLI, the python script starts
and file "evidence" gets a "Trying" line added. Rebooting does
not bring up the program, nor do I get the "Trying" evidence.
Within the LX-window interface, pulling up the LXSession configuration
(Autostart section) shows these as enabled.
One important element is that the python script is using
wxpython widgets that probably depend on running from a terminal,
so methods that don't come from a terminal (like the rc.local)
won't work.
I'd appreciate any clues you might have!
-F
{this is for a device that has a touch screen - normally no
keyboard nor mouse - to control a piece of research equipment.
Trying to keep everything simple and obvious for the students
and research techs who will use it}
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|