Skip to content

Commit

Permalink
Make Wayland switching more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
spl237 committed May 9, 2022
1 parent 2ef9a3a commit 0319d1c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
raspi-config (20220506) bullseye; urgency=medium

* Modify Wayland switching to work with AccountSettings

-- Simon Long <[email protected]> Fri, 06 May 2022 14:07:57 +0100

raspi-config (20220425) bullseye; urgency=medium

* Tidy hardware detection functions
Expand Down
14 changes: 11 additions & 3 deletions raspi-config
Original file line number Diff line number Diff line change
Expand Up @@ -2035,7 +2035,7 @@ do_glamor() {
do_wayland() {
DEFAULT=--defaultno
CURRENT=0
if grep -q "^user-session=LXDE-pi" /etc/lightdm/lightdm.conf ; then
if grep -q "^user-session=LXDE-pi-wayland" /etc/lightdm/lightdm.conf ; then
DEFAULT=
CURRENT=1
fi
Expand All @@ -2049,10 +2049,18 @@ do_wayland() {
ASK_TO_REBOOT=1
fi
if [ $RET -eq 0 ]; then
sed /etc/lightdm/lightdm.conf -i -e "s/^#\\?user-session.*/user-session=LXDE-pi/"
sed /etc/lightdm/lightdm.conf -i -e "s/^#\\?user-session.*/user-session=LXDE-pi-wayland/"
sed /etc/lightdm/lightdm.conf -i -e "s/^#\\?autologin-session.*/autologin-session=LXDE-pi-wayland/"
if [ -e "/var/lib/AccountsService/users/$USER" ] ; then
sed "/var/lib/AccountsService/users/$USER" -i -e "s/XSession=.*/XSession=LXDE-pi-wayland/"
fi
STATUS=enabled
elif [ $RET -eq 1 ]; then
sed /etc/lightdm/lightdm.conf -i -e "s/user-session.*/#user-session=LXDE-pi/"
sed /etc/lightdm/lightdm.conf -i -e "s/^#\\?user-session.*/user-session=LXDE-pi-x/"
sed /etc/lightdm/lightdm.conf -i -e "s/^#\\?autologin-session.*/autologin-session=LXDE-pi-x/"
if [ -e "/var/lib/AccountsService/users/$USER" ] ; then
sed "/var/lib/AccountsService/users/$USER" -i -e "s/XSession=.*/XSession=LXDE-pi-x/"
fi
STATUS=disabled
else
return $RET
Expand Down

0 comments on commit 0319d1c

Please sign in to comment.