Skip to content

Commit

Permalink
Merge pull request #12 from pfenwick/master
Browse files Browse the repository at this point in the history
Only set $ENV{DISPLAY} if not already set.
  • Loading branch information
dreeves committed Apr 19, 2012
2 parents d31f067 + a5e735c commit faf0727
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion launch.pl
Expand Up @@ -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";
Expand Down

0 comments on commit faf0727

Please sign in to comment.