如何从命令行设置开机自动登录
Tofloor
poster avatar
鲁鹏
Junior Packager
2020-12-07 00:36
Author


远程电脑重启后远程软件不能使用了,因为重启后系统需要登陆。现在用ssh等连上远程电脑,请问有人知道怎么从命令行设置重启自动登录吗?[泪]

Reply Favorite View the author
All Replies
鲁鹏
Junior Packager
2020-12-07 00:44
#1

网上找了下面的答案,好像不行啊


用vim编辑器打开/etc/lightdm/lightdm.conf

bob@bob-PC:~$ sudo vim /etc/lightdm/lightdm.conf

输入 :/^autologin-user,搜索autologin开头的行。

autologin-user后面的值就是你需要自动登录的用户名

Reply View the author
Feng Yu
deepin
2020-12-07 02:01
#2

对于这种需求你应该考虑注册成服务解决。官方文档慢慢啃: https://www.freedesktop.org/wiki/Software/systemd/

Reply View the author
Ziggy
deepin
2020-12-07 05:03
#3

做成desktop,放到~/.config/autostart

Reply View the author
鲁鹏
Junior Packager
2020-12-07 23:56
#4

我还是去那个电脑上开吧

Reply View the author