Last active
September 13, 2022 13:33
-
-
Save kevinlekiller/33be65aefaccdfffe896c2d8deac282a to your computer and use it in GitHub Desktop.
Download RuneScape 3 launcher and sandbox it with firejail, with vkBasalt on top.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# GPLv2 | |
# Start like this to update RuneScape launcher: UPDATE_RUNESCAPE=1 ./run.sh | |
#-------------------------------------------- | |
WD=$(realpath "$(dirname "$0")") | |
runescape=$(realpath "$WD/runescape") | |
UPDATE_RUNESCAPE=${UPDATE_RUNESCAPE:-0} | |
if [[ ! $UPDATE_RUNESCAPE -eq 0 ]]; then | |
rm -f "$runescape" | |
fi | |
if [[ ! -f $runescape ]]; then | |
echo "Updating Runescape." | |
tmpdir=/tmp/runescape-launcher | |
rm -rf "$tmpdir" | |
mkdir -p "$tmpdir" || exit 1 | |
cd "$tmpdir" || exit 1 | |
curl -Ls -o runescape.PKGBUILD "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=runescape-launcher" || exit 1 | |
pkgver=$(grep ^pkgver runescape.PKGBUILD | cut -d= -f2) | |
[[ -z $pkgver ]] && exit 1 | |
pkgname=$(grep ^pkgname runescape.PKGBUILD | cut -d= -f2) | |
[[ -z $pkgname ]] && exit 1 | |
curl -Ls -o runescape-launcher.deb "https://content.runescape.com/downloads/ubuntu/pool/non-free/r/$pkgname/${pkgname}_${pkgver}_amd64.deb" || exit 1 | |
7z x runescape-launcher.deb || exit 1 | |
tar -xf data.tar || exit 1 | |
cd "$WD" || exit 1 | |
mv "$tmpdir"/usr/share/games/runescape-launcher/runescape . || exit 1 | |
rm -rf "$tmpdir" | |
fi | |
chmod u+x "$runescape" | |
ENABLE_VKBASALT=1 MANGOHUD=1 VKBASALT_CONFIG_FILE=~/.config/vkBasalt/vkBasaltRuneScape.conf gamescope --fullscreen -- \ | |
firejail --nogroups --nodbus --nou2f --private-dev --private-tmp --seccomp \ | |
--whitelist=~/.runescape --noblacklist=~/.runescape \ | |
--whitelist=~/Jagex --noblacklist=~/Jagex \ | |
--whitelist="$WD" --noblacklist="$WD" \ | |
--env=PULSE_LATENCY_MSEC=128 "$runescape" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment