TigerVNC dies because display: xrdb connection refused on CentOS 7

3,742 views
Skip to first unread message

Hugo Alberto Bedolla

unread,
Aug 21, 2017, 5:31:18 PM8/21/17
to TigerVNC User Discussion/Support
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 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.

dave...@gmail.com

unread,
Aug 21, 2017, 7:14:00 PM8/21/17
to TigerVNC User Discussion/Support
Just a few low hanging fruit suggestions:

Check permissions on the .vnc directory in your home directory. It should be 700 (can't be readable or writable by anyone but you). Also check permissions on your home directory. It can be readable by others, but not writable (because someone could change the name of your .vnc directory to something else, create a new .vnc directory, complete with their own passwd file and hijack your session(s). So 700, 750, or 755 are all ok home directory permissions.

Did you remove the comments in the xstartup file to actually start up a full normal window manager? Not sure this is the issue, because it should still fall back to something (something ugly, but something).

Um... Is "hostname" the actual name of your computer? It could also be as simple as not properly resolving the hostname. Make sure that whatever you named the host (in /etc/hostname under centos7 I believe) matches with a line in the /etc/hosts file (with the correct ip address for the system).

Probably other possible causes, but those are the first handful of things that popped in my head right off the bat.

    Dave

zhong...@gmail.com

unread,
Nov 24, 2019, 9:06:57 PM11/24/19
to TigerVNC User Discussion/Support

It seems no effective answer here, any others have experienced this problem and have answers? Thanks!
Message has been deleted

jan.k...@gmail.com

unread,
Dec 10, 2019, 6:20:43 PM12/10/19
to TigerVNC User Discussion/Support
Try "-listen tcp" parameter. That helped me with "xrdb:connection refused" problem. 

Crypto Stanley

unread,
Jul 19, 2022, 5:58:42 AM7/19/22
to TigerVNC User Discussion/Support
remove all temporary and lock files in cd /tmp 
rm -rf  .X11 files
rm -f /tmp/.X4-lock
rm -f /tmp/.X11-unix/X4

A B

unread,
Nov 6, 2022, 4:12:53 AM11/6/22
to TigerVNC User Discussion/Support
check if you are running apparmor, if so disable the service

Op dinsdag 19 juli 2022 om 11:58:42 UTC+2 schreef Crypto Stanley:
Reply all
Reply to author
Forward
0 new messages