Quantcast
Channel: openSUSE Forums
Viewing all articles
Browse latest Browse all 40713

LEAP 15.1 Linux Daemon Error - cannot open display:0

$
0
0
Hi
I wrote a console application that runs as a linux daemon. It receives requests via at TCP socket and prints the requested form using SVG. However, it only works when I am logged into the Linux PC. I need it to run as a service without any user logged in. When I try to run it as a service without a user logged in I get the "cannot open display:0" error.

What do I need to do to get this to work with and without a user logged into the PC? I have included the unit file of the service. I am running on Opensuse Leap 15.1

Code:

[Unit]
Before=
Description=MPLite Guardian Service
[Service]
Type=forking
RemainAfterExit=no
ExecStart=/home/remote/KardTech/FusionPro/dcfusngardian
Environment=DISPLAY=:0   
User=remote
[Install]
WantedBy=graphical.target

Thanks,
Simon

Viewing all articles
Browse latest Browse all 40713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>