I don't know much about the values DISPLAY can take. I've tried to find explanations about this without success. So I simply copy the "printenv" value for DISPLAY.You should not hardcode DISPLAY to :0. Your system can have multiple users.
What do you suggest ?
In fact, the service is launched when a USB disk is plugged, which is detected by a udev rule, as root. (see here : [Solved] Systemd : path and service units.)Starting gui applications from system service sounds very wrong to me. Why don't you make it a user service?
I didn't find the way to do this as a user. I've tried to write a user service and to launch it from the udev rule without success.
Statistics: Posted by sylvain_48 — 2023-12-25 09:19