Starting vncserver on Centos or RH type Linux fails with - Fatal server error: could not open default font 'fixed'. How can I fix this?
Asked Answered
K

7

9

I want to set up a vncserver on a generic/clean Centos or RH type Linux. I am working within the AWS EC2 infrastructure but that should not matter I believe.

To make this effort succeed there are some prerequisites we need to help us run the vnc session i.e., X Windows.

I've installed all the usual packages, facilitated by yum, and followed every bit of advice I can find on the internet

# Start by installing the X Windows System (-y to auto accept) 
yum groupinstall -y "X Window System"

then

# Install the VNC stuff
yum install -y  tigervnc-server tigervnc-server-module 

but when I try to start vnc

service vncserver start

I get error text like this (after you run vncpasswd and modify /etc/sysconfig/vncservers)

bash-4.1# service vncserver start
Starting VNC server: 2:root xauth:  creating new authority file /root/.Xauthority

WARNING: The first attempt to start Xvnc failed, possibly because the font
catalog is not properly configured.  Attempting to determine an appropriate
font path for this system and restart Xvnc using that font path ...
Could not start Xvnc.


Xvnc TigerVNC 1.1.0 - built Feb 22 2013 22:28:37
Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11300000, The X.Org Foundation

Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension VNC

Mon Apr  1 01:09:13 2013
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5902
 vncext:      created VNC server for screen 0
[dix] Could not init font path element catalogue:/etc/X11/fontpath.d, removing from list!
[dix] Could not init font path element built-ins, removing from list!

Fatal server error:
could not open default font 'fixed'

I have tried all the advices and tips on the internet about installing fonts, creating links, renaming x,y and z to no avail. How can I get it to work?

Kori answered 1/4, 2013 at 6:36 Comment(0)
K
11

The magic combination of yum installs to get this working for me was as follows:

yum groupinstall -y "X Window System"
yum install -y  tigervnc-server tigervnc-server-module libXfont pixman xterm xorg-x11-twm
chkconfig --level 345 vncserver on

then for convenience maybe something like this to get it going

echo 'VNCSERVERS="2:root"' >> /etc/sysconfig/vncservers

This is assuming you are doing this all as root and you are happy to start your vncserver on DISPLAY 2.

If you get connection refused errors from any attempt to connect to the vncserver once it is running check a couple of things:

  1. Your local firewall (iptables) or otherwise allows connections to 5902 (or another port your server is using)

  2. You have not forbidden remote connection to the vncserver via the VNCSERVERARGS option in /etc/sysconfig/vncservers like this:

    VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"
    

Something like

tcpdump port 5902

can help you decide if it is a local or remote firewall problem etc.

Kori answered 1/4, 2013 at 6:36 Comment(0)
F
7

I updated libXfont and it helped me.

In CentOS for example, do:

yum update libXfont
Fed answered 30/4, 2013 at 14:21 Comment(1)
Thanks Dave. I hope that the -1 is for my poor English and not for the idea to update the lib.Fed
A
2

The below steps worked for me.

yum groupinstall -y Desktop

yum -y install tigervnc-server pixman pixman-devel libXfont

chkconfig --levels 235 vncsever on

Create vncpassword

[root@krizna ~]$vncpasswd

Open /etc/sysconfig/vncservers and add the below lines (change as per your requirement)

VNCSERVERS="1:root"

VNCSERVERARGS[1]="-geometry 800x600"

Now start the service

service vncserver start

Now you could start the service without error .

Check this link install vnc on centos 6

Alver answered 17/5, 2013 at 12:14 Comment(0)
C
1

Double-check that you have enough free space on "/". I got the above error because there was no free space under "/".

Clotilde answered 1/7, 2013 at 8:53 Comment(0)
N
0

For me, I just needed this:

sudo yum install xorg-x11-fonts-base

Although after that I ran into another problem: "VNC: Could not acquire name on session bus". That's mentioned here: http://ubuntuforums.org/showthread.php?t=1480094 but I haven't gotten to the bottom of it...

Niccolo answered 1/1, 2014 at 14:48 Comment(0)
S
0
  1. Make sure your system already install following packages

    yum -y install tigervnc-server pixman pixman-devel libXfont
    
  2. Make sure you configured vncserver correctly by editing /etc/sysconfig/vncservers file and adding your user to uncommented line

    VNCSERVERS="2:user_name"
    

    and uncommenting the following line

    VNCSERVERSARGS[2]="-geometry 800x600 -nolisten tcp -localhost"
    
  3. Switch to user user_name and set vncpasswd.

  4. Restart vncserver service by service vncserver restart.

  5. Make a vncserver session vncserver :1.

  6. Make sure your firewall accepts your connection.

Shawm answered 26/4, 2014 at 6:59 Comment(0)
J
-2

Make sure your loop interface is up.

Josephson answered 9/3, 2014 at 23:7 Comment(1)
What is loop interface? Can you extend your answer?Holtz

© 2022 - 2024 — McMap. All rights reserved.