Lines 56-65
LIGHTDM_CONF=/etc/lightdm/lightdm.conf
Link Here
|
56 |
if [ -f "$LIGHTDM_CONF" ]; then |
56 |
if [ -f "$LIGHTDM_CONF" ]; then |
57 |
backup "$LIGHTDM_CONF" |
57 |
backup "$LIGHTDM_CONF" |
58 |
default_session="$(ls -1 /usr/share/xsessions/*.desktop | sed -n 's/^.*\/\([^/]\+\)\.desktop$/\1/;1p')" |
58 |
default_session="$(ls -1 /usr/share/xsessions/*.desktop | sed -n 's/^.*\/\([^/]\+\)\.desktop$/\1/;1p')" |
|
|
59 |
if [ -n "$default_session" ]; then |
60 |
sed -i \ |
61 |
-e "s/^#(autologin-session=).*$/\1$default_session/" \ |
62 |
"$LIGHTDM_CONF" |
63 |
else |
64 |
echo "** WARNING: no sessions found in /usr/share/xsessions/" >&2 |
65 |
fi |
59 |
sed -i \ |
66 |
sed -i \ |
60 |
-e "s/^#\(autologin-user=\).*$/\1$USER/" \ |
67 |
-e "s/^#\(autologin-user=\).*$/\1$USER/" \ |
61 |
-e "s/^#\(autologin-user-timeout=0\)/\1/" \ |
68 |
-e "s/^#\(autologin-user-timeout=0\)/\1/" \ |
62 |
-e "s/^#(autologin-session=).*$/\1$default_session/" \ |
|
|
63 |
"$LIGHTDM_CONF" |
69 |
"$LIGHTDM_CONF" |
64 |
backup "/etc/group" |
70 |
backup "/etc/group" |
65 |
add_nopasswdlogin_group lightdm ||: |
71 |
add_nopasswdlogin_group lightdm ||: |
66 |
- |
|
|