kde: support modifying existing /etc/sddm.conf

This commit is contained in:
Rex Dieter 2014-11-13 12:39:40 -06:00
parent efec98370f
commit 2120aded43

View File

@ -40,11 +40,16 @@ chmod a+x /home/liveuser/.xsession
chown liveuser:liveuser /home/liveuser/.xsession chown liveuser:liveuser /home/liveuser/.xsession
# set up autologin for user liveuser # set up autologin for user liveuser
if [ -f /etc/sddm.conf ]; then
sed -i 's/^#User=.*/User=liveuser/' /etc/sddm.conf
sed -i 's/^#Session=.*/Session=kde-plasma.desktop/' /etc/sddm.conf
else
cat > /etc/sddm.conf << SDDM_EOF cat > /etc/sddm.conf << SDDM_EOF
[Autologin] [Autologin]
User=liveuser User=liveuser
Session=kde-plasma.desktop Session=kde-plasma.desktop
SDDM_EOF SDDM_EOF
fi
# add liveinst.desktop to favorites menu # add liveinst.desktop to favorites menu
mkdir -p /home/liveuser/.kde/share/config/ mkdir -p /home/liveuser/.kde/share/config/