diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/Xconfigurator.pm | 38 | ||||
-rw-r--r-- | perl-install/Xconfigurator_consts.pm | 4 |
2 files changed, 17 insertions, 25 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 7ae39cb67..bed9bafef 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -1534,30 +1534,24 @@ Current configuration is: } if ($::isStandalone && $0 =~ /Xdrakres/) { - my $found; - foreach (@window_managers) { - if (`pidof "$_"` > 0) { - if ($in->ask_okcancel('', _("Please relog into %s to activate the changes", ucfirst $_), 1)) { - fork and $in->exit; - system("kwmcom logout") if /kwm/; - system("dcop kdesktop default logout") if /kwin/; - system("save-session --kill") if /gnome-session/; - system("killall -QUIT icewm") if /icewm/; - - open STDIN, "</dev/zero"; - open STDOUT, ">/dev/null"; - open STDERR, ">&STDERR"; - c::setsid(); - exec qw(perl -e), q{ - my $wm = shift; - for (my $nb = 30; $nb && `pidof "$wm"` > 0; $nb--) { sleep 1 } - system("killall X ; killall -15 xdm gdm kdm prefdm") unless `pidof "$wm"` > 0; - }, $_; - } - $found = 1; last; + if (my $wm = any::running_window_manager()) { + if ($in->ask_okcancel('', _("Please relog into %s to activate the changes", ucfirst (lc $wm)), 1)) { + fork and $in->exit; + any::ask_window_manager_to_logout($wm); + + open STDIN, "</dev/zero"; + open STDOUT, ">/dev/null"; + open STDERR, ">&STDERR"; + c::setsid(); + exec qw(perl -e), q{ + my $wm = shift; + for (my $nb = 30; $nb && `pidof "$wm"` > 0; $nb--) { sleep 1 } + system("killall X ; killall -15 xdm gdm kdm prefdm") unless `pidof "$wm"` > 0; + }, $wm; } + } else { + $in->ask_warn('', _("Please log out and then use Ctrl-Alt-BackSpace")); } - $in->ask_warn('', _("Please log out and then use Ctrl-Alt-BackSpace")) unless $found; } else { $in->set_help('configureXxdm') unless $::isStandalone; my $run = exists $o->{xdm} ? $o->{xdm} : $::auto || $in->ask_yesorno(_("X at startup"), diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm index 17ced34ea..e95f8551a 100644 --- a/perl-install/Xconfigurator_consts.pm +++ b/perl-install/Xconfigurator_consts.pm @@ -11,9 +11,7 @@ use common; ); @depths = ikeys(%depths); -@resolutions = qw(640x480 800x600 1024x768 1152x864 1280x1024 1400x1050 1600x1200 1920x1440 2048x1536); - -@window_managers = ('kdeinit: kwin', qw(gnome-session icewm wmaker kwm afterstep fvwm fvwm2 fvwm95 mwm twm enlightenment xfce blackbox sawfish)); +@resolutions = qw(640x480 800x600 1024x768 1152x864 1280x1024 1400x1050 1600x1200 1920x1440 2048x1536); %serversdriver = arch() =~ /^sparc/ ? ( 'Mach64' => "accel", |