diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 10 | ||||
-rw-r--r-- | perl-install/interactive.pm | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 44d23a204..9d7da9d37 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -1104,12 +1104,10 @@ connections from many clients. Note: if your machine is only a client on the Int } sub running_window_manager { - my @window_managers = ( - 'kdeinit: kwin', - qw(gnome-session icewm wmaker afterstep fvwm fvwm2 fvwm95 mwm twm enlightenment xfce blackbox sawfish olvwm), - ); + my @window_managers = qw(kwin gnome-session icewm wmaker afterstep fvwm fvwm2 fvwm95 mwm twm enlightenment xfce blackbox sawfish olvwm); + foreach (@window_managers) { - return $_ if `/sbin/pidof "$_"` > 0; + return $_ if fuzzy_pidofs(qr/\b$_\b/); } ''; } @@ -1118,7 +1116,7 @@ sub ask_window_manager_to_logout { my ($wm) = @_; my %h = ( - 'kdeinit: kwin' => "su $ENV{USER} -c 'dcop kdesktop default logout'", + 'kwin' => "su $ENV{USER} -c 'dcop kdesktop default logout'", 'gnome-session' => "save-session --kill", 'icewm' => "killall -QUIT icewm", 'wmaker' => "killall -USR1 wmaker", diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index e217ecefb..ebbd14fc9 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -83,7 +83,7 @@ sub vnew { } if ($ENV{DISPLAY} && system('/usr/X11R6/bin/xtest') == 0) { if ($su && $>) { - if (`/sbin/pidof "kdeinit: kwin"` > 0) { + if (fuzzy_pidofs(qr/\bkwin\b/) > 0) { exec("kdesu", "-c", "$0 @ARGV") or die _("kdesu missing"); } else { exec {'consolehelper'} $0, @ARGV or die _("consolehelper missing"); |