28

I installed VNC, using

sudo apt-get install xfce4 xfce4-goodies tightvncserver

But I can't start it, when I enter

vncserver

I'm getting error message as

Couldn't start Xtightvnc; trying default font path.
Please set correct fontPath in the vncserver script.
Couldn't start Xtightvnc process.

15/07/15 18:59:34 Xvnc version TightVNC-1.3.9 15/07/15 18:59:34 Copyright (C) 2000-2007 TightVNC Group 15/07/15 18:59:34 Copyright (C) 1999 AT&T Laboratories Cambridge 15/07/15 18:59:34 All Rights Reserved. 15/07/15 18:59:34 See http://www.tightvnc.com/ for information on TightVNC 15/07/15 18:59:34 Desktop name 'X' (vultr.guest:1) 15/07/15 18:59:34 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t 15/07/15 18:59:34 Listening for VNC connections on TCP port 5901 Font directory '/usr/share/fonts/X11/misc/' not found - ignoring Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring

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

I have solved one issue by adding hostname in hosts file. But still having other errors, please help.

user
  • 473
rebornx
  • 709

8 Answers8

32

Atlast after tried many solutions and fixes I fixed this issue. I almost give up, but fixed now.

Problem 1: Couldn't start Xtightvnc process.

Solution: check your hostname, and /etc/hosts make sure both are same. To edit those files, use the commands.

nano /etc/hostname
nano /etc/hosts
hostname

Problem 2:

Couldn't start Xtightvnc; trying default font path.
Please set correct fontPath in the vncserver script.
Couldn't start Xtightvnc process.

Solution: The x11 fonts are missing, I don't know why the dependency packages are not installed. Try to find folder

ls /usr/share/fonts/X11/

if it is not found, then try to install xfonts base

apt-get install  xfonts-base
rebornx
  • 709
8

Maybe to help others - check the logs!

I was running

vncserver -geometty 1200x900 -alwaysshared -localhost -compatiblekbd :1

I experienced the same message

Couldn't start Xtightvnc; trying default font path.
Please set correct fontPath in the vncserver script.
Couldn't start Xtightvnc process.

# ... list of tightvnc options

My solution was to check the log

cat ~/.vnc/hostname:display.log | less

which indicated a mispelled option (-geometty) - I missed the message in stdout >_<; it was sandwiched between other things.

6

On Kubuntu 14.04 I had the same error with tightvnc server, and while debugging switched to vnc4server, which had the same error. I resolved it in vnc4 by setting the font path.

I got the font path by running

xset q

and getting the value of "Font Path:". I then used this as the value for the "-fp" option. E.g.

vncserver -fp "/usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1,built-ins"

which seems to just pass it through to the underlying Xvnc4 server invocation.

Andy W
  • 61
0

Some distros lack base font package. Try to download 6x13-ISO8859-1.pcf.gz from https://github.com/BlackArch/blackarch-iso/blob/master/live-iso/airootfs/usr/share/fonts/misc/ and put this file to /usr/share/fonts/X11/misc/.

Sauron
  • 101
0

Try deleting the old .pid and .log files from ~/.vnc This errors seems to be pretty generic for any I can't read any file for some reason. Messing with fonts probably won't help you.

This worked for me on 16.04 and 18.04 LTS

A.Adverse
  • 305
  • 1
  • 3
  • 11
0
Fatal server error:
could not open default font 'fixed'

Make sure that in /usr/share/fonts/X11/misc/ there are:

  • fonts.alias file with fixed <fontname> string
  • fonts.dir file with the corresponding <filename> <fontname> string
  • a font file with that filename.
user
  • 473
0

Since literally none of the above worked for me, the real answer to this problem is to use the following command when using Ubuntu 20.04:

vncserver -rfbport 5901 -fp /usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb -depth 24 -geometry 1920x1080 -localhost

That means if you set it up as a service, you'll need to edit the ExecStart line as well to include these options.

Sephethus
  • 226
  • 2
  • 7
0

I had the same issue as extra fonts were not installed and I had issue installing extra packages. Solved it by adding DNS servers. I followed this tip.

To add a dns server w/o changing your permanent setup, just add the entries to /etc/resolv.conf. This should reset when you reboot. The below will use the google dns servers. (this only lasts until next reboot)

nameserver 8.8.8.8 nameserver 8.8.4.4

Adding it permanently is a different animal. I would edit /etc/network/interfaces and under the wlan0 block add the following line:

dns-nameservers 8.8.8.8 8.8.4.4

Then do an apt-get update then run any installs like apt-get install xfonts-base