4 _set_gdm_auto_login() {
7 if [ ! -e $gdm_conf ]; then
8 echo "I: No config file $gdm_conf GNOME $gnome_ver found"
9 elif [ -z "$(grep 'AutomaticLogin=brain' $gdm_conf)" ]; then
10 echo "I: Enabling autologin of user 'brain' for GNOME $gnome_ver."
11 sed -i -e 's/^\[daemon\]$/\[daemon\]\nAutomaticLoginEnable=true\nAutomaticLogin=brain\n/' $gdm_conf
15 gdm_conf=/etc/gdm/gdm.conf
16 if [ "$1" = "configure" -o "$1" = "abort-upgrade" ]; then
18 _set_gdm_auto_login /etc/gdm/gdm.conf 2
19 _set_gdm_auto_login /etc/gdm3/daemon.conf 3
21 # update gconf defaults tree