Set lightdm greeter

This commit is contained in:
Chrysostomus 2017-01-16 17:23:27 +02:00
parent 83eb69effc
commit 5b611abcd2

18
aif
View File

@ -162,7 +162,19 @@ select_language() {
[[ $FONT != "" ]] && setfont $FONT
}
set_lightdm_greeter(){
local greeters=$(ls /mnt/usr/share/xgreeters/*greeter.desktop) name
for g in ${greeters[@]};do
name=${g##*/}
name=${name%%.*}
case ${name} in
lightdm-gtk-greeter) break ;;
lightdm-*-greeter)
sed -i -e "s/^.*greeter-session=.*/greeter-session=${name}/" /mnt/etc/lightdm/lightdm.conf
;;
esac
done
}
# Check user is root, and that there is an active internet connection
# Seperated the checks into seperate "if" statements for readability.
@ -2309,7 +2321,8 @@ install_manjaro_de_wm() {
sed -i "s/$(grep "DISPLAYMANAGER=" /mnt/etc/conf.d/xdm)/DISPLAYMANAGER=\"sddm\"/g" /mnt/etc/conf.d/xdm
arch_chroot "rc-update add xdm default" 2>/tmp/.errlog
check_for_error
elif [[ "$(cat /tmp/.display-manager)" == sddm ]]; then
elif [[ "$(cat /tmp/.display-manager)" == lightdm ]]; then
set_lightdm_greeter
sed -i "s/$(grep "DISPLAYMANAGER=" /mnt/etc/conf.d/xdm)/DISPLAYMANAGER=\"lightdm\"/g" /mnt/etc/conf.d/xdm
arch_chroot "rc-update add xdm default" 2>/tmp/.errlog
check_for_error
@ -2328,6 +2341,7 @@ install_manjaro_de_wm() {
check_for_error
# enable display manager for systemd
if [[ "$(cat /tmp/.display-manager)" == lightdm ]]; then
set_lightdm_greeter
arch_chroot "systemctl enable lightdm" 2>/tmp/.errlog
check_for_error
elif [[ "$(cat /tmp/.display-manager)" == sddm ]]; then