I'm using a BeagleBone Black with a 4.3 inches touch display. I have an HMI python script that runs and displays a graphic window on that display. I'd like to run it from an icon on the desktop (using Debian 11).
I have made a .desktop file :
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Icon=/home/debian/MNIST/Python/N2D2.ico
Name=N2D2_IHM
Exec=/home/debian/MNIST/Python/N2D2_IHM.py
Terminal=false
Type=Application
but I don't see how to tell it to use the display. Normally to execute the script I run:
DISPLAY=:0.0 python N2D2_IHM.py
Is there any additional syntax to write in the .desktop file to obtain the same result? Thanks for your help.
The answer is : change the Exec line to
Exec=python /home/debian/MNIST/Python/N2D2_IHM.py