I am reading this answer, and I edited /etc/xdg/lxsession/LXDE-pi/autostart, by appending the following line:

@sudo java -jar /home/pi/Documents/devel/MyProject/MyProject.jar

But nothing happens when I reboot the Pi, the program does not get started. I will also want to have a terminal window if possible.

1 Answer 1


I have packaged my app now with a shell script that runs the java command. Then I have a my-app.desktop file like this:

[Desktop Entry]
Exec=lxterminal -e "my-app-script"

And this goes into .config/autostart.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.