From 5b611abcd296021d3ebdde428fea5a867a34af1d Mon Sep 17 00:00:00 2001 From: Chrysostomus Date: Mon, 16 Jan 2017 17:23:27 +0200 Subject: [PATCH] Set lightdm greeter --- aif | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/aif b/aif index dc29300..0e52232 100755 --- a/aif +++ b/aif @@ -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