• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2701
  • Last Modified:

VNC : no display configured

Hello, All

The vncserver which is on one of my redhat desktop suddenly stopped working. I am no longer able to use vncviewer to connect to it from my window box anymore.
There is no firewall and Selinux configured on this redhat box. I can ping it from my windows box and can ssh into it.

[user2@localhost .vnc]$ /sbin/service vncserver status
Xvnc is stopped

I went inside /home/user2/.vnc directory and checked the log
Fri Sep 14 10:06:37 2012
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on port 5903
 vncext:      Listening for HTTP connections on port 5803
 vncext:      created VNC server for screen 0
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!

Fatal server error:
could not open default font 'fixed'
xrdb: Connection refused
xrdb: Can't open display 'localhost.localdomain:3'
xmodmap:  unable to open display 'localhost.localdomain:3'
xhost:  unable to open display "localhost.localdomain:3"alhost.localdomain:3

Please advise.

Thanks,
0
CRIIT
Asked:
CRIIT
  • 4
  • 2
2 Solutions
 
g3nu1n3Commented:
This may help, "The 'fixed' font is needed for the server to start - if it can't find it, you need to specify the correct font path for your machine in the 'vncserver' script. If you're not sure what the path should be, type 'xset q' from within a normal X session. One of the things reported is the font path used by your current X server, which is generally the right thing to use for Xvnc. On some platforms you may need to use a colon as a separator in the font path instead of a comma. If you're on a recent version of Linux but still using VNC version 3.3.1, you may have compressed fonts which VNC doesn't understand." - try upgrading

"The VNC server can also get upset if you have directories on your font path which don't actually exist on your system. Make sure you remove those. Also note that older versions of the Xvnc server, by default, act as if they had a resolution of 100dpi. Some RedHat installations, for example, only install 75dpi fonts, so you may need to install the missing font RPMs from your distribution or use the -dpi option to Xvnc, or update to the latest version."
0
 
CRIITAuthor Commented:
Thank you for the quick reply, g3nu1n3.

Please see the output below:
[user2@localhost ~]$ xset q
xset:  unable to open display ""
[user2@localhost ~]$ Xvnc

Fatal server error:
Server is already active for display 0
        If this server is no longer running, remove /tmp/.X0-lock
        and start again.

My kernal version is :
[user2@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

The vnc-server version is:
[user2@localhost ~]$ rpm -q vnc-server
vnc-server-4.1.2-14.el5_6.6

Again, thank you for the time and help.

Best,
0
 
CRIITAuthor Commented:
After I deleted .X0-lock

[user2@localhost ~]$ Xvnc
Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running

Please advise
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
g3nu1n3Commented:
Before deleting that lock file, did you stop your Xvnc ? If not, you should have, you never want to delete any open files a daemon is using without stopping it. I would at this point shutdown the vnc daemon and restart it.
0
 
CRIITAuthor Commented:
Thank you for the advise, g2nu1n3. The Xvnc is stop and cannot be turned on by using :
service vncserver restart

Here is how I fix the issue after the search online.

[user2@localhost .vnc]$ cat localhost.localdomain\:3.log
Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'

Xvnc Free Edition 4.1.3 - built Oct 15 2008 12:55:42
Copyright (C) 2002-2008 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 40201000, The XFree86 Project, Inc


Fri Sep 14 11:28:18 2012
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on port 5903
 vncext:      Listening for HTTP connections on port 5803
 vncext:      created VNC server for screen 0
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from l                       ist!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from                        list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from                        list!
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from li                       st!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from                        list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from                        list!


Based on the error message above from the log file
[user2@localhost .vnc]$ cat localhost.localdomain\:3.log

There are 3 errors:

1.      Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'
Solution:
Create soft link
 ln –s /usr/share/X11/rgb.txt /usr/X11R6/lib/X11/rgb
 
2.      error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
Solution:
Create soft link
 ln –s /usr/lib64/xserver/SecurityPolicy /usr/X11R6/lib/X11/xserver/SecurityPolicy

3.      Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from l                       ist!
Solution:
Create soft link
ln –s /usr/share/X11/fonts /usr/X11R6/lib/X11/fonts


After this, restart vncserver
service vncserver restart
check the status of vncserver
[user2@localhost X11]$ /sbin/service vncserver status
Xvnc (pid 5287) is running...

Now I am able to use vncviewer to access the redhat box again.

Again thank you for the time and help.

Best,
0
 
CRIITAuthor Commented:
my steps are the direct fix of my question
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now