vnc4server uses wrong font path

Bug #3593 reported by James Cole on 2005-10-26
94
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vnc4 (Ubuntu)
Medium
Kees Cook
Breezy
Low
Unassigned
Dapper
Medium
Kees Cook
Edgy
Medium
Unassigned
Feisty
Medium
Kees Cook

Bug Description

Xvnc4 (package vnc4server) appears to have a problem finding the default "fixed" font in Breezy.

<pre>
intangible@indiscernible:~$ Xvnc4 :1

Xvnc version 4.0 - built Apr 19 2005 04:26:49
Underlying X server release 40200000, The XFree86 Project, Inc

Wed Oct 26 07:20:59 2005
 vncext: VNC extension running!
 vncext: Listening for VNC connections on port 5901
 vncext: created VNC server for screen 0
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/CID/, removing from list!

Fatal server error:
could not open default font 'fixed'
</pre>

xorg.conf contains the updated font paths.

There is a work-around, you must launch Xvnc4 with the -fp option to point at the new font path in breezy: Xvnc4 :1 -fp /usr/share/X11/fonts/misc/

Changed in vnc4:
assignee: nobody → motu
Mark Warriner (warriner) wrote :

I am pretty sure this is the same problem I am having. I always use the /usr/bin/vnc4server wrapper to start the VNC server, which is usually linked to by /usr/bin/vncserver, depending alternatives configuration.

I'm not sure if these are the most elegant, but I found that this bug can be fixed in one of the following two ways:

1. Uncommenting and editing the following definition in /etc/vnc.conf --
$XFConfigPath = "/etc/X11/xorg.conf";

2. Editing the script /usr/bin/vnc4server and making the following change to add three lines --
 if (!$XFConfigPath) {
     if (-e "/etc/X11/XF86Config-4") {
         $XFConfigPath = "/etc/X11/XF86Config-4";
     }
     elsif (-e "/etc/X11/XF86Config") {
         $XFConfigPath = "/etc/X11/XF86Config";
     }
+ elsif (-e "/etc/X11/xorg.conf") {
+ $XFConfigPath = "/etc/X11/xorg.conf";
+ }
 }

stacktracer (stacktracer) wrote :

At least from what I can tell, the vnc4server script doesn't try to load the font path from XF86Config or xorg.conf. A yucky but effective (for me) workaround is to manually add your fontpath from xorg.conf to vnc4server -- look for the line:

$cmd .= " -fp /blah/blah/";

It's commented out by default -- uncomment it and replace "/blah/blah/" with your (comma-separated) fontpath from xorg.conf. You could also just pass the "-fp" stuff in on the command line every time you call vnc4server.

If there is a way to get it to load the fontpath from xorg.conf, please let me know. That always seemed like the right way to do it.

Alexandre Otto Strube (surak) wrote :

Mark, stacktracer, is this still an issue for you on latest updates?

Barry deFreese (bddebian) wrote :

vnc4 4.1.1+X4.3.0-10 was just synced from Debian unstable. Can you please verify that this bug is resolved? Thank you.

Changed in vnc4:
status: Unconfirmed → Fix Committed
sjester (gabrielsjoberg) wrote :

I'm still seeing this after updating to vnc4 4.1.1+X4.3.0-10.

Barry deFreese (bddebian) wrote :

I'm not sure why this isn't working. In the vncserver script in the source, the following occurs:

######## Adding configuration possibility ################
$Config_file = "/etc/vnc.conf";
&ReadConfigFile();
$Config_file = "$ENV{HOME}/.vncrc";
&ReadConfigFile();

if (!$XFConfigPath) {
  foreach ("/etc/X11/xorg.conf", "/etc/X11/XF86Config-4", "/etc/X11/XF86Config" ){
    $XFConfigPath = $_;
    last if ( -e $XFConfigPath );
  }
}

Mark Warriner (warriner) wrote :

I can confirm this fixed in latest dapper vnc4server_4.1.1+X4.3.0-10_i386.deb.

The script now explicitly checks for xorg.conf.

Barry deFreese (bddebian) wrote :

Fixed in Dapper. Thank you.

Changed in vnc4:
status: Fix Committed → Fix Released
Jewel (ejewel) wrote :

This is happening again in edgy. I've tried setting XFConfigPath in /etc/vnc.conf to /etc/X11/xorg.conf as well as running Xvnc4 :1 -fp /usr/share/X11/fonts/misc/.

