How to enable guest account automatic login?
Solution 1:
Edit /etc/lightdm/lightdm.conf
with your favourite editor like gksu gedit /etc/lightdm/lightdm.conf
and under the section [SeatDefaults]
add
allow-guest=true
autologin-guest=true
autologin-user-timeout=0
autologin-session=lightdm-autologin
user-session=ubuntu
Solution 2:
For both Ubuntu 14.10 and Ubuntu 15.10 this is what worked for me:
sudo nano /etc/lightdm/lightdm.conf
with the following content
[SeatDefaults]
autologin-guest=true
What did not work for me under Ubuntu 14.10 (Note: this was not tried under Ubuntu 15.10)...
- Creating the
50-autoguest.conf
file in/usr/share/lightdm/lightdm.conf.d/
- Creating the
50-autoguest.conf
file in/etc/lightdm/lightdm.conf.d/
- Having the setting
allow-guest=true
in the settings file (that disabled Guest session altogether).
According to the LightDM wiki entry, the right place to put such modifications is in
/etc/lightdm/lightdm.conf
/etc/lightdm/lightdm.conf.d/*
The following path is for the system-provided configuration only
/usr/share/lightdm/lightdm.conf.d/
Source: https://wiki.ubuntu.com/LightDM
The way I solved this was 'brute force'. I knew that I could set an auto-login using a regular account in Ubuntu 14.10 so I did that in Settings. Then I looked in the three locations I knew of where the auto-login preference was stored and, voila, the file /etc/lightdm/lightdm.conf
was created with a single entry for the account that was subject to auto login. Figuring that less is more I commented out the entry (prefixed #
) and added only autologin-guest=true
and it worked!
PS nano is my preferred command-line text editor. Its simple to use. That said, use whatever is your preferred text editor, e.g. gksu gedit
if you prefer a GUI text editor.
Solution 3:
The lightdm config file location has changed in Ubuntu 14.04. To accomplish the same you need to create a new file /usr/share/lightdm/lightdm.conf.d/50-auto-guest.conf, for example by running
gksu gedit /usr/share/lightdm/lightdm.conf.d/50-auto-guest.conf
and putting in this content:
[SeatDefaults]
allow-guest=true
autologin-guest=true
autologin-user-timeout=0
autologin-session=lightdm-autologin
user-session=ubuntu