Skip to content

Commit

Permalink
fix(bazzite-autologin): Always remove Steam's autologin config when t…
Browse files Browse the repository at this point in the history
…riggered

Now that we write to this when switching to and from gaming when automatically logged
in to desktop, we should remove it at boot to prevent people with desktop autologin
enabled from booting into gaming mode
  • Loading branch information
EyeCantCU committed Sep 18, 2023
1 parent 64ef129 commit a758977
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions system_files/deck/shared/usr/bin/bazzite-autologin
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ USER=$(id -nu 1000)

# SteamOS SDDM config
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
DESKTOP_AUTOLOGIN="/etc/bazzite/desktop_autologin"
AUTOLOGIN_CONF='/etc/sddm.conf.d/zz-steamos-autologin.conf'
DESKTOP_AUTOLOGIN='/etc/bazzite/desktop_autologin'

# Avoid autologin conflict
if [[ -f ${AUTOLOGIN_CONF} ]]; then
rm -f ${AUTOLOGIN_CONF}
fi

# Configure autologin if Steam has been updated
if [[ ! -f $DESKTOP_AUTOLOGIN && -f /var/home/$USER/.local/share/Steam/ubuntu12_32/steamui.so ]]; then
AUTOLOGIN_CONF='/etc/sddm.conf.d/zz-steamos-autologin.conf'
# Avoid autologin conflict
if [[ -f ${AUTOLOGIN_CONF} ]]; then
rm -f ${AUTOLOGIN_CONF}
fi
if [[ ! -f ${DESKTOP_AUTOLOGIN} && -f /var/home/$USER/.local/share/Steam/ubuntu12_32/steamui.so ]]; then
sed -i 's/.*Session=.*/Session=gamescope-session.desktop/g' ${SDDM_CONF}
elif [[ ${BASE_IMAGE_NAME} =~ "kinoite" ]]; then
if ${DESKTOP_WAYLAND}; then
Expand Down

0 comments on commit a758977

Please sign in to comment.