diff --git a/system_files/deck/usr/bin/gamescope-autologin b/system_files/deck/usr/bin/gamescope-autologin index 804f7707..06483b67 100755 --- a/system_files/deck/usr/bin/gamescope-autologin +++ b/system_files/deck/usr/bin/gamescope-autologin @@ -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 diff --git a/system_files/deck/usr/bin/plasma-autologin b/system_files/deck/usr/bin/plasma-autologin index 51bdab00..0627c80e 100755 --- a/system_files/deck/usr/bin/plasma-autologin +++ b/system_files/deck/usr/bin/plasma-autologin @@ -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