Autostart does not work after user reboot
问题 I want to autostart a sh script after reboot. I add below line to /etc/xdg/lxsession/LXDE-pi/autostart . @/home/pi/mog/run.sh Everything works fine if i plug the raspberrypi-2 to power line or switch on it after halt. However when i run shell command sudo shutdown -r now the autostart method does not work after reboot? I want to run a C++ application after reboot and my run.sh script is below. #!/bin/bash sleep 5 /home/pi/mog/mog -platform xcb 回答1: I guess it depends on what type of shell