x11vnc icon indicating copy to clipboard operation
x11vnc copied to clipboard

Black screen when running as systemd unit

Open dunestorm333 opened this issue 4 years ago • 0 comments

When running X11vnc under the user service, everything works fine. Here is my user config:

[Unit]
Description=VNC Server for X11
After=multi-user.target graphical.target

[Service]
Type=forking
ExecStart=/usr/bin/x11vnc -bg -ncache 10 -noxdamage -forever
ExecStop=/usr/bin/x11vnc -R stop

[Install]
WantedBy=multi-user.target graphical.target

However when running as the system service, I get a black screen with a cursor when trying to connect:

[Unit]
Description=VNC Server for X11
After=multi-user.target graphical.target

[Service]
Type=forking
ExecStart=/usr/bin/x11vnc -bg -ncache 10 -noxdamage -forever -display :0 -auth /run/user/120/gdm/Xauthority -o /var/log/x11vnc.log
ExecStop=/usr/bin/x11vnc -R stop

[Install]
WantedBy=multi-user.target graphical.target

I am running Gnome 3.36 and gdm as my login manager, is there something I'm doing wrong or is this a bug?

dunestorm333 avatar Jun 08 '20 13:06 dunestorm333