Python Forum
Using Autostart to run a GUI program at startup. Rpi - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Using Autostart to run a GUI program at startup. Rpi (/thread-40952.html)



Using Autostart to run a GUI program at startup. Rpi - Edward_ - Oct-19-2023

I have been using an autostart display.desktop file as explained in Sec. 3 here
to auto run a program on startup, and it works fine using for my python script.
[Desktop Entry]
Name=binDisplay
Exec=/usr/bin/python3  /home/user/pydisplay/Python/binDisplay.py
But using an executable file instead of the python script as below, does nothing on startup.
[Desktop Entry]
Name=binDisplay
Exec=/home/user/python/exec_package/dist/binDisplay
The binDisplay file launches from terminal and or by double-clicking, so it is valid.
When I launch it manually however, a dialog box opens asking if I want to execute it or cancel.
This dialog doesn't appear with autostart, is that an issue?

What am I doing wrong?
Any advice greatly appreciated.


RE: Using Autostart to run a GUI program at startup. Rpi - SpongeB0B - Oct-28-2023

Hi @Edward_

I'm not an expert with .desktop file (you might want to ask you question on a linux / or even better an desktop environment forum.

You might even found some clue here (but yes it's not really digest.. )
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

If it's a solution for you , you could pass an argument that confirm the launch or not.

Cheers.