chore(deck): Consolidate DE autologin handlers to desktop-autologin

Combines plasma-autologin, and GNOME autologin on Deck images into one handler.
This is done as these services all work practically the same.
This commit is contained in:
RJ Trujillo 2023-09-03 18:57:39 -06:00
parent 7b7f08870d
commit d5d373a3ca
7 changed files with 32 additions and 75 deletions

View File

@ -375,14 +375,12 @@ RUN rm /usr/share/applications/wine*.desktop && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-obs-vkcapture.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-wallpaper-engine-kde-plugin.repo && \
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ycollet-audinux.repo && \
if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
systemctl enable plasma-autologin.service \
; else \
if grep -q "silverblue" <<< "${BASE_IMAGE_NAME}"; then \
systemctl mask power-profiles-daemon.service && \
systemctl disable gdm.service && \
systemctl enable sddm.service && \
systemctl enable gnome-autologin.service \
systemctl enable sddm.service \
; fi && \
systemctl enable desktop-autologin.service && \
systemctl enable jupiter-fan-control.service && \
systemctl enable btrfs-dedup@run-media-mmcblk0p1.timer && \
systemctl enable vpower.service && \

View File

@ -1,24 +0,0 @@
#!/usr/bin/env bash
source /etc/default/desktop-wayland
USER=$(id -nu 1000)
# SteamOS SDDM config
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
if [ ! -f ${SDDM_CONF} ]; then
# Fallback to sddm.conf
SDDM_CONF='/etc/sddm.conf'
KDE_SETTINGS='/etc/sddm.conf.d/kde_settings.conf'
if [ -f ${KDE_SETTINGS} ]; then
rm -f ${KDE_SETTINGS}
fi
fi
# Configure autologin
if ${DESKTOP_WAYLAND}; then
sed -i 's/.*Session=.*/Session=plasma.desktop/g' ${SDDM_CONF}
else
sed -i 's/.*Session=.*/Session=plasmax11.desktop/g' ${SDDM_CONF}
fi
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF}

View File

@ -1,10 +0,0 @@
[Unit]
Description=Enables autologin to Plasma (X11)
Before=display-manager.service
[Service]
Type=oneshot
ExecStart=/usr/bin/plasma-autologin
[Install]
WantedBy=multi-user.target

View File

@ -1,10 +1,10 @@
[Unit]
Description=Enables autologin to GNOME
Description=Enables autologin to desktop
Before=display-manager.service
[Service]
Type=oneshot
ExecStart=/usr/bin/gnome-autologin
ExecStart=/usr/bin/desktop-autologin
[Install]
WantedBy=multi-user.target

View File

@ -34,25 +34,13 @@ setup-firefox-vaapi-nvidia:
# Enable autologin to gamescope session
enable-gamescope-autologin:
#!/usr/bin/env bash
source /etc/default/bazzite
if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
systemctl disable --now gnome-autologin
elif [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then
systemctl disable --now plasma-autologin
fi
systemctl disable --now desktop-autologin
systemctl enable --now gamescope-autologin
# Enable autologin to desktop
enable-desktop-autologin:
#!/usr/bin/env bash
source /etc/default/bazzite
systemctl disable --now gamescope-autologin
if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then
systemctl enable --now gnome-autologin
elif [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then
systemctl enable --now plasma-autologin
fi
systemctl enable --now desktop-autologin
# Launch Waydroid configuration helper
configure-waydroid:

View File

@ -1,20 +0,0 @@
#!/usr/bin/env bash
source /etc/default/desktop-wayland
USER=$(id -nu 1000)
# SteamOS SDDM config
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
if [ ! -f ${SDDM_CONF} ]; then
# Fallback to sddm.conf
SDDM_CONF = '/etc/sddm.conf'
fi
# Configure autologin
if ${DESKTOP_WAYLAND}; then
sed -i 's/.*Session=.*/Session=gnome-wayland.desktop/g' ${SDDM_CONF}
else
sed -i 's/.*Session=.*/Session=gnome-xorg.desktop/g' ${SDDM_CONF}
fi
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF}

View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
source /etc/default/bazzite
source /etc/default/desktop-wayland
USER=$(id -nu 1000)
# SteamOS SDDM config
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
# Configure SDDM autologin
if [[ ${BASE_IMAGE_NAME} =~ "kinoite" ]]; then
if ${DESKTOP_WAYLAND}; then
sed -i 's/.*Session=.*/Session=plasma.desktop/g' ${SDDM_CONF}
else
sed -i 's/.*Session=.*/Session=plasmax11.desktop/g' ${SDDM_CONF}
fi
elif [[ ${BASE_IMAGE_NAME} =~ "silverblue" ]]; then
if ${DESKTOP_WAYLAND}; then
sed -i 's/.*Session=.*/Session=gnome-wayland.desktop/g' ${SDDM_CONF}
else
sed -i 's/.*Session=.*/Session=gnome-xorg.desktop/g' ${SDDM_CONF}
fi
fi
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF}