mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-01 03:21:41 +00:00
fix(autologin): Retrieve user by id
This will always retrieve the first user created on the system and doesn't rely on there only being one user in the home directory
This commit is contained in:
parent
bdfe7ad369
commit
fd5f0a3b9c
@ -1,16 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NUM_USERS=$(ls /home | wc -l)
|
||||
USER=$(ls /home)
|
||||
USER=$(id -nu 1000)
|
||||
|
||||
# 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
|
||||
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF}
|
||||
fi
|
||||
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF}
|
||||
|
||||
# Remove sddm.conf if it exists
|
||||
if [ -f '/etc/sddm.conf' ]; then
|
||||
|
@ -1,16 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NUM_USERS=$(ls /home | wc -l)
|
||||
USER=$(ls /home)
|
||||
USER=$(id -nu 1000)
|
||||
|
||||
# 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
|
||||
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF}
|
||||
|
||||
# Remove sddm.conf if it exists
|
||||
if [ -f '/etc/sddm.conf' ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user