features.in/live: implemented lightdm autologin
The main part is done as per https://wiki.archlinux.org/index.php/LightDM#Enable_Autologin; there's an issue that the lightdm developer insist that autologin user belongs to "nopasswdlogin" group though.
This commit is contained in:
parent
50c27a1782
commit
dc9b706619
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
#!/bin/sh -x
|
||||
# * reset password for root
|
||||
# * add user `altlinux' (without password)
|
||||
|
||||
NPG="nopasswdlogin"
|
||||
GRPLIST="users scanner audio radio proc cdrom cdwriter wheel fuse $NPG"
|
||||
|
||||
verbose()
|
||||
{
|
||||
if [ -n "$GLOBAL_VERBOSE" ]; then
|
||||
@ -12,8 +15,9 @@ verbose()
|
||||
add_user()
|
||||
{
|
||||
verbose "Add $1 user"
|
||||
groupadd -r "$NPG"
|
||||
local groups=
|
||||
for g in users scanner audio radio proc cdrom cdwriter wheel fuse; do
|
||||
for g in $GRPLIST; do
|
||||
if groupmod $g 2>/dev/null; then
|
||||
if [ -n "$groups" ]; then
|
||||
groups="$groups,$g"
|
||||
|
@ -22,6 +22,15 @@ AUTOLOGIN=yes
|
||||
E_O_F
|
||||
fi
|
||||
|
||||
# lightdm autologin
|
||||
LIGHTDM_CONF=/etc/lightdm/lightdm.conf
|
||||
if [ -f "$LIGHTDM_CONF" ]; then
|
||||
sed -i \
|
||||
-e "s/^#\(autologin-user=\).*$/\1$USER/" \
|
||||
-e "s/^#\(autologin-user-timeout=0\)/\1/" \
|
||||
"$LIGHTDM_CONF"
|
||||
fi
|
||||
|
||||
# gdm2 autologin
|
||||
GDM_CONF=/etc/X11/gdm/custom.conf
|
||||
if [ -f "$GDM_CONF" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user