Skip to content

Instantly share code, notes, and snippets.

@thwarted
Created December 25, 2015 22:52
Show Gist options
  • Save thwarted/c237c9c84ac69efe73ce to your computer and use it in GitHub Desktop.
Save thwarted/c237c9c84ac69efe73ce to your computer and use it in GitHub Desktop.
some simple scripts to invoke steam as a separate user for non-robust filesystem isolation
#!/bin/bash -x
if [[ -z "$XTXAUTH" ]]; then
echo "XTXAUTH not set, was this invoked correctly?"
exit 1
fi
unset XAUTHORITY
server=$( echo "$XTXAUTH" | awk '{ print $1 }' )
xauth add $XTXAUTH
export DISPLAY=$XTDISPLAY
unset XTDISPLAY XTXAUTH
eval $( pax11publish -i )
# xterm -bg black -fg white &
"$@"
wait
xauth remove "$server"
#!/bin/bash -x
for p in /run/user/$UID{,/pulse}; do
chmod o+x "$p"
done
exec sudo XTXAUTH="$( xauth list | head -n 1 )" XTDISPLAY=$DISPLAY -i -u steam bin/invoke "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment