Add auto startx when using xinit regardless of autologin
This commit is contained in:
parent
5f8795d6e9
commit
ab643323f3
@ -1678,13 +1678,15 @@ xinit_config()
|
|||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=-/sbin/agetty --autologin $NEWUSER --noclear %I 38400 linux
|
ExecStart=-/sbin/agetty --autologin $NEWUSER --noclear %I 38400 linux
|
||||||
EOF
|
EOF
|
||||||
|
else
|
||||||
|
rm -rf "$AUTOLOGIN_SERV"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# run `startx` after logging in regardless of autologin
|
||||||
cat > "$MNT/home/$NEWUSER/$LOGINRC" <<- EOF
|
cat > "$MNT/home/$NEWUSER/$LOGINRC" <<- EOF
|
||||||
# automatically run startx when logging in on tty1
|
# automatically run startx when logging in on tty1
|
||||||
[ -z "\$DISPLAY" ] && [ \$XDG_VTNR -eq 1 ] && startx
|
[ -z "\$DISPLAY" ] && [ \$XDG_VTNR -eq 1 ] && startx
|
||||||
EOF
|
EOF
|
||||||
else
|
|
||||||
rm -rf "$AUTOLOGIN_SERV"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lightdm_config()
|
lightdm_config()
|
||||||
|
Reference in New Issue
Block a user