mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-03-03 13:14:15 +00:00
feat(deck): Autologin to Plasma
Currently the user will boot to SDDM upon initial install. This is not entirely optimal as the default session in SDDM is gamescope session which is not usable without first updating Steam. This addresses that by using the same logic we use for gamescope autologin to login to Plasma on first boot This commit also simplifies the logic in gamescope-autologin
This commit is contained in:
parent
19b818338e
commit
8c58e65fad
@ -160,6 +160,7 @@ RUN sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-bazzite.re
|
|||||||
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-hl2linux-selinux.repo && \
|
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-hl2linux-selinux.repo && \
|
||||||
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-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_kylegospo-wallpaper-engine-kde-plugin.repo && \
|
||||||
|
systemctl enable plasma-autologin.service && \
|
||||||
systemctl enable jupiter-fan-control.service && \
|
systemctl enable jupiter-fan-control.service && \
|
||||||
systemctl enable set-cfs-tweaks.service && \
|
systemctl enable set-cfs-tweaks.service && \
|
||||||
systemctl disable input-remapper.service && \
|
systemctl disable input-remapper.service && \
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
NUM_USERS=$(ls /home | wc -l)
|
|
||||||
|
|
||||||
# If we have multiple users, don't configure SDDM
|
NUM_USERS=$(ls /home | wc -l)
|
||||||
|
USER=$(ls /home)
|
||||||
|
|
||||||
|
# SteamOS SDDM config
|
||||||
|
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
|
||||||
|
|
||||||
|
# Configure autologin
|
||||||
|
sed -i 's/.*Session=.*/Session=gamescope-session.desktop/g' ${SDDM_CONF}
|
||||||
if [ ${NUM_USERS} -eq 1 ]; then
|
if [ ${NUM_USERS} -eq 1 ]; then
|
||||||
# Don't configure SDDM if we already have
|
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF}
|
||||||
SDDM_CONF=$(cat /etc/sddm.conf.d/steamos.conf)
|
fi
|
||||||
if grep '#User=' <<< ${SDDM_CONF}; then
|
|
||||||
# Retrieve username
|
# Remove sddm.conf if it exists
|
||||||
USER=$(ls /home)
|
if [ -f '/etc/sddm.conf' ]; then
|
||||||
# Configure autologin
|
rm -f /etc/sddm.conf
|
||||||
sed -i 's/#User=/User='${USER}'/g' /etc/sddm.conf.d/steamos.conf
|
|
||||||
touch /etc/sddm.conf.d/zz-steamos-autologin.conf
|
|
||||||
# Remove sddm.conf if it exists
|
|
||||||
if [ -f '/etc/sddm.conf' ]; then
|
|
||||||
rm -f /etc/sddm.conf
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
18
system_files/deck/usr/bin/plasma-autologin
Executable file
18
system_files/deck/usr/bin/plasma-autologin
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
NUM_USERS=$(ls /home | wc -l)
|
||||||
|
USER=$(ls /home)
|
||||||
|
|
||||||
|
# SteamOS SDDM config
|
||||||
|
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
|
||||||
|
|
||||||
|
# Configure autologin
|
||||||
|
sed -i 's/.*Session=.*/Session=plasmax11.desktop/g' ${SDDM_CONF}
|
||||||
|
if [ ${NUM_USERS} -eq 1 ]; then
|
||||||
|
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove sddm.conf if it exists
|
||||||
|
if [ -f '/etc/sddm.conf' ]; then
|
||||||
|
rm -f /etc/sddm.conf
|
||||||
|
fi
|
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Enables autologin to Plasma (X11)
|
||||||
|
Before=display-manager.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/bin/plasma-autologin
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user