You are not logged in.

#1 2018-07-26 13:25:48

chippey5
Member
From: Sweden
Registered: 2015-10-26
Posts: 8

TigerVNC [Non-headless] connection refused

Hi,

I have a server in my network with a previously working TigerVNC daemon running. Now when connecting, any device in the network gets the error message "Connection refused". I am running LightDM and Cinnamon on this setup with a physical display dummy plugged into the machine.

My current service file for x0vncserver looks as follows:

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=forking
User=chippey5
ExecStart=/usr/bin/sh -c 'sleep 10 && /usr/bin/x0vncserver -display :0 -geometry 1920x1080 -rfbport 5900 -passwordfile /home/chippey5/.vnc/passwd &'
Restart=always

[Install]
WantedBy=multi-user.target
#-display :0

Daemons for both LightDM show up as running:

● lightdm.service - Light Display Manager
   Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2018-07-26 15:10:03 CEST; 6s ago
     Docs: man:lightdm(1)
 Main PID: 3217 (lightdm)
    Tasks: 8 (limit: 4915)
   Memory: 21.5M
   CGroup: /system.slice/lightdm.service
           ├─3217 /usr/bin/lightdm
           ├─3223 /usr/lib/Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
           └─3272 lightdm --session-child 14 21
x0vncserver.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/x0vncserver.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2018-07-26 15:22:24 CEST; 6s ago
  Process: 5560 ExecStart=/usr/bin/sh -c sleep 10 && /usr/bin/x0vncserver -display :0 -geometry 1920x1080 -rfbport 5900 -passwordfile /home/chippey5/.vnc/passwd & (code=ex>
 Main PID: 5561 (sh)
    Tasks: 2 (limit: 4915)
   Memory: 692.0K
   CGroup: /system.slice/x0vncserver.service
           ├─5561 /usr/bin/sh -c sleep 10 && /usr/bin/x0vncserver -display :0 -geometry 1920x1080 -rfbport 5900 -passwordfile /home/chippey5/.vnc/passwd &
           └─5562 sleep 10

Port 5900 is open. For some reason I am able to connect to the VNCserver when configured through LightDM (also port 5900), but then it renders in software mode, which I want to avoid.

Any ideas?

Last edited by chippey5 (2018-07-26 13:26:17)

Offline

#2 2018-09-09 17:43:03

Attuflix
Member
Registered: 2013-08-17
Posts: 2

Re: TigerVNC [Non-headless] connection refused

I give your my  /etc/systemd/system/vncserver@:1.service. It works without problem.


[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
Before=lightdm.service

[Service]
Type=forking
User=yupper

ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i >/dev/null 2>&1 || true'
ExecStart=/usr/bin/vncserver
ExecStop=/usr/bin/vncserver -kill %i

[Install]
WantedBy=multi-user.target


then this is my ".vnc/xstartup"

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export XDG_CONFIG_HOME=/home/yupper/vnc-xfce4

#startxfce4 &
dbus-launch xfce4-session

Offline

Board footer

Powered by FluxBB