Permalink
Browse files

Only set the display environment if not already set.

  • Loading branch information...
1 parent e8b3e7e commit a5e735c927961c39de4a3bf7ddd65691236e773f @pjf pjf committed Apr 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 launch.pl
View
@@ -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";

0 comments on commit a5e735c

Please sign in to comment.