You are not logged in.

#1 2019-05-08 05:33:12

Gotek
Member
Registered: 2019-05-08
Posts: 3

Segfault when trying to run TigerVNC server with systemd unit file

When trying to run the vncserver with a systemd unit file I get following log output:

Xvnc TigerVNC 1.9.0 - built Jul 20 2018 11:32:25
Copyright (C) 1999-2018 TigerVNC Team and many others (see README.rst)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12000000, The X.Org Foundation


Tue May  7 19:07:57 2019
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5977
 vncext:      Listening for HTTP connections on all interface(s), port 5877
 vncext:      created VNC server for screen 0
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported high keycode 372 for name <I372> ignored
>                   X11 cannot support keycodes above 255.
>                   This warning only shows for the first high keycode.
> Internal error:   Could not resolve keysym XF86MonBrightnessCycle
Errors from xkbcomp are not fatal to the X server
(EE) 
(EE) Backtrace:
(EE) 0: /usr/bin/Xvnc (OsLookupColor+0x13a) [0x55958bb1351a]
(EE) 1: /usr/lib/libpthread.so.0 (funlockfile+0x50) [0x7f75b9df251f]
(EE) 2: /usr/bin/Xvnc (_ZN14XserverDesktopD2Ev+0xdb) [0x55958ba6f0db]
(EE) 3: /usr/bin/Xvnc (_ZN14XserverDesktopD0Ev+0xa) [0x55958ba6f24a]
(EE) 4: /usr/bin/Xvnc (vncExtensionClose+0x28) [0x55958ba636b8]
(EE) 5: /usr/bin/Xvnc (CloseDownExtensions+0x31) [0x55958bad3071]
(EE) 6: /usr/bin/Xvnc (dix_main+0x3d2) [0x55958bac33c2]
(EE) 7: /usr/lib/libc.so.6 (__libc_start_main+0xf3) [0x7f75b94cbce3]
(EE) 8: /usr/bin/Xvnc (_start+0x2a) [0x55958b99106a]
(EE) 
(EE) Segmentation fault at address 0x8
(EE) 
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE) 
/usr/bin/startxfce4: X server already running on display :77
xrdb: Connection refused
xrdb: Can't open display ':77'
xfce4-session: Cannot open display: .
Type 'xfce4-session --help' for usage.

With this xstartup

#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
dbus-launch /usr/bin/startxfce4 &

and this unit-file

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

[Service]
Type=simple
User=gotek
PAMName=login
PIDFile=/home/%u/.vnc/%H%i.pid
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver :%i -geometry 1440x900 -alwaysshared -fg
ExecStop=/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target

When manually starting with vncserver :<anynumber> including number 77 it runs fine.

Can this possibly be because I'm running on a proxmox host, which has an integrated noVNC running? A ubuntu 18.04 lxc container I managed to run tigervnc-server from didn't use noVNC for it's console.

Offline

#2 2019-05-11 02:31:33

alfalfa
Member
Registered: 2017-06-30
Posts: 63
Website

Re: Segfault when trying to run TigerVNC server with systemd unit file

Maybe it need to wait for a later target, such as a display manager. For a x11vnc server with lightdm:

[Unit]
Description=Remote desktop service (VNC)
Requires=display-manager.service
After=display-manager.service

[Service]
Type=forking
User=pi
ExecStart=/usr/bin/sh -c '/usr/bin/x11vnc -auth /home/pi/.Xauthority -rfbauth /home/pi/.ssh/vncpasswd -forever -nowf -display WAIT:0 -rfbport 5900 &'

[Install]
WantedBy=multi-user.target

Last edited by alfalfa (2019-05-11 02:34:04)

Offline

#3 2019-09-09 23:23:59

DrNoob
Member
Registered: 2017-03-12
Posts: 11

Re: Segfault when trying to run TigerVNC server with systemd unit file

I'm having the exact same issue, my backtrace is identical to the one posted in the first message.
However, my tigervnc is different since mine shows compilation time on "Jun 30 2019" (tigervnc version 1.9.0-3).
Seems like this keeps updating even though there is a bug. I tried adding the "Requires" line in the unit file from alfalfa's answer, but it did not change a thing...

Offline

Board footer

Powered by FluxBB