View | Details | Raw Unified | Return to bug 36794
Collapse All | Expand All

(-)a/features.in/x11-autologin/rootfs/image-scripts.d/40-x11-autologin (-1 / +9 lines)
Lines 55-60 fi Link Here
55
LIGHTDM_CONF=/etc/lightdm/lightdm.conf
55
LIGHTDM_CONF=/etc/lightdm/lightdm.conf
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')"
59
	account_file="/var/lib/AccountsService/users/$USER"
60
	if [ -n "$default_session" ] && [ ! -f "$account_file" ]; then
61
		cat > "$account_file" << EOF
62
[User]
63
XSession=$default_session
64
SystemAccount=false
65
EOF
66
	fi
58
	sed -i \
67
	sed -i \
59
		-e "s/^#\(autologin-user=\).*$/\1$USER/" \
68
		-e "s/^#\(autologin-user=\).*$/\1$USER/" \
60
		-e "s/^#\(autologin-user-timeout=0\)/\1/" \
69
		-e "s/^#\(autologin-user-timeout=0\)/\1/" \
61
- 

Return to bug 36794