summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 736c58a5e..5017ac753 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -443,14 +443,11 @@ sub set_window_manager {
my ($home, $wm) = @_;
my $p_home = "$::prefix$home";
- #- for KDM
- output("$p_home/.wmrc", "$wm\n");
+ #- for KDM/GDM
+ my $wm_number = sessions_with_order()->{$wm} || '';
+ update_gnomekderc("$p_home/.dmrc", 'Desktop', Session => "$wm_number$wm");
- #- for GDM
- mkdir_p("$p_home/.gnome2");
- update_gnomekderc("$p_home/.gnome2/gdm", 'session', last => $wm);
-
- #- for startx
+ #- for startx/autologin
{
my %l = getVarsFromSh("$p_home/.desktop");
$l{DESKTOP} = $wm;
@@ -591,6 +588,10 @@ sub ask_users {
sub sessions() {
split(' ', run_program::rooted_get_stdout($::prefix, '/usr/sbin/chksession', '-l'));
}
+sub sessions_with_order() {
+ my %h = map { /(.*)=(.*)/ } split(' ', run_program::rooted_get_stdout($::prefix, '/usr/sbin/chksession', '-L'));
+ \%h;
+}
sub autologin {
my ($o, $in) = @_;