summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index d8072df85..c692bd175 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -276,7 +276,11 @@ sub require_root_capability() {
sub check_for_xserver() {
if (!defined $::xtest) {
- $::xtest = $ENV{DISPLAY} && system('/usr/X11R6/bin/xtest') == 0;
+ $::xtest = 0;
+ eval {
+ require xf86misc::main;
+ $::xtest = xf86misc::main::xtest($ENV{DISPLAY});
+ } if $ENV{DISPLAY};
}
return $::xtest;
}