mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-04-07 13:20:58 +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 disable gdm.service && \
|
||||||
systemctl enable sddm.service \
|
systemctl enable sddm.service \
|
||||||
; fi && \
|
; fi && \
|
||||||
systemctl enable desktop-autologin.service && \
|
systemctl enable bazzite-autologin.service && \
|
||||||
systemctl enable jupiter-fan-control.service && \
|
systemctl enable jupiter-fan-control.service && \
|
||||||
systemctl enable btrfs-dedup@run-media-mmcblk0p1.timer && \
|
systemctl enable btrfs-dedup@run-media-mmcblk0p1.timer && \
|
||||||
systemctl enable vpower.service && \
|
systemctl enable vpower.service && \
|
||||||
|
@ -7,9 +7,17 @@ USER=$(id -nu 1000)
|
|||||||
|
|
||||||
# SteamOS SDDM config
|
# SteamOS SDDM config
|
||||||
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
|
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
|
||||||
|
DESKTOP_AUTOLOGIN="/etc/bazzite/desktop_autologin"
|
||||||
|
|
||||||
# Configure SDDM autologin
|
# Configure autologin if Steam has been updated
|
||||||
if [[ ${BASE_IMAGE_NAME} =~ "kinoite" ]]; then
|
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
|
if ${DESKTOP_WAYLAND}; then
|
||||||
sed -i 's/.*Session=.*/Session=plasma.desktop/g' ${SDDM_CONF}
|
sed -i 's/.*Session=.*/Session=plasma.desktop/g' ${SDDM_CONF}
|
||||||
else
|
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]
|
[Unit]
|
||||||
Description=Enables autologin to desktop
|
Description=Enables Bazzite autologin
|
||||||
Before=display-manager.service
|
Before=display-manager.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/usr/bin/desktop-autologin
|
ExecStart=/usr/bin/bazzite-autologin
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
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
|
default: false
|
||||||
packages:
|
packages:
|
||||||
- Retrieve EmuDeck: just --unstable get-emudeck
|
- 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:
|
Greenlight:
|
||||||
description: A utility for xCloud and xHome streaming
|
description: A utility for xCloud and xHome streaming
|
||||||
default: false
|
default: false
|
||||||
|
@ -32,15 +32,15 @@ setup-firefox-vaapi-nvidia:
|
|||||||
--env=MOZ_ENABLE_WAYLAND=1 \
|
--env=MOZ_ENABLE_WAYLAND=1 \
|
||||||
org.mozilla.firefox
|
org.mozilla.firefox
|
||||||
|
|
||||||
# Enable autologin to gamescope session
|
# Toggle between desktop/gamescope autologin
|
||||||
enable-gamescope-autologin:
|
toggle-autologin:
|
||||||
systemctl disable --now desktop-autologin
|
#!/usr/bin/env bash
|
||||||
systemctl enable --now gamescope-autologin
|
DESKTOP_AUTOLOGIN="/etc/bazzite/desktop_autologin"
|
||||||
|
if [[ -f $DESKTOP_AUTOLOGIN ]]; then
|
||||||
# Enable autologin to desktop
|
sudo rm -f $DESKTOP_AUTOLOGIN
|
||||||
enable-desktop-autologin:
|
else
|
||||||
systemctl disable --now gamescope-autologin
|
sudo touch $DESKTOP_AUTOLOGIN
|
||||||
systemctl enable --now desktop-autologin
|
fi
|
||||||
|
|
||||||
# Launch Waydroid configuration helper
|
# Launch Waydroid configuration helper
|
||||||
configure-waydroid:
|
configure-waydroid:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user