Changed in vnc4:
status: Fix Released → Unconfirmed
Jewel (ejewel) wrote :

Update: It does work if you start it like this:

Xvnc4 -fp /usr/share/fonts/X11/misc/ :1

Notice the slight difference in the path from what I tried earlier.

I found this path by running `xset q`. You can manually edit /usr/bin/vnc4server to add the font path from xset but I don't see anything in there about $XFConfigPath or /etc/vnc.conf. I don't have a dapper box handy to see if that code went missing or if it was only in the vncserver script.

MrFaber (mr-faber-gmx) wrote :

@Jewel
Thanks, it works fine with your fix but shouldn't it be posted for edgy too? Otherwise the bug could make it into the final.

Rocco Stanzione (trappist) wrote :

Xvnc4 still behaves this way in Edgy.

Changed in vnc4:
status: Unconfirmed → Confirmed

I confirm this is still not solved in edgy, whether with vncserver or vnc4server.
But the -fp /path/to/font fix works fine, thanks.

Alessandro Morgantini (gpz500) wrote :

I confirm this problem on edgy also. I don't know if this is the right place to do this. If it isn't, please, correct me!

Changed in vnc4:
status: Unconfirmed → Confirmed
Matthew Caron (matt-mattcaron) wrote :

Confirmed on edgy. Additionally, Bug #34218 appears to be a duplicate of this.

DavidC73 (david-conversi) wrote :

i've just found the same problem on Edgy PPC

Patrick J. LoPresti (lopresti) wrote :

This is definitely broken again in Edgy. Plus the old Dapper workaround (-fp ...) broke because the fonts moved from /usr/share/X11/fonts to /usr/share/fonts/X11.

Just repeating what has already been said, adding my voice to the chorus. Would be nice to see this fixed in the underlying Xvnc4 program.

Alessandro Morgantini (gpz500) wrote :

On Edgy I have solved with a symbolic link from /usr/share/X11/fonts to /usr/share/fonts/X11.
I think this workaround is better than the '-fp' one, because in the '-fp' manner Xvnc knows only about 'misc' sub-directory, and not about the others (100dpi, 75dpi, Type1 etc.).

However, me too I think the right way is solve this in the upstream Xvnc program.

steveh (sheitman) wrote :

On Edgy, I solved the problem by adding the -fp parameter to the /etc/vnc/config file as follows:

sudo gedit /etc/vnc/config

opens config file for r/w:
# Default vncserver configuration. See the vncserver man page for details.

-PasswordFile $HOME/.vnc/passwd # Location of VncAuth password
-desktop "$HOSTNAME:$DISPLAYNUM ($USER)" # Desktop name
-pn # Continue even if standard ports fail
-httpd <inline> # Serve Java viewer inline

#######################################
# Add correct X11 fonts path spec. Because vncserver does not
# recognize -fp, it passes it to Xvnc, which vncserver invokes (see man
# vncserver). Hence, this is equivalent to specifying
# Xvnc :1 -fp /usr/share...

-fp /usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,/usr/share/fonts/X11/misc
########################################

Magnus Hedemark (viridari) wrote :

Running edgy on sparc arch with latest updates as of the time of this report.

This is definitely still broken. Part of this is broken in /etc/vnc.conf. Part of this is that /etc/X11/xorg.conf is broken out of the box (font paths in edgy's xorg.conf don't exist!)

Kees Cook (kees) on 2007-01-07
Changed in vnc4:
status: Unconfirmed → Confirmed
Paulo Tanimoto (tanimoto) wrote :

Error persists here, AMD64 platform. As pointed above, fix should be simple. In my case, editing /etc/vnc/vnc.conf did not work simply because I didn't have that file. Also, it was ignoring /etc/vnc.conf.

But the soft link worked. Just to make sure everybody understands, what you need to do is this:
$ sudo ln -s /usr/share/fonts/X11 /usr/share/X11/fonts

Let us know if any more help is needed. A fix for this would be very sweet, since so many of us depend on VNC.

Kees Cook (kees) on 2007-03-13
Changed in vnc4:
importance: Medium → Low
assignee: motu → keescook
status: Confirmed → Fix Released
assignee: nobody → keescook
status: Unconfirmed → Fix Released
status: Confirmed → Fix Committed
importance: Undecided → Medium
Kees Cook (kees) wrote :

Fixed in Feisty and Dapper. Still open for Breezy (which goes EOL in April) and Edgy. If bug 78282 can be solved for Edgy, the fix for this bug will be included in the security update.

