I am trying to start a GUI application (python3 project) on application startup. I've created a script in /etc/xdg/autostart/.

@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xscreensaver -no-splash
export DISPLAY=:0
@/usr/bin/python3 ~/path/to/the/file.py

I've also tried the following script in /home/debian/.config/autostart/fileName

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
export DISPLAY=:0
@lxterminal -e /usr/bin/python3 ~/path/to/the/file.py

Something to note is that some of the libraries used are only available in "debian" login. Hence, I need to run this script as "debian".

Any suggestions on how to improve this? Currently, on startup nothing happens. I tried putting a touch command before the export command to see if the file is even invoked, I didnt see any file generated either.

1 Answer 1


Found the solution here : Why does LXQT Autostart not do anything?

I updated the /home/debian/.config/autostart folder and created a new .desktop file with inputs:

[Desktop Entry]
Exec=sh script_name

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .