4 DESCRIPTION="Setting up automatic login..."
6 . /scripts/casper-functions
21 log_begin_msg "$DESCRIPTION"
23 if chroot /root [ -f /etc/gdm/gdm-cdd.conf ]; then
24 GDMCONF=/etc/gdm/gdm-cdd.conf
26 GDMCONF=/etc/gdm/gdm.conf
29 if chroot /root [ -f ${GDMCONF} ]; then
30 # Configure GDM autologin
32 -e "s/^AutomaticLoginEnable=.*\$/AutomaticLoginEnable=true/" \
33 -e "s/^AutomaticLogin=.*\$/AutomaticLogin=$USERNAME/" \
34 -e "s/^TimedLoginEnable=.*\$/TimedLoginEnable=true/" \
35 -e "s/^TimedLogin=.*\$/TimedLogin=$USERNAME/" \
36 -e "s/^TimedLoginDelay=.*\$/TimedLoginDelay=10/" \
40 if [ -f /root/etc/kde3/kdm/kdmrc ]; then
41 # Configure KDM autologin
43 -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \
44 -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \
45 -e "s/^#?AutoReLogin=.*\$/AutoReLogin=true/" \
46 /root/etc/kde3/kdm/kdmrc
49 if chroot /root /usr/bin/which kpersonalizer >/dev/null; then
50 # Disable first-login wizard for KDE
51 if [ ! -f /root/etc/kde3/kpersonalizerrc ]; then
52 cat > /root/etc/kde3/kpersonalizerrc <<EOF
57 echo "I'm not smart enough to disable kpersonalizer startup" >&2
58 echo "Because kpersonalizerrc already exists" >&2