diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2015-06-28 11:10:14 +0300 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2015-06-28 11:10:14 +0300 |
commit | bbe8295a997f3f5ae2ce735a5556c784002ef073 (patch) | |
tree | 6558f05eda7c523c0cb29a86d128da4e5da25d9c | |
parent | 5d3f760be1e770501a7e9373bbd8ebef470240d5 (diff) |
refacut graphical_start sa fie compatibil cu systemd
-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 +} |