mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-30 03:32:36 +00:00
fix(autologin/return-to-gamemode): Don't assume path to home directory (#571)
In cases where the home directory path differs from the user name, it isn't enough to use a hard path that assumes the user's username is in it.
This commit is contained in:
parent
71310055ee
commit
b35b1f2ea0
@ -6,6 +6,7 @@ IMAGE_INFO="/usr/share/ublue-os/image-info.json"
|
|||||||
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
|
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
|
||||||
|
|
||||||
USER=$(id -nu 1000)
|
USER=$(id -nu 1000)
|
||||||
|
HOME=$(getent passwd $USER | cut -d: -f6)
|
||||||
|
|
||||||
# SteamOS SDDM config
|
# SteamOS SDDM config
|
||||||
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
|
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
|
||||||
@ -18,7 +19,7 @@ if [[ -f ${AUTOLOGIN_CONF} ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Configure autologin if Steam has been updated
|
# Configure autologin if Steam has been updated
|
||||||
if [[ ! -f ${DESKTOP_AUTOLOGIN} && -f /var/home/$USER/.local/share/Steam/ubuntu12_32/steamui.so ]]; then
|
if [[ ! -f ${DESKTOP_AUTOLOGIN} && -f $HOME/.local/share/Steam/ubuntu12_32/steamui.so ]]; then
|
||||||
sed -i 's/.*Session=.*/Session=gamescope-session.desktop/g' ${SDDM_CONF}
|
sed -i 's/.*Session=.*/Session=gamescope-session.desktop/g' ${SDDM_CONF}
|
||||||
elif [[ ${BASE_IMAGE_NAME} =~ "kinoite" ]]; then
|
elif [[ ${BASE_IMAGE_NAME} =~ "kinoite" ]]; then
|
||||||
if ${DESKTOP_WAYLAND}; then
|
if ${DESKTOP_WAYLAND}; then
|
||||||
|
@ -4,12 +4,13 @@ IMAGE_INFO="/usr/share/ublue-os/image-info.json"
|
|||||||
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
|
BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO)
|
||||||
|
|
||||||
USER=$(id -nu 1000)
|
USER=$(id -nu 1000)
|
||||||
|
HOME=$(getent passwd $USER | cut -d: -f6)
|
||||||
|
|
||||||
# SteamOS autologin SDDM config
|
# SteamOS autologin SDDM config
|
||||||
AUTOLOGIN_CONF='/etc/sddm.conf.d/zz-steamos-autologin.conf'
|
AUTOLOGIN_CONF='/etc/sddm.conf.d/zz-steamos-autologin.conf'
|
||||||
|
|
||||||
# Configure autologin if Steam has been updated
|
# Configure autologin if Steam has been updated
|
||||||
if [[ -f /var/home/$USER/.local/share/Steam/ubuntu12_32/steamui.so ]]; then
|
if [[ -f $HOME/.local/share/Steam/ubuntu12_32/steamui.so ]]; then
|
||||||
{
|
{
|
||||||
echo "[Autologin]"
|
echo "[Autologin]"
|
||||||
echo "Session=gamescope-session.desktop"
|
echo "Session=gamescope-session.desktop"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user