bazzite/spec_files/jupiter-hw-support/user.patch
2024-01-06 17:18:13 -08:00

34 lines
2.2 KiB
Diff

diff --git a/usr/lib/hwsupport/steamos-automount.sh b/usr/lib/hwsupport/steamos-automount.sh
index cf264fd..6dd3a2f 100755
--- a/usr/lib/hwsupport/steamos-automount.sh
+++ b/usr/lib/hwsupport/steamos-automount.sh
@@ -153,13 +153,14 @@ do_mount()
fi
# Ask udisks to auto-mount. This needs a version of udisks that supports the 'as-user' option.
+ USER=$(id -nu 1000)
ret=0
reply=$(busctl call --allow-interactive-authorization=false --expect-reply=true --json=short \
org.freedesktop.UDisks2 \
/org/freedesktop/UDisks2/block_devices/"${DEVBASE}" \
org.freedesktop.UDisks2.Filesystem \
Mount 'a{sv}' 4 \
- as-user s deck \
+ as-user s ${USER} \
auth.no_user_interaction b true \
fstype s "$FSTYPE" \
options s "$OPTS") || ret=$?
@@ -212,9 +213,9 @@ do_mount()
# bind mount compatdata folder from internal disk
mkdir -p "${mount_point}"/steamapps/compatdata
chown 1000:1000 "${mount_point}"/steamapps{,/compatdata}
- mkdir -p /home/deck/.local/share/Steam/steamapps/compatdata
- chown 1000:1000 /home/deck/.local{,/share{,/Steam{,/steamapps{,/compatdata}}}}
- mount --rbind /home/deck/.local/share/Steam/steamapps/compatdata "${mount_point}"/steamapps/compatdata
+ mkdir -p /home/${USER}/.local/share/Steam/steamapps/compatdata
+ chown 1000:1000 /home/${USER}/.local{,/share{,/Steam{,/steamapps{,/compatdata}}}}
+ mount --rbind /home/${USER}/.local/share/Steam/steamapps/compatdata "${mount_point}"/steamapps/compatdata
fi
chown 1000:1000 -- "${mount_point}"
#### SteamOS Btrfs End ####