summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Harris <pharris@opentext.com>2012-08-03 12:43:29 -0400
committerPeter Harris <pharris@opentext.com>2012-08-15 14:33:37 -0400
commit4107983a76629aae28ad46adcbdef3636c515754 (patch)
tree4aeb2aa27d5e924d23d757a27a6a79173bd90547
parentc3a401f84ce701e310efb9de6ab5c031451e01f3 (diff)
Don't add local paths when the server is remote
XT_FONTPATH has to be a valid font path. Also trim at least one remote path from XT_FONTPATH_GOOD, so it isn't the same as XT_FONTPATH. Signed-off-by: Peter Harris <pharris@opentext.com>
-rwxr-xr-xxts5/bin/xts-config.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/xts5/bin/xts-config.in b/xts5/bin/xts-config.in
index 3d10c133..9e30b5f5 100755
--- a/xts5/bin/xts-config.in
+++ b/xts5/bin/xts-config.in
@@ -97,6 +97,24 @@ BEGIN
$::vars{"XT_DISPLAYHOST"} = "";
}
}
+ else
+ {
+ # Not a local display; admin is responsible for placing
+ # xtest fonts on the font path before running xts-config.
+ $::vars{"XT_FONTPATH"} = $::vars{"XT_FONTPATH_GOOD"};
+ my @fp = split(/,/, $::vars{"XT_FONTPATH"});
+
+ # Remove xtest directory
+ my @fpg = grep(!/xtest/i, @fp);
+
+ # If xtest directory is not called "xtest", remove the
+ # last directory in the path (as it's less likely to
+ # be the path containing "default"/"cursor" than the
+ # first directory in the path).
+ pop @fpg if (scalar(@fp) == scalar(@fpg));
+
+ $::vars{"XT_FONTPATH_GOOD"} = join(',', @fpg);
+ }
if($::vars{"XT_SCREEN_COUNT"} > 1)
{