小智 1
在eg中创建下面的脚本/etc/lightdm/restart并使其可执行( ),然后在session-cleanup-script值chmod 755中输入脚本的路径:/etc/lightdm/lighdm.conf
[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
autologin-user=kiosk
autologin-user-timeout=10
allow-guest=no
session-cleanup-script=/etc/lightdm/restart
Run Code Online (Sandbox Code Playgroud)
这是脚本:
#!/bin/bash
trap "" SIGHUP SIGINT SIGTERM
PATH=$PATH:/sbin:/usr/sbin
service lightdm restart
Run Code Online (Sandbox Code Playgroud)
每当有人注销时,这都会重新启动 lightdm,从而重新启动自动登录过程。