Skip to content

Commit 686eda6

Browse files
authored
add xubuntu lightdm changes
1 parent 53ffa70 commit 686eda6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

scripts/firstrun.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,20 @@ if [ x"$SHELLS_USERNAME" != x ]; then
8888
chmod 0700 "/root/.ssh"
8989
chmod 0600 "/root/.ssh/authorized_keys"
9090
fi
91+
92+
if [ -d /usr/share/xubuntu/ ]; then
93+
groupadd -r autologin
94+
[[ -d /run/openrc ]] && sed -i -e 's/^.*minimum-vt=.*/minimum-vt=7/' /etc/lightdm/lightdm.conf.d/70-xubuntu.conf
95+
gpasswd -a "${SHELLS_USERNAME}" autologin
96+
echo [SeatDefaults] > /etc/lightdm/lightdm.conf.d/70-xubuntu.conf
97+
echo autologin-user=${SHELLS_USERNAME} >> /etc/lightdm/lightdm.conf.d/70-xubuntu.conf
98+
echo autologin-user-timeout=0 >> /etc/lightdm/lightdm.conf.d/70-xubuntu.conf
99+
echo user-session=xubuntu >> /etc/lightdm/lightdm.conf.d/70-xubuntu.conf
100+
echo pam-autologin-service=lightdm-autologin >> /etc/lightdm/lightdm.conf.d/70-xubuntu.conf
101+
echo "auth sufficient pam_succeed_if.so user ingroup nopasswdlogin" >> /etc/pam.d/lightdm
102+
groupadd -r nopasswdlogin
103+
gpasswd -a "${SHELLS_USERNAME}" nopasswdlogin
104+
fi
91105

92106
if [ -f /etc/lightdm/lightdm.conf ]; then
93107
# autologin for lightdm

0 commit comments

Comments
 (0)