scripts/LINARO: Enable automatic login on GDM3

Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Change-Id: Ie9c9e0571346f9b1cbbf884462c4313c072391c3
diff --git a/scripts/LINARO/22-display-manager-autologin.chroot b/scripts/LINARO/22-display-manager-autologin.chroot
index b4806c3..83e5c91 100755
--- a/scripts/LINARO/22-display-manager-autologin.chroot
+++ b/scripts/LINARO/22-display-manager-autologin.chroot
@@ -15,3 +15,9 @@
   sed -i "s|^Current=.*|Current=breeze|" $target/etc/sddm.conf
   sed -i "s|^CursorTheme==.*|CursorTheme=breeze_cursors|" $target/etc/sddm.conf
 fi
+
+# Enable GDM3 autologin for linaro user
+if [ -e $target/etc/gdm3/daemon.conf ]; then
+  sed -i "s|^#.*AutomaticLoginEnable.*|AutomaticLoginEnable=true|" $target/etc/gdm3/daemon.conf
+  sed -i "s|^#.*AutomaticLogin.*|AutomaticLogin=linaro|" $target/etc/gdm3/daemon.conf
+fi