I am trying to write a unit service file for a program that has a GUI.
I have an ubuntu server from DigitalOcean and I connect to it with TightVNC to display:2.
The GUI requires a username and password to log in to my account online. While this program is open, it allows connecting to their server through port 4002 and request data online using a python script.
The program can be authenticated with a given username and password in the terminal. The following will open the program, automatically login to my account, and displays the program GUI.
$ /home/user1/ibg/ibg username=*** password=***
The unit file that I wrote is as follows:
[Unit] Description=my service After=network.target [Service] Type=simple ExecStart=/home/user1/ibg/ibg username=*** password=*** Restart=always [Install] WantedBy=multi-user.target
The service is active and running but I get the following message which I think prevents the service to be truly functional. I can tell this from the fact that my python script is not working. If instead, I open the program GUI, and log in to my account, the python program works with no issue.
No X11 display variable was set, but this program performed an operation that requires it. at java.awt.SplashScreen.getSplashScreen(SplashScreen.java:117)
Could someone kindly help me with this problem?