diff options
Diffstat (limited to 'src/MTools.pm')
-rw-r--r-- | src/MTools.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/MTools.pm b/src/MTools.pm index aa8d94e..043975d 100644 --- a/src/MTools.pm +++ b/src/MTools.pm @@ -120,7 +120,13 @@ sub new { if (!defined $Zinc) { - $screen = ":0.0" if (!defined $screen); + if (!defined $screen) { + if (defined $ENV{DISPLAY}) { + $screen = $ENV{DISPLAY}; + } else { + $screen = ":0.0"; + } + } $self -> {window} = my $mw = MainWindow -> new ('-screen' => $screen); $mw -> title($title); |