How to enable autologin with "ubuntu core" + "lightdm" + "XFCE4"?

McArthor Lee macarthorzhuce at 126.com
Tue Jun 17 05:09:14 UTC 2014


Hi list,


I'm making a LiveCD based upon ubuntu core, and have some problems.


Let's see what I've been done before the problems.
1. download 2 files: xubuntu-14.04-desktop-i386.iso, ubuntu-core-14.04-core-i386.tar.gz.
2. mount the ISO to some place, and copy its content to some directory, say, /root/custom/livecd/. And then remove /root/custom/livecd/casper/filesystem.squashfs, which is what I'm going to build from ubuntu core. Note: the vmlinuz and initrd.lz is official stock, except that I customize initrd.lz file "/etc/casper.conf" to modify "USERNAME" to "myuser", and "/scripts/casper-bottom/25adduser" to make password from blank to "mypassword" (encrypted by mkpasswd command).
3. untar/gz ubuntu-core-14.04-core-i386.tar.gz to /root/custom/make_squashfs/
4. chroot /root/custom/make_squashfs/
5. mount -t proc proc /proc && mount -t sysfs sysfs /sys && mount -t devpts devpts /dev/pts/ && export HOME=/root
6. locale-gen en_US.UTF-8
7. apt-get update && apt-get install xxx # includes XFCE4, linux-image-generic, lightdm, lightdm-gtk-greeter casper, user-setup and some other packages.
8. umount /proc && umount /sys && umount /dev/pts && exit
9. mksquashfs . ../livecd/casper/filesystem.squashfs
10. mkisofs xxxxxx


Now the ISO can boot to lightdm login screen, but I cannot automatically login with myuser/mypasswd: the login dialogue shows. I think this user should be auto loginnable.


Take xubuntu LiveCD as an correct example, it has built-in user "xubuntu" defined in "/etc/casper.conf" in initrd.lz, and can auto login to desktop. And, xubuntu initrd.lz "/scripts/casper-bottom/15autologin" writes autologin configurations to /root/etc/lightdm/lightdm.conf, which will become the "/etc/lightdm/lightdm.conf" after switching root to squashfs image. Its content is:
[SeatDefaults]
allow-guest=false
autologin-guest=false
autologin-user=myuser
autologin-user-timeout=0
autologin-session=lightdm-autologin


So my question is:
How to auto login "myuser" to desktop? Do I miss any package installation? Or do I missed some configuration?


Any suggestions are appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20140617/43757fa6/attachment.html>


More information about the Ubuntu-devel-discuss mailing list