Attached is the diff to apply to the rules that fixes the problem (as done in Feisty).

Changed in vnc4:
importance: Undecided → Medium
Aaron Peromsik (aperomsik) wrote :

Kees, are you saying that this fix won't go out until a fix for 78282 is found? Comment 17 on that bug makes it sound like they are one and the same.

Kees Cook (kees) wrote :

Since there is a work-around for 3593, it's less critical. Based on the evidence in 78282, it's not the same bug: the vnc server blows up with other strange errors (after the font path has been fixed). You can see this because the font path is fixed in feisty, but 78282 persists there. :(

However, I had a few hours this afternoon to look into the cause of 78282, and hopefully I'll be able to figure it out and get something put together unless someone else more familiar with the packaging beats me to it. :)

doobydave (dooby-dave) wrote :

Tried the fix (on Edgy)
$ sudo ln -s /usr/share/fonts/X11 /usr/share/X11/fonts

but it only worked until reboot. I now get :-

VNC viewer version 3.3.7 - built Jul 4 2006 10:04:48
Copyright (C) 2002-2003 RealVNC Ltd.
Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
See http://www.realvnc.com for information on VNC.
VNC server supports protocol version 3.8 (viewer 3.3)
Password:
ReadFromRFBServer: rdr::EndOfStream

Marco Rodrigues (gothicx) wrote :

Breezy support is over.. Today it's Breezy End Of Life!

Changed in vnc4:
status: Confirmed → Rejected
Risto H. Kurppa (risto.kurppa) wrote :

gutsy & vncserver 3.3.7-14ubuntu1

When I start the server, it looks like it's ok:

rhk@slabanderi:~$ vncserver -geometry 800x600 -depth 16 :4
New 'X' desktop is slabanderi:4
Starting applications specified in /etc/X11/Xsession
Log file is /home/rhk/.vnc/slabanderi:4.log
rhk@slabanderi:~$

but it writes this in the logfile

12/12/07 23:27:11 Xvnc version 3.3.7 - built May 24 2007 12:47:11
12/12/07 23:27:11 Copyright (C) 2002-2003 RealVNC Ltd.
12/12/07 23:27:11 Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
12/12/07 23:27:11 All Rights Reserved.
12/12/07 23:27:11 See http://www.realvnc.com for information on VNC
12/12/07 23:27:11 Desktop name 'X' (slabanderi:4)
12/12/07 23:27:11 Protocol version supported 3.3
12/12/07 23:27:11 Listening for VNC connections on TCP port 5904

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

and as soon as I try to connect to server, it prints this in the console (on the server side):
channel 2: open failed: connect failed: Connection refused

I also tried the -fp /usr/share/X11/fonts/misc/ and now the log file prints:
12/12/07 23:33:25 Listening for VNC connections on TCP port 5904
failed to set default font path ''
Fatal server error:
could not open default font 'fixed'

This seems to help (at least until reboot): sudo ln -s /usr/share/fonts/X11 /usr/share/X11/fonts

So this bug still seems to exist in Gutsy..

Hew (hew) wrote :

Ubuntu Edgy Eft is no longer supported, so a SRU will not be issued for this release. Marking Edgy as Won't Fix.

Changed in vnc4:
status: Fix Committed → Won't Fix
Quigi (brechbuehler) wrote :

This is still broken in Hardy Heron.

We recently upgraded to Hardy Heron (=8.04 LTS), and now vncserver dies, logging "Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'". This is NOT about font path in vnc4sever (as the title states), but the symptom was reported by Roman Wartel in Bug #34218, which Matthew Caron considers a duplicate of this bug.

dkg wrote on 2006-05-11: This was fixed in debian's sources in version 3.3.7-12.
Hardy Heron provides vncserver 3.3.7-8ubuntu2.

Hew (hew) wrote :

vncserver was removed during hardy development, so it is not present in the release version. The reason was "dead upstream, superseded by vnc4".

On Fri, Apr 3, 2009 at 8:46 PM, Hew McLachlan <email address hidden>wrote:

> vncserver was removed during hardy development, so it is not present in
> the release version. The reason was "dead upstream, superseded by vnc4".

Thanks for getting back to me.
Oddly, synaptic on hardy still shows vnc and vnc4 packages. So vncserver
must still be in the repository? Neither is marked as supported.
Well, I'll go with vnc4server, which is not affected by the RGB_DB bug.

Thanks again.
/Christian

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers