summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-04 06:35:07 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-04 06:35:07 +0000
commit97495087142b69b51c6e4d5364656ffe888d87cb (patch)
treeea6f4aedbfbea9bba97699afcd8d00de85692794 /perl-install
parent223f8c9776f91b3fd14e9055b89a2c02c543f05c (diff)
downloaddrakx-97495087142b69b51c6e4d5364656ffe888d87cb.tar
drakx-97495087142b69b51c6e4d5364656ffe888d87cb.tar.gz
drakx-97495087142b69b51c6e4d5364656ffe888d87cb.tar.bz2
drakx-97495087142b69b51c6e4d5364656ffe888d87cb.tar.xz
drakx-97495087142b69b51c6e4d5364656ffe888d87cb.zip
don't set /etc/sysconfig/desktop anymore, configure ~/.wmrc, ~/.gnome2/gdm and ~/.desktop instead
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm33
1 files changed, 25 insertions, 8 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index ddd6379a7..736c58a5e 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -411,7 +411,7 @@ sub get_autologin() {
}
sub set_autologin {
- my ($user, $desktop) = @_;
+ my ($user, $wm) = @_;
my $autologin = bool2text($user);
#- Configure KDM / MDKKDM
@@ -426,19 +426,36 @@ sub set_autologin {
AutomaticLogin => $user,
)) };
- if ($user) {
- my %l = getVarsFromSh("$::prefix/etc/sysconfig/desktop");
- $l{DESKTOP} = $desktop;
- setVarsInSh("$::prefix/etc/sysconfig/desktop", \%l);
- log::l("cat $::prefix/etc/sysconfig/desktop ($desktop):\n", cat_("$::prefix/etc/sysconfig/desktop"));
- }
my $xdm_autologin_cfg = "$::prefix/etc/sysconfig/autologin";
- if (member($desktop, 'KDE', 'GNOME')) {
+ if (member($wm, 'KDE', 'GNOME')) {
unlink $xdm_autologin_cfg;
} else {
setVarsInShMode($xdm_autologin_cfg, 0644,
{ USER => $user, AUTOLOGIN => bool2yesno($user), EXEC => '/usr/X11R6/bin/startx.autologin' });
}
+
+ if ($user) {
+ my $home = (getpwnam($user))[7];
+ set_window_manager($home, $wm);
+ }
+}
+sub set_window_manager {
+ my ($home, $wm) = @_;
+ my $p_home = "$::prefix$home";
+
+ #- for KDM
+ output("$p_home/.wmrc", "$wm\n");
+
+ #- for GDM
+ mkdir_p("$p_home/.gnome2");
+ update_gnomekderc("$p_home/.gnome2/gdm", 'session', last => $wm);
+
+ #- for startx
+ {
+ my %l = getVarsFromSh("$p_home/.desktop");
+ $l{DESKTOP} = $wm;
+ setVarsInSh("$p_home/.desktop", \%l);
+ }
}
sub rotate_log {