diff options
author | damien <damien@mandriva.com> | 2000-08-02 15:55:47 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2000-08-02 15:55:47 +0000 |
commit | 2eb1eecaea0fffaf4f122b13ddff3e843c4961f4 (patch) | |
tree | 480d0068b008dcede8de586b502e67866f1c77f3 /perl-install | |
parent | 58e106806e49ed660fcb1e0d3075fa6f951faedf (diff) | |
download | drakx-2eb1eecaea0fffaf4f122b13ddff3e843c4961f4.tar drakx-2eb1eecaea0fffaf4f122b13ddff3e843c4961f4.tar.gz drakx-2eb1eecaea0fffaf4f122b13ddff3e843c4961f4.tar.bz2 drakx-2eb1eecaea0fffaf4f122b13ddff3e843c4961f4.tar.xz drakx-2eb1eecaea0fffaf4f122b13ddff3e843c4961f4.zip |
worked on autologin in Xconfigurator.pm. It's now functionall.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/ChangeLog | 6 | ||||
-rw-r--r-- | perl-install/Xconfigurator.pm | 48 |
2 files changed, 43 insertions, 11 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index e40bda0db..3cbfc1ac2 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,9 @@ +2000-08-02 dam's <damien@mandrakesoft.com> + + * Xconfigurator.pm : autologin is functionall. When wmsession.d is + more up to date, I'll add the list of wm to launch at boot. It + writes in /etc/X11/xdm/xdm-config. + 2000-08-01 Pixel <pixel@mandrakesoft.com> * install2.pm (miscellaneous): modify as chmouel want (aka, "" diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index e02666450..08eabf1d4 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -242,7 +242,7 @@ Do You want to use XFree 3.3 instead of XFree 4.0?"), 1) and $card->{driver} = ' #- 3D acceleration configuration for XFree 4.0 using DRI, this is enabled by default #- but for some there is a need to specify VideoRam (else it won't run). - if (card->{DRI_glx}) { + if ($card->{DRI_glx}) { ($card->{flags}{needVideoRam}, $card->{memory}) = ('fakeVideoRam', 32768) if $card->{identifier} =~ /MGA G[24]00/; ($card->{flags}{needVideoRam}, $card->{memory}) = ('fakeVideoRam', 10000) if $card->{type} =~ /Intel 810/; } @@ -1094,15 +1094,41 @@ Would you like X to start when you reboot?"), 1); my %l; @l{@etc_pass_fields} = split ':'; $l{uid} > 500, $l{name}; } cat_("$o->{prefix}/etc/passwd"); - - exists $o->{miscellaneous}{autologuser} || $::auto || !@users or - $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) && $in->ask_from_entries_refH(_("Autologin"), - _("Autologin - Choose default user"), - [ _("Choose the default user :") => {val => \$o->{miscellaneous}{autologuser}, list => \@users, not_edit => 1} ], - ); - } - run_program::rooted($prefix, "chkconfig", "--del", "gpm") if $o->{mouse}{device} =~ /ttyS/ && !$::isStandalone; + if (!(exists $o->{miscellaneous}{autologuser} || $::auto || !@users || exists $o->{authentication}{NIS} )) + { + if($in->ask_from_entries_refH(_("Autologin"), + _("I can set up your computer to automatically log on one user. +If you don't want to use this feature, click on the cancel button."), +[ _("Choose the default user :") => {val => \$o->{miscellaneous}{autologuser}, list => \@users, not_edit => 1} ], )) { + my (@lines, $autoString, $autoUser); + open (F, "$prefix/etc/X11/xdm/xdm_config"); + foreach (<F>) { + /DisplayManager._0.autoUser/ and $autoUser=1; + /DisplayManager._0.autoString/ and $autoString=1; + } + close F; + if ( $autoUser) { + substInFile { + s/^(DisplayManager._0.autoUser):.*/$1:\t$o->{miscellaneous}{autologuser}/; + } "$prefix/etc/X11/xdm/xdm_config" + } else { + open F, ">>$prefix/etc/X11/xdm/xdm_config" or die "Can't append $prefix/etc/X11/xdm/xdm_config !"; + print F "\nDisplayManager._0.autoUser:\t$o->{miscellaneous}{autologuser}"; + close F; + } + if ( $autoString) { + substInFile { + s/^(DisplayManager._0.autoString):.*/$1:\tkde\n/; # Change it when /etc/wmsession.d is complete. + } "$prefix/etc/X11/xdm/xdm_config" + } else { + open F, ">>$prefix/etc/X11/xdm/xdm_config" or die "Can't append $prefix/etc/X11/xdm/xdm_config !"; + print F "\nDisplayManager._0.autoString:\tkde\n"; + close F; + } + # (dam's) : a patch for gdm is being done. + } + } + } + run_program::rooted($prefix, "chkconfig", "--del", "gpm") if $o->{mouse}{device} =~ /ttyS/ && !$::isStandalone; } } |