summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r--perl-install/interactive.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 824bd795f..6691455db 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -43,11 +43,16 @@ sub vnew {
$su = $su eq "su";
require c;
if (c::Xtest($ENV{DISPLAY} ||= ":0")) {
- $su && $> && exec "kdesu", "-c", "$0 @ARGV";
+ if ($su && $>) {
+ $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
+ exec "kdesu", "-c", "$0 @ARGV";
+ }
require interactive_gtk;
interactive_gtk->new;
} else {
- $su && $> && die "you must be root to run this program";
+ if ($su && $>) {
+ die "you must be root to run this program";
+ }
require 'log.pm';
undef *log::l;
*log::l = sub {}; # otherwise, it will bother us :(