Hello all,
I have written a graphical application in python using tkinter. It runs perfectly on the BBB when I start it using a shell script and from the terminal.
I have so far discovered that there are several ways to start a script at boot. I've tried .xinitrc, .config/autostart, crontab and systemd. So far I think I've come closest to what I want with systemd. The status command shows that it worked but I don't see my interface.
Is systemd the recommended mechanism for this or is there a better way?
I used LXDE and modify the autostart to operate in kiosk mode.
Comment out the lxpanel and pcmanfm.
create a shell script (startmyapp.sh) in the home directory that will set up any environment variables you need and launch your application:
sudo nano /etc/xdg/lxsession/LXDE/autostart
And make the contents look like:
#@lxpanel --profile LXDE
#@pcmanfm --desktop --profile LXDE
@xset s off
@xset -dpms
@xset s nonblank
# Turn off the blinking lights
sudo sh -c "echo none > /sys/class/leds/lcd4\:green\:usr0/trigger"
sudo sh -c "echo none > /sys/class/leds/beaglebone\:green\:usr0/trigger"
sudo sh -c "echo none > /sys/class/leds/beaglebone\:green\:usr1/trigger"
sudo sh -c "echo none > /sys/class/leds/beaglebone\:green\:usr2/trigger"
sudo sh -c "echo none > /sys/class/leds/beaglebone\:green\:usr3/trigger"
# Start your application
sudo sh -c "./startmyapp.sh > myapp.log"
Thank you Peter,
I'll be trying this on monday.
Best Regards,
Jorge Garcia
Worked like a charm, thank you Peter