please format code with </> button * homework policy * asking questions
I have an exported Linux application and can run it fine in Linux directly executing it, from a .desktop file in the Desktop folder, and from terminal using the complete path to it. I’m running this on Raspbian on a Pi 4 (I’m asking in this forum as it seems more of a general Linux coding question then Pi-specific)
When I have a .desktop file in /home/pi/.config/autostart it launches at boot as one would expect, but the resources it uses (images in it’s own folder) are not loading. I load images for the user GUI and they are a series of JPG’s in the app’s own folder (also work from DATA folder).
I use the same launch path in Exec= as I use in the other two methods, but for some reason the local resources are not loading. I added a Path= line to the .desktop file pointing to the app’s own directory (where it’s images are) to no avail. I also tried placing copies of the images it needs to load in the autostart folder in case it takes that as it’s working directory to no avail. In addition, if I quit my app, and then launch it by executing the same .desktop file in autostart manually, it all works, so perhaps this is a timing during the boot sequence issue rather than a location.
What am I missing? This is driving me nuts. I don’t want to hard-code locations for these images in the app, but may have to if I can’t resolve this. I’m sure I’m missing something simple as this should work.
Any suggestions are most welcome.