From f1231503c05864a5e34fc010f7745e5ace4396e4 Mon Sep 17 00:00:00 2001 From: thomas Date: Wed, 22 Aug 2018 12:55:55 +0200 Subject: [PATCH 1/2] lightdm: low dependency login/display manger Home page: https://github.com/CanonicalLtd/lightdm Build and base setup is taken from: http://linuxfromscratch.org/blfs/view/svn/x/lightdm.html Notes: - lightdm must be installed to build greeters - gdm now means GraphicalDisplayManger - Final installation: install a greeter (slick-greeter) Tell the system to use lightdm instead of gdm after the next reboot #> systemctl disable gdm #> systemctl enable lightdm - Test w/o reboot #> systemctl disable gdm --now #> systemctl enable lightdm --now Play with the config under /etc/lightdm or not Mind the usual commands #> systemctl restart lightdm #> systemctl daemon-reload #> systemctl restart systemd-logind --- lightdm.be0 | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100755 lightdm.be0 diff --git a/lightdm.be0 b/lightdm.be0 new file mode 100755 index 000000000..0d0184e2a --- /dev/null +++ b/lightdm.be0 @@ -0,0 +1,91 @@ +#!/usr/bin/env beesh + +# BEE_VERSION lightdm-1.26.0-0 + +SRCURL[0]="https://github.com/CanonicalLtd/lightdm/releases/download/${PKGVERSION}/lightdm-${PKGVERSION}.tar.xz" + +# PATCHURL+=() + +# EXCLUDE+=() + +# build_in_sourcedir + +# mee_extract() { +# bee_extract "${@}" +# } + +# mee_patch() { +# bee_patch "${@}" +# } + +mee_configure() { + DMUSER=gdm + ITSTOOL=/bin/true \ + bee_configure \ + --prefix=/usr \ + --libexecdir=/usr/lib/lightdm \ + --localstatedir=/var \ + --sbindir=/usr/bin \ + --sysconfdir=/etc \ + --docdir=/usr/share/doc/lightdm-${PKGVERSION} \ + --disable-static \ + --disable-tests \ + --enable-liblightdm-qt=no \ + --with-greeter-user=${DMUSER} \ + --with-greeter-session=slick-greeter +} + +# mee_build() { +# bee_build +# } + +# mee_install() { +# bee_install +# } +## by default this may be 'make install DESTDIR="${D}"' + +mee_install_post() { + + sed '/bin\/sh/ a \\n. /etc/profile' ${S}/tests/src/lightdm-session > ${D}/usr/bin/lightdm-session + chmod 755 ${D}/usr/bin/lightdm-session + rm -rf ${D}/etc/init + install -v -dm755 -o gdm -g gdm ${D}/var/lib/lightdm + install -v -dm755 -o gdm -g gdm ${D}/var/lib/lightdm-data + install -v -dm755 -o gdm -g gdm ${D}/var/cache/lightdm + install -v -dm770 -o gdm -g gdm ${D}/var/log/lightdm + + ############################################### + # adjust settings in /etc/lightdm/lightdm.conf + + sed -i -e '/^#greeter-hide-users=false/ c greeter-hide-users=true' \ + -e '/^#sessions-directory/ c sessions-directory=/usr/share/xsessions' \ + -e '/^#greeter-session/ c greeter-session=slick-greeter' \ + ${D}/etc/lightdm/lightdm.conf + + sed -i -e '/^minimum-uid=/ c minimum-uid=100' \ + -e '/^hidden-users=/ c hidden-users=nobody nobodyV' \ + ${D}/etc/lightdm/users.conf + + + ###################### + # create systemd unit + + mkdir -p ${D}/etc/systemd/system + cat <<-UNIT > ${D}/etc/systemd/system/lightdm.service + [Unit] + Description=LightDM + Wants=nvidia.service + After=nvidia.service + + [Service] + ExecStart=/usr/bin/lightdm + StandardOutput=syslog + Restart=always + + [Install] + WantedBy=graphical.target + UNIT + + chmod 644 ${D}/etc/systemd/system/lightdm.service + +} From 31e93b46be4514ba2dcfb7b6b23abcbf1f7bcb6d Mon Sep 17 00:00:00 2001 From: thomas Date: Tue, 11 Dec 2018 16:38:01 +0100 Subject: [PATCH 2/2] lightdm: Use lightdm based on tag in hostconfig Lightdm is enabled per host by providing the 'lightdm' tag in our hostconfig. Installation steps on distmaster: - install updated gdm.service (see mariux64/mxtools) - bee install lightdm-1.26.0-0.x86_64 (surprise:) - systemctl enable lightdm Conditions and installation tested on sigstkflt, sigill & sigint. --- lightdm.be0 | 1 + 1 file changed, 1 insertion(+) diff --git a/lightdm.be0 b/lightdm.be0 index 0d0184e2a..7a63270bc 100755 --- a/lightdm.be0 +++ b/lightdm.be0 @@ -76,6 +76,7 @@ mee_install_post() { Description=LightDM Wants=nvidia.service After=nvidia.service + ConditionPathExists=/node/tags/lightdm [Service] ExecStart=/usr/bin/lightdm