mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-04-01 13:20:18 +00:00
Merge pull request #293 from ublue-os/bazzite-autologin
feat(deck): Only autologin to gamescope after Steam has updated
This commit is contained in:
commit
33de6fc7e2
@ -387,7 +387,7 @@ RUN rm /usr/share/applications/wine*.desktop && \
|
||||
systemctl disable gdm.service && \
|
||||
systemctl enable sddm.service \
|
||||
; fi && \
|
||||
systemctl enable desktop-autologin.service && \
|
||||
systemctl enable bazzite-autologin.service && \
|
||||
systemctl enable jupiter-fan-control.service && \
|
||||
systemctl enable btrfs-dedup@run-media-mmcblk0p1.timer && \
|
||||
systemctl enable vpower.service && \
|
||||
|
@ -7,9 +7,17 @@ USER=$(id -nu 1000)
|
||||
|
||||
# SteamOS SDDM config
|
||||
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
|
||||
DESKTOP_AUTOLOGIN="/etc/bazzite/desktop_autologin"
|
||||
|
||||
# Configure SDDM autologin
|
||||
if [[ ${BASE_IMAGE_NAME} =~ "kinoite" ]]; then
|
||||
# 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
|
||||
sed -i 's/.*Session=.*/Session=gamescope-session.desktop/g' ${SDDM_CONF}
|
||||
elif [[ ${BASE_IMAGE_NAME} =~ "kinoite" ]]; then
|
||||
if ${DESKTOP_WAYLAND}; then
|
||||
sed -i 's/.*Session=.*/Session=plasma.desktop/g' ${SDDM_CONF}
|
||||
else
|
@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
USER=$(id -nu 1000)
|
||||
|
||||
# SteamOS SDDM config
|
||||
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
|
||||
AUTOLOGIN_CONF='/etc/sddm.conf.d/zz-steamos-autologin.conf'
|
||||
|
||||
# Avoid autologin conflict
|
||||
if [[ -f ${AUTOLOGIN_CONF} ]]; then
|
||||
rm -f ${AUTOLOGIN_CONF}
|
||||
fi
|
||||
|
||||
# Configure autologin
|
||||
sed -i 's/.*Session=.*/Session=gamescope-session.desktop/g' ${SDDM_CONF}
|
||||
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF}
|
@ -0,0 +1,8 @@
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (subject.isInGroup("wheel") &&
|
||||
action.id == "org.freedesktop.systemd1.manage-units" &&
|
||||
action.lookup("unit") == "bazzite-autologin.service")
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
})
|
@ -1,10 +1,10 @@
|
||||
[Unit]
|
||||
Description=Enables autologin to desktop
|
||||
Description=Enables Bazzite autologin
|
||||
Before=display-manager.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/desktop-autologin
|
||||
ExecStart=/usr/bin/bazzite-autologin
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,10 +0,0 @@
|
||||
[Unit]
|
||||
Description=Enables autologin to gamescope-session
|
||||
Before=display-manager.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/gamescope-autologin
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -53,11 +53,6 @@ screens:
|
||||
default: false
|
||||
packages:
|
||||
- Retrieve EmuDeck: just --unstable get-emudeck
|
||||
Gamescope Autologin:
|
||||
description: Autologin to Gamescope Session
|
||||
default: true
|
||||
packages:
|
||||
- Enable Gamescope Autologin: just --unstable enable-gamescope-autologin
|
||||
Greenlight:
|
||||
description: A utility for xCloud and xHome streaming
|
||||
default: false
|
||||
|
@ -32,15 +32,15 @@ setup-firefox-vaapi-nvidia:
|
||||
--env=MOZ_ENABLE_WAYLAND=1 \
|
||||
org.mozilla.firefox
|
||||
|
||||
# Enable autologin to gamescope session
|
||||
enable-gamescope-autologin:
|
||||
systemctl disable --now desktop-autologin
|
||||
systemctl enable --now gamescope-autologin
|
||||
|
||||
# Enable autologin to desktop
|
||||
enable-desktop-autologin:
|
||||
systemctl disable --now gamescope-autologin
|
||||
systemctl enable --now desktop-autologin
|
||||
# Toggle between desktop/gamescope autologin
|
||||
toggle-autologin:
|
||||
#!/usr/bin/env bash
|
||||
DESKTOP_AUTOLOGIN="/etc/bazzite/desktop_autologin"
|
||||
if [[ -f $DESKTOP_AUTOLOGIN ]]; then
|
||||
sudo rm -f $DESKTOP_AUTOLOGIN
|
||||
else
|
||||
sudo touch $DESKTOP_AUTOLOGIN
|
||||
fi
|
||||
|
||||
# Launch Waydroid configuration helper
|
||||
configure-waydroid:
|
||||
|
Loading…
x
Reference in New Issue
Block a user