diff --git a/Containerfile b/Containerfile index b08bf046..89b85e5d 100644 --- a/Containerfile +++ b/Containerfile @@ -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 && \ diff --git a/system_files/deck/kinoite/usr/bin/plasma-autologin b/system_files/deck/kinoite/usr/bin/plasma-autologin deleted file mode 100755 index 1d105104..00000000 --- a/system_files/deck/kinoite/usr/bin/plasma-autologin +++ /dev/null @@ -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} diff --git a/system_files/deck/kinoite/usr/lib/systemd/system/plasma-autologin.service b/system_files/deck/kinoite/usr/lib/systemd/system/plasma-autologin.service deleted file mode 100644 index fc1197a8..00000000 --- a/system_files/deck/kinoite/usr/lib/systemd/system/plasma-autologin.service +++ /dev/null @@ -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 diff --git a/system_files/deck/silverblue/usr/lib/systemd/system/gnome-autologin.service b/system_files/deck/shared/usr/lib/systemd/system/desktop-autologin.service similarity index 56% rename from system_files/deck/silverblue/usr/lib/systemd/system/gnome-autologin.service rename to system_files/deck/shared/usr/lib/systemd/system/desktop-autologin.service index c557e2fa..09d1c363 100644 --- a/system_files/deck/silverblue/usr/lib/systemd/system/gnome-autologin.service +++ b/system_files/deck/shared/usr/lib/systemd/system/desktop-autologin.service @@ -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 diff --git a/system_files/deck/shared/usr/share/ublue-os/just/custom.just b/system_files/deck/shared/usr/share/ublue-os/just/custom.just index b63e5a2b..151d2681 100644 --- a/system_files/deck/shared/usr/share/ublue-os/just/custom.just +++ b/system_files/deck/shared/usr/share/ublue-os/just/custom.just @@ -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: diff --git a/system_files/deck/silverblue/usr/bin/gnome-autologin b/system_files/deck/silverblue/usr/bin/gnome-autologin deleted file mode 100755 index dff16b35..00000000 --- a/system_files/deck/silverblue/usr/bin/gnome-autologin +++ /dev/null @@ -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} diff --git a/system_files/desktop/shared/usr/bin/desktop-autologin b/system_files/desktop/shared/usr/bin/desktop-autologin new file mode 100755 index 00000000..950f82f2 --- /dev/null +++ b/system_files/desktop/shared/usr/bin/desktop-autologin @@ -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}