# Check command line options
&ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1,
- "-help",0,"-h",0,"--help",0);
+ "-help",0,"-h",0,"--help",0,"-fp",1);
&Usage() if ($opt{'-help'} || $opt{'-h'} || $opt{'--help'});
if ($opt{'-pixelformat'}) {
$pixelformat = $opt{'-pixelformat'};
}
+if ($opt{'-fp'}) {
+ $fontPath = $opt{'-fp'};
+}
&CheckGeometryAndDepth();
sleep(3);
unless (kill 0, `cat $pidFile`) {
warn "\nWARNING: The first attempt to start Xvnc failed, possibly because the vncserver\n";
- warn "script was not able to figure out an appropriate X11 font path for this system.\n";
+ warn "script was not able to figure out an appropriate X11 font path for this system\n";
+ warn "or because the font path you specified with the -fp argument was not valid.\n";
warn "Attempting to restart Xvnc using the X Font Server (xfs) ...\n";
$cmd =~ s@-fp [^ ]+@@;
$cmd .= " -fp $defFontPath" if ($defFontPath);
die("\nusage: $prog [:<number>] [-name <desktop-name>] [-depth <depth>]\n".
" [-geometry <width>x<height>]\n".
" [-pixelformat rgbNNN|bgrNNN]\n".
+ " [-fp <font-path>]\n".
" <Xvnc-options>...\n\n".
" $prog -kill <X-display>\n\n");
}
.IR depth ]
.RB [ \-pixelformat
.IR format ]
+.RB [ \-fp
+.IR font-path ]
.RI [ Xvnc-options... ]
.br
.BI "vncserver \-kill :" display#
argument. Thus, you can invoke "vncserver \-kill $DISPLAY", for example at the
end of your xstartup file after a particular application exits.
+.TP
+.B \-fp \fIfont-path\fP
+The vncserver script will normally examine your system to figure out where it
+stores its X11 fonts and then generate an appropriate font path argument for
+Xvnc based on this. If your system stores its X11 fonts in a location that
+vncserver does not know about, however, then this may fail. In that case,
+vncserver will then try to contact the local X Font Server (xfs) on port 7100.
+Not all systems have xfs installed and running, so this may fail as well. In
+that case, you can manually specify a font path by using the
+.B \-fp
+argument to vncserver.
+
+If you prefer to use the X Font Server by default rather than a static font
+path, then you can run
+
+.RS
+.RS
+vncserver -fp unix/:7100
+.RE
+.RE
+
.SH FILES
Several VNC-related files are found in the directory $HOME/.vnc:
.TP