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.

4
  • 1
    That's odd, at least some of those font directories should have been created as part of the xfonts-base package, which is recommended for tightvncserver: did you install it with --no-install-recommends? Jul 16, 2015 at 2:44
  • 1
    No, I was installed using sudo apt-get install xfce4 xfce4-goodies tightvncserver
    – rebornx
    Jul 16, 2015 at 16:53
  • still no solutions found for this problem. Already re-installed server few times, but still stuck in this exception. Please help me..
    – rebornx
    Jul 20, 2015 at 18:50
  • 2
    sudo apt-get install xfonts-base and sudo apt-get install xfonts-100dpi and sudo apt-get install xfonts-75dpi fixes font issues.
    – gies0r
    Dec 10, 2019 at 19:22

8 Answers 8

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
6
  • 14
    Didn't work for me, sadly.
    – empty
    Aug 9, 2017 at 18:29
  • 1
    Installing xfonts-base worked for me when setting up a new Ubuntu server in the Vultr cloud service. Thanks. Jul 30, 2019 at 22:47
  • Set DPI that its font is already existed in /usr/share/fonts/X11/
    – SAMPro
    Nov 1, 2020 at 13:43
  • Nothing here works.
    – Sephethus
    Dec 17, 2020 at 20:22
  • Still getting same message. Ubuntu 20.04 fresh server install
    – John Dee
    Jan 5, 2021 at 5:27
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.

2
  • 1
    This answer saved me! Thank's for saying what was mispelled (geometty): that remembered me that I insterted a comment in the geometry line of config: geometry 848x480 # good for mobile, what is not permitted there. But the error messages were about fonts! Hard to associate fonts with geometry! Feb 7, 2019 at 4:41
  • just foundout using neither -geometry=1920x1080 is wrong but using space instead of =. it's confusing because the GNU argument syntax is either using long full word with equal or using shorthand with space, not long full word with space. I missed it because the output complaints about fonts
    – izzulmakin
    Oct 9, 2022 at 14:37
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.

2
  • 1
    Running the vncserver command with the -fp option (I ran the above command except without the build-ins part at the end because I didn't have that directory) made the error go away for me. Thank you! Mar 2, 2021 at 4:08
  • Worked for me too, ty.
    – progonkpa
    Apr 30, 2021 at 18:57
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

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/.

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

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.
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .