Skip to content

Commit

Permalink
lightdm sway login fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Nov 26, 2024
1 parent 49b2dcd commit 5893fa2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
14 changes: 14 additions & 0 deletions x11/misc/lightdm/lightdm-session.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
if [ ${XDG_SESSION_TYPE} == "wayland" ] ; then
# Wait until the Xorg process for the user finishes
while pgrep -u 0 Xorg > /dev/null; do
sleep 0.1
done
if [ "${XDG_RUNTIME_DIR}" == "" ] ; then
export XDG_RUNTIME_DIR=/tmp/runtime-$USER
mkdir -p ${XDG_RUNTIME_DIR}
fi
exec env dbus-run-session $@
else
exec /etc/X11/xinit/Xsession $@
fi
9 changes: 5 additions & 4 deletions x11/misc/lightdm/ympbuild
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ email='[email protected]'
maintainer='bk'
license=('GPLv3')
source=("https://salsa.debian.org/xfce-extras-team/lightdm/-/archive/debian/$version-1/lightdm-debian-$version-1.tar.gz"
"lightdm-session.sh"
"lightdm.initd")
depends=(libX11 pam libxklavier xorg-server libxcb glib libgcrypt libXdmcp xmodmap xrdb libXi)
makedepends=(gobject-introspection vala intltool yelp-tools)
md5sums=('2b845ca384f042f21b646a76c52345f0'
sha256sums=('10eec5e47c9546f934f568591140204db2ea2241f345685bb8eeb35da05c83e5'
'SKIP'
'SKIP')
group=(x11.misc)
uses=()
Expand All @@ -28,7 +30,7 @@ setup(){
--disable-tests \
--disable-gtk-doc \
--enable-yelp-tools \
--enable-qt5-base \
--disable-qt5-base \
--with-greeter-user=lightdm \
--with-greeter-session=lightdm-gtk-greeter
}
Expand All @@ -49,8 +51,7 @@ package(){
mkdir -p $DESTDIR/etc/init.d
install ../lightdm.initd $DESTDIR/etc/init.d/lightdm
# generate lightdm-session file
echo '#!/bin/sh' > $DESTDIR/usr/bin/lightdm-session
echo 'exec /etc/X11/xinit/Xsession $@' >> $DESTDIR/usr/bin/lightdm-session
install ../lightdm-session.sh $DESTDIR/usr/bin/lightdm-session
# fix pam config
sed -i "s/systemd/elogind/g" $DESTDIR/etc/pam.d/*
}
Expand Down

0 comments on commit 5893fa2

Please sign in to comment.