如何在 LightDM 中启用自动登录?

如何在 LightDM 中启用自动登录?

我想要用户foo使用 LightDM(Ubuntu 自 11.10 版开始使用)自动登录。我该怎么做?

答案1

Alin 的答案的另一种方法是创建一个文件/etc/lightdm/lightdm.conf并添加以下内容:

[SeatDefaults]
autologin-user=<YOUR USER>
autologin-user-timeout=0
user-session=ubuntu
# Uncomment the following, if running Unity
#greeter-session=unity-greeter

下次启动时,自动登录应该可以按预期工作。

答案2

您无需编辑配置文件即可执行此操作:转到系统设置>用户帐户,单击“解锁”并输入密码,然后单击“自动登录”旁边的按钮:

在此处输入图片描述

答案3

从 Ubuntu 14.04 及以上版本创建该文件:

/etc/lightdm/lightdm.conf.d/12-autologin.conf

并添加:

[SeatDefaults]
autologin-user=youruser

答案4

gksu gedit /etc/lightdm/lightdm.conf

添加行:

autologin-user=username
autologin-user-timeout=0

例子:

[SeatDefaults]

user-session=ubuntu

greeter-session=unity-greeter

autologin-user=alan

autologin-user-timeout=0

相关内容