From a5e735c927961c39de4a3bf7ddd65691236e773f Mon Sep 17 00:00:00 2001 From: Paul Fenwick Date: Sun, 15 Apr 2012 19:46:16 +1000 Subject: [PATCH] Only set the display environment if not already set. --- launch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch.pl b/launch.pl index e920924..661a693 100755 --- a/launch.pl +++ b/launch.pl @@ -120,7 +120,7 @@ sub launch { # Launch an editor to edit file f, labeling the window with title t. sub editor { my($f, $t) = @_; - $ENV{DISPLAY} = ":0.0"; # have to set this explicitly if invoked by cron. + $ENV{DISPLAY} ||= ":0.0"; # have to set this explicitly if invoked by cron. if(!defined($EDIT_COMMAND)) { $cmd = "$XT -T '$t' -fg white -bg red -cr MidnightBlue -bc -rw -e $ED $f"; system($cmd) == 0 or print "SYSERR: $cmd\n";