used systemctl without sudo so I presume Matti was running it as admin.
I am trying to run an Installbuilder install as a user and having a problem with the DISPLAY env variable.
To do this I have a script
@knoobie Thanks for your reply.
I have no idea why you might suspect the favicon. A pointer to some background info as to why “dynamic file creations” might interfere with systemd would be very helpful.
Also, why would java.awt.headless be set to true when it is not a headless setup?
I am investigating the systemd user facility which may be an alternative approach that might work. systemd/User - ArchWiki
I’m not sure why and how it interferes my knowledge about AWT is quite limited; but I’ve seen that it does - therefore my suggestion to alter your setup by either removing the need for PWA to create the files and/or apply the mentioned flag.
Solved.
Systemd/user using this unit file works.
The secret being the Environment entry that ensures that the DISPLAY variable is set early in the linux startup process.
why would java.awt.headless be set to true when it is not a headless setup?
Since Vaadin applications are client-server applications (= Java web server and a web browser), the server actually is “headless” and only the browser needs the DISPLAY to be set. That is why having -Djava.awt.headless=true usually helps to start the server.
The web browser is running as separate process and environment and if you are starting that also as system service, it will need the display (ok, you can run browsers as headless too), but based on the error that was not the case.