I need to auto start a desktop app on RPi 4. I used Xojo 2022R3.2 to compile. It runs when manually clicking on it, but I cannot get it to auto start with systemd.
I’m having trouble with this. The syslog says:
ec 15 18:29:19 axcys systemd[1]: Started Axcys GraphiX.
Dec 15 18:29:20 axcys GraphiX[662]: Unable to init server: Could not connect: Connection refused
Dec 15 18:29:20 axcys GraphiX[662]: cannot open display:
Dec 15 18:29:20 axcys systemd[1]: axcys-graphix.service: Main process exited, code=exited, status=1/FAILURE
Dec 15 18:29:20 axcys systemd[1]: axcys-graphix.service: Failed with result ‘exit-code’.
Can anyone give me a clue what is wrong/how to fix this? Or is there a better way?
I suggest stating which OS the Pi is running and the version. The method changes from one OS to another. I wonder if those 662 errors mean the app does not have proper privileges.
sudo gpasswd -a pi sudo
In principle, this makes any other user a system administrator.
However, this change will only take effect after the user has logged out and back in, provided that the user “pi” was not already in the user group “sudo”.