diff options
author | Peter Harris <pharris@opentext.com> | 2013-01-07 12:47:37 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2013-02-19 12:34:51 -0800 |
commit | 18f20b839c3d4978a9d4b1e276afbbeaf7380102 (patch) | |
tree | 4fd6ee61edd63adeef0901258ae464888f849ccf /xts5 | |
parent | 6f6c68fa46e0b137511ad1afa764f452b6cc863a (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-x | xts5/bin/xts-config.in | 8 |
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"}; |