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

McArthor Lee macarthorzhuce at 126.com
Tue Jun 17 06:05:41 UTC 2014



Hi all,


I've found the solution just now...


LightDM wiki shows that LightDM has 2 configuration folders: /etc/lightdm and /usr/share/lightdm, so I investigate these 2 folders in xubuntu. I found this file /etc/lightdm/lightdm.conf.d/10-xubuntu and its content is "user-session=xubuntu", which correspond to /usr/share/xsessions/xubuntu.desktop.


I make my solution as to xubuntu's:
1. in rootfs squashfs, create /etc/lightdm/lightdm.conf.d/10-xfce
2. write to its content as follows:
[SeatDefaults]
user-session=xfce
where "xfce" corresponds to /usr/share/xsessions/xfce.desktop which is installed by "apt-get install xfce4".


Now LightDM boots with autologin enabled.






At 2014-06-17 01:09:14, "McArthor Lee" <macarthorzhuce at 126.com> wrote:

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/2dcdae9b/attachment.html>


More information about the Ubuntu-devel-discuss mailing list