diff options
author | damien <damien@mandriva.com> | 2000-07-19 16:38:58 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2000-07-19 16:38:58 +0000 |
commit | c4f585e00b19bd5e07208572e10ea005a3e47996 (patch) | |
tree | b6a1289d010b0ac49a353368e4f6de0c12c33264 /perl-install/Xconfigurator.pm | |
parent | 0d15d7fceccfef8ac44cb50e00fbbc8c722df053 (diff) | |
download | drakx-backup-do-not-use-c4f585e00b19bd5e07208572e10ea005a3e47996.tar drakx-backup-do-not-use-c4f585e00b19bd5e07208572e10ea005a3e47996.tar.gz drakx-backup-do-not-use-c4f585e00b19bd5e07208572e10ea005a3e47996.tar.bz2 drakx-backup-do-not-use-c4f585e00b19bd5e07208572e10ea005a3e47996.tar.xz drakx-backup-do-not-use-c4f585e00b19bd5e07208572e10ea005a3e47996.zip |
added autologin boxes.
Diffstat (limited to 'perl-install/Xconfigurator.pm')
-rw-r--r-- | perl-install/Xconfigurator.pm | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index c69a3c477..e249c39e5 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -1018,9 +1018,37 @@ sub main { my $run = exists $o->{xdm} ? $o->{xdm} : $::auto || $in->ask_yesorno(_("X at startup"), _("I can set up your computer to automatically start X upon booting. Would you like X to start when you reboot?"), 1); - rewriteInittab($run ? 5 : 3) unless $::testing; - } + + $in->set_help('configureXautologin') unless $::isStandalone; + if ($o->{miscellaneous}{autologin} || $::auto || $in->ask_yesorno(_("Autologin at startup"), + _("I can set up your computer to automatically log on one user. +Would you like to use this feature?"), 1)) + { + $o->{miscellaneous}{autologin}=1; + my @users; + my @etc_pass_fields = qw(name pw uid gid realname home shell); + my @lines = cat_(my $f = "$o->{prefix}/etc/passwd") or log::l("missing passwd file"), return; + foreach (@lines) { + my %l; @l{@etc_pass_fields} = split ':'; + if ($l{"uid"} > 500) { + push @users, $l{"name"}; + } + } + if ( $in->ask_from_entries_refH( + [ _("Autologin"), _("Ok"), _("Cancel") ], + _("Autologin - Choose default user\n"), + [ _("Choose the default user :") => {val => \$o->{miscellaneous}{autologuser}, list => \@users, not_edit => 1} ], + complete => sub { + $o->{miscellaneous}{autologuser} or $in->ask_warn('', _("Please choose a user in the list")), return (1,0); + return 0; + } + )) + { + $o->{miscellaneous}{autologin}=1; + } + else { $o->{miscellaneous}{autologin}=0; } + } run_program::rooted($prefix, "chkconfig", "--del", "gpm") if $o->{mouse}{device} =~ /ttyS/ && !$::isStandalone; } } |