I have a pig.sh file located in /home/pi/.config/lxsession/LXDE-pi :
As you can see I tried the 3 methods I found to shut down but none of these works. Lgpt.rpi-exe is successfully started, in fullscreen, but when I quit it, the raspberry pi is not shutting down, nothing happen.
Code: Select all
#!/bin/sh cd /home/pi/Desktop/lgpt/lgpt_DEB/bin exec ./lgpt.rpi-exe sudo shutdown -h now sudo poweroff sudo halt
pig.sh is started with autostart file in same folder which is like this :
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
I tried also inserting the shuting down command at the end of auto start file. If I do that, it works but it shut down just after pig.sh is started. It is supposed to do it only when I quit the program, not at startup.