Skip to content

Commit

Permalink
add script to fix bwrap permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
ading2210 committed Jun 11, 2024
1 parent b8d3c92 commit 164fbbb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ Any writes to the squashfs will persist, but they will not be compressed when sa

On the regular XFCE4 image, this brings the rootfs size down to 1.2GB from 3.5GB.

#### Steam doesn't work.
Steam doesn't work out of the box due to security features in the shim kernel preventing the `bwrap` library from working. See [issue #12](https://github.com/ading2210/shimboot/issues/26#issuecomment-2151893062) for more info.

To get Steam running, install and run it normally. It will fail and show a message saying that "Steam now requires user namespaces to be enabled." Run `fix_brwap` in your terminal, relaunch Steam, and it should be working again.

## Copyright:
Shimboot is licensed under the [GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.txt). Unless otherwise indicated, all code has been written by me, [ading2210](https://github.com/ading2210).

Expand Down
22 changes: 22 additions & 0 deletions rootfs/usr/local/bin/fix_bwrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

set -e

if [ ! "$HOME_DIR" ]; then
sudo HOME_DIR="$HOME" $0
exit 0
fi

fix_perms() {
local target_file="$1"
chown root:root "$target_file"
chmod u+s "$target_file"
}

fix_perms /usr/bin/bwrap

steam_bwraps="$(find "$HOME_DIR/.steam/" -name 'srt-bwrap')"
for bwrap_bin in $steam_bwraps; do
cp /usr/bin/bwrap "$bwrap_bin"
fix_perms "$bwrap_bin"
done

0 comments on commit 164fbbb

Please sign in to comment.