From fb52762393df431f65204a37bf3dac6504839324 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Tue, 19 Jan 2010 11:25:57 +0000 Subject: [PATCH] [Bugfix] Remove xfs support, because it doesn't work and isn't needed (dcommander). git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1_0@3949 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- unix/vncserver | 66 ++++++++++++++++---------------------------------- 1 file changed, 21 insertions(+), 45 deletions(-) diff --git a/unix/vncserver b/unix/vncserver index 28764cbe..6ec58668 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -82,13 +82,6 @@ $defaultXStartup chop($host = `uname -n`); -if (CheckXFS(1)) { - $fontPath = "unix/:7100"; -} else { - if (CheckXFS(0)) { - $fontPath = "inet/:7100"; # Some Solaris systems require this - } -} if (-d "/etc/X11/fontpath.d") { $fontPath = "catalogue:/etc/X11/fontpath.d"; } @@ -114,12 +107,17 @@ foreach $_fpath (@fontpaths) { } } } + if ($defFontPath) { if (substr($defFontPath, -1, 1) == ',') { chop $defFontPath; } } +if ($fontPath eq "") { + $fontPath = $defFontPath; +} + # Check command line options &ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1, @@ -250,22 +248,23 @@ system("$cmd & echo \$! >$pidFile"); # Give Xvnc a chance to start up sleep(3); -unless (kill 0, `cat $pidFile`) { - if ($fpArgSpecified) { - warn "\nWARNING: The first attempt to start Xvnc failed, probably because the font\n"; - warn "path you specified using the -fp argument is incorrect. Attempting to\n"; - warn "determine an appropriate font path for this system and restart Xvnc using\n"; - warn "that font path ...\n"; - } else { - warn "\nWARNING: The first attempt to start Xvnc failed, possibly because the X Font\n"; - warn "Server is not running and this system does not use a font catalog. Attempting\n"; - warn "to determine an appropriate font path for this system and restart Xvnc using\n"; - warn "that font path ...\n"; +if ($fontPath ne $defFontPath) { + unless (kill 0, `cat $pidFile`) { + if ($fpArgSpecified) { + warn "\nWARNING: The first attempt to start Xvnc failed, probably because the font\n"; + warn "path you specified using the -fp argument is incorrect. Attempting to\n"; + warn "determine an appropriate font path for this system and restart Xvnc using\n"; + warn "that font path ...\n"; + } else { + warn "\nWARNING: The first attempt to start Xvnc failed, possibly because the font\n"; + warn "catalog is not properly configured. Attempting to determine an appropriate\n"; + warn "font path for this system and restart Xvnc using that font path ...\n"; + } + $cmd =~ s@-fp [^ ]+@@; + $cmd .= " -fp $defFontPath" if ($defFontPath); + system("$cmd & echo \$! >$pidFile"); + sleep(3); } - $cmd =~ s@-fp [^ ]+@@; - $cmd .= " -fp $defFontPath" if ($defFontPath); - system("$cmd & echo \$! >$pidFile"); - sleep(3); } unless (kill 0, `cat $pidFile`) { warn "Could not start Xvnc.\n\n"; @@ -410,29 +409,6 @@ sub CheckDisplayNumber } -# -# CheckXFS checks if the X Font Server is running on the default port (7100) -# - -sub CheckXFS -{ - if ($_[0] == 1) { - if (-e "/tmp/.font-unix/fs7100") { - return 1; - } - } else { - socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n"; - eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))'; - if (!bind(S, pack('S n x12', $AF_INET, 7100))) { - close(S); - return 1; - } - } - close(S); - return 0; -} - - # # GetXDisplayDefaults uses xdpyinfo to find out the geometry, depth and pixel # format of the current X display being used. If successful, it sets the -- 2.39.5