From: DRC Date: Thu, 26 Mar 2009 19:16:19 +0000 (+0000) Subject: Add -fp argument to allow user to override font path selection X-Git-Tag: v0.0.90~60 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eed5d1f7f11628f8656320adae8f3c38b45ee74f;p=tigervnc.git Add -fp argument to allow user to override font path selection git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3729 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/unix/vncserver b/unix/vncserver index 8f36d796..405d0923 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -113,7 +113,7 @@ $defFontPath = "unix/:7100"; # 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'}); @@ -133,6 +133,9 @@ if ($opt{'-depth'}) { if ($opt{'-pixelformat'}) { $pixelformat = $opt{'-pixelformat'}; } +if ($opt{'-fp'}) { + $fontPath = $opt{'-fp'}; +} &CheckGeometryAndDepth(); @@ -229,7 +232,8 @@ system("$cmd & echo \$! >$pidFile"); 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); @@ -493,6 +497,7 @@ sub Usage die("\nusage: $prog [:] [-name ] [-depth ]\n". " [-geometry x]\n". " [-pixelformat rgbNNN|bgrNNN]\n". + " [-fp ]\n". " ...\n\n". " $prog -kill \n\n"); } diff --git a/unix/vncserver.man b/unix/vncserver.man index f3e86a3f..1c283a7c 100644 --- a/unix/vncserver.man +++ b/unix/vncserver.man @@ -12,6 +12,8 @@ vncserver \- start or stop a VNC server .IR depth ] .RB [ \-pixelformat .IR format ] +.RB [ \-fp +.IR font-path ] .RI [ Xvnc-options... ] .br .BI "vncserver \-kill :" display# @@ -87,6 +89,27 @@ option ignores anything preceding the first colon (":") in the 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