diff options
Diffstat (limited to 'graphical_start.sh')
-rw-r--r-- | graphical_start.sh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/graphical_start.sh b/graphical_start.sh index 0337a1b..d14c0b1 100644 --- a/graphical_start.sh +++ b/graphical_start.sh @@ -1,6 +1,18 @@ #!/bin/bash -CMD=$(cat /etc/conf.d/xdm | grep "DISPLAY" | cut -d '"' -f 2) -if [ "${CMD}" == "lxdm" ] || [ "${CMD}" == "gdm" ] || [ "${CMD}" == "lightdm" ] || [ "${CMD}" == "kdm" ] ; then - /usr/bin/systemctl start "${CMD}".service -fi +setup_displaymanager() { + # determine what is the login manager + if [ -n "$(equo match --installed gnome-base/gdm -qv)" ]; then + systemctl start gdm + elif [ -n "$(equo match --installed lxde-base/lxdm -qv)" ]; then + systemctl start lxdm + elif [ -n "$(equo match --installed x11-misc/lightdm-base -qv)" ]; then + systemctl start lightdm + elif [ -n "$(equo match --installed kde-base/kdm -qv)" ]; then + systemctl start kdm + elif [ -n "$(equo match --installed x11-misc/slim -qv)" ]; then + systemctl start slim + else + systemctl start xdm + fi +} |