TigerVNC dies because display: xrdb connection refused

Issues related to applications and software problems
Post Reply
Enyix
Posts: 2
Joined: 2017/08/21 17:40:32

TigerVNC dies because display: xrdb connection refused

Post by Enyix » 2017/08/21 18:03:53

Hello everybody:

Having problems when starting 'vncserver' (TigerVNC) at both booting time and command line in Centos 7.3_1161 (Core):

When doing 'vncserver' output is:
New 'hostname:1 (myuser)' desktop is myuser:1

Starting applications specified in /home/myuser/.vnc/xstartup
Log file is /home/myuser/.vnc/hostname:1.log
Doing 'ps -eaf | grep vnc' shows:
myuser 6493 1 0 12:52 pts/2 00:00:00 /usr/bin/Xvnc :1 -desktop hostname:1 (myuser) -auth /home/myuser/.Xauthority -geometry 1024x768 -rfbwait 30000 -rfbauth /home/myuser/.vnc/passwd -rfbport 5901 -fp catalogue:/etc/X11/fontpath.d -pn
After that, process dies, and looking at ~/.vnc/hostname:1.log shows:
xrdb: Connection refused
xrdb: Can't open display 'hostname:1'
/usr/bin/vncconfig: unable to open display "hostname:1"
xmodmap: unable to open display 'hostname:1'

** (gnome-session-check-accelerated:6636): WARNING **: Could not open X display

(gnome-session-check-accelerated:6636): Gtk-WARNING **: cannot open display: hostname:1

** (gnome-session-check-accelerated:6647): WARNING **: Could not open X display

(gnome-session-check-accelerated:6647): Gtk-WARNING **: cannot open display: hostname:1

** (process:6499): WARNING **: software acceleration check failed: Child process exited with code 1
(EE)
Fatal server error:
(EE) Could not create lock file in /tmp/.tX1-lock
(EE)
I suspect VNC cannot sync with the X display because any reason outside VNC, but I don't know where to look at, as the log only shows that caveat. I tried all this next without success:

- Tried to delete /tmp/.tX1-lock several times without any effect to solve the vnc behavior.
- Tried to set the /tmp permissions with 'sudo chmod 1777 /tmp' without any effect to solve the vnc behavior.
- Tried to remove .Xauthority and to re-run 'vncserver' without any effect to solve the vnc behavior.
- Tried to do 'systemctl daemon-reload && systemctl start vncserver@:1.service' without any effect to solve the vnc behavior.
- Tried to restart gdm with 'sudo systemctl restart gdm.service' which seems to have no effect to solve the vnc behavior.
- Tried to re-install tigervnc without any effect to solve the vnc behavior.

XForwarding with SSH works straight and is functional, but seems to work very slow and it cannot solve my requirements.

I can't figure out what more is needed to do in order to have a functional VNC.

Hope you may help me. Thanks in advance.
Last edited by Enyix on 2017/08/22 15:17:17, edited 1 time in total.

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: TigerVNC dies because display: xrdb connection refused

Post by lightman47 » 2017/08/21 21:33:50

Likely no help at all, but you remembered to Enable sharing on the 'target' machine (the step I always forget).

Enyix
Posts: 2
Joined: 2017/08/21 17:40:32

Re: TigerVNC dies because display: xrdb connection refused

Post by Enyix » 2017/08/22 15:13:55

Ligthman47: Thanks so much for your help.

I just solved my issue. I've to detail in order to help others:

Problem seems to be with how vnc was syncing with the .tX1-lock file at /tmp (And possibly with related dependencies were not installed, which seems a little strange). I deleted that file several times and re-ran 'vncserver' without any success. Only when I did this next steps my vnc became functional:

a) My VNC version was 1.3.1-9.el7 (CentOS 7 default) so I removed and installed tigervnc-server-1.8.0-1.el7.x86_64.rpm from TigerVNC provided rpm's. I ran TigerVNC 1.8.0 without any change.

b) I edited ~/.vnc/xstartup as follow:

Code: Select all

#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
  case "$WINDOWMANAGER" in
    *gnome*)
      if [ -e /etc/SuSE-release ]; then
        PATH=$PATH:/opt/gnome/bin
        export PATH
      fi
      ;;
  esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
  exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then
  exec sh /etc/X11/xinit/xinitrc
fi
[-x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
LANG=C twm &
After this I re-ran 'vncserver' and problem still happened.

d) I looked it wasn't installed 'xterm' (which it seems suspicious to me, as vnc always started without xterm into the system till my problem begun), so I did install of xterm with other libraries, by executing this next command:

Code: Select all

sudo yum install xorg-x11-font-utils.x86_64 xorg-x11-fonts-100dpi.noarch xorg-x11-fonts-75dpi.noarch xorg-x11-fonts-Type1.noarch xorg-x11-xauth.x86_64 libX11.x86_64 dbus-x11.x86_64 xorg-x11-server-utils.x86_64 xorg-x11-xkb-utils.x86_64 xterm
After that, I ensured all the nedeed X and xterm dependencies were installed.

c) Finally, I deleted again .tX1-lock file at /tmp and .Xauthority at $HOME directory; re-ran 'vncserver' and voilá!... vncserver is running right now :lol: 8-) .

Hope this may help to others with same problem than me.

Post Reply