summaryrefslogtreecommitdiff
path: root/xts5
diff options
context:
space:
mode:
authorPeter Harris <pharris@opentext.com>2013-01-07 12:47:37 -0800
committerAaron Plattner <aplattner@nvidia.com>2013-02-19 12:34:51 -0800
commit18f20b839c3d4978a9d4b1e276afbbeaf7380102 (patch)
tree4fd6ee61edd63adeef0901258ae464888f849ccf /xts5
parent6f6c68fa46e0b137511ad1afa764f452b6cc863a (diff)
Set XT_DISPLAYHOST for remote connections
Xlib3/XOpenDisplay may segfault if XT_DISPLAY is set and XT_DISPLAYHOST is not. Signed-off-by: Peter Harris <pharris@opentext.com> Tested-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Diffstat (limited to 'xts5')
-rwxr-xr-xxts5/bin/xts-config.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/xts5/bin/xts-config.in b/xts5/bin/xts-config.in
index 9e30b5f5..e22ba56b 100755
--- a/xts5/bin/xts-config.in
+++ b/xts5/bin/xts-config.in
@@ -99,6 +99,14 @@ BEGIN
}
else
{
+ $::vars{"XT_TCP"} = "Yes";
+ my $hostname = "";
+ my $offset = rindex($::vars{"DISPLAY"}, ':');
+ if ($offset >= 0) {
+ $hostname = substr($::vars{"DISPLAY"}, 0, $offset);
+ }
+ $::vars{"XT_DISPLAYHOST"} = $hostname;
+
# 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"};