diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-23 15:30:46 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-23 15:30:46 +0000 |
commit | 1d7e1ce138635b9cc21e697a2f75ee07d879b990 (patch) | |
tree | 51a595a4cf72f6fe9edaf540afb40c310ebe4391 | |
parent | 1f671787f42a1968196877a30997b9a46013c5aa (diff) | |
download | drakx-1d7e1ce138635b9cc21e697a2f75ee07d879b990.tar drakx-1d7e1ce138635b9cc21e697a2f75ee07d879b990.tar.gz drakx-1d7e1ce138635b9cc21e697a2f75ee07d879b990.tar.bz2 drakx-1d7e1ce138635b9cc21e697a2f75ee07d879b990.tar.xz drakx-1d7e1ce138635b9cc21e697a2f75ee07d879b990.zip |
use fuzzy_pidofs (to detect if kwin is running)
-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"); |