| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| games:linux:2004scape_localhost [2025/12/08 11:29] – Sean Rhone | games:linux:2004scape_localhost [2025/12/17 15:21] (current) – [2004Scape] Sean Rhone |
|---|
| ===== Prerequisites ===== | ===== Prerequisites ===== |
| |
| * [[linux;distros;opensuse_tumbleweed_gnome|openSUSE Tumbleweed (GNOME)]] | * [[linux:distros:ubuntu|Ubuntu]] |
| |
| ====== Dependencies ====== | ====== Dependencies ====== |
| * https://github.com/LostCityRS/Engine-TS/tree/225?tab=readme-ov-file#dependencies | * https://github.com/LostCityRS/Engine-TS/tree/225?tab=readme-ov-file#dependencies |
| |
| sudo zypper install git-core java-25-openjdk-headless webkit2gtk3-minibrowser | sudo apt install git openjdk-25-jre-headless |
| |
| ===== Java Priority ===== | ===== Java Priority ===== |
| |
| * ''/usr/lib64/jvm/jre-25-openjdk/bin/java'' | * ''/usr/lib/jvm/java-25-openjdk-amd64/bin/java'' |
| |
| sudo update-alternatives --config 'java' | sudo update-alternatives --config 'java' |
| #!/bin/bash | #!/bin/bash |
| |
| export _JAVA_OPTIONS='--sun-misc-unsafe-memory-access=allow' | export _JAVA_OPTIONS="--sun-misc-unsafe-memory-access='allow'" |
| |
| ~/'Projects/LostCity-225-EngineTS/ext/bun' --env-file=$HOME/'Projects/LostCity-225-EngineTS/conf/localhost.env' --cwd=$HOME/'Projects/LostCity-225-EngineTS/src' run 'quickstart' | ~/'Projects/LostCity-225-EngineTS/ext/bun' --env-file=$HOME/'Projects/LostCity-225-EngineTS/conf/localhost.env' --cwd=$HOME/'Projects/LostCity-225-EngineTS/src' run 'quickstart' |
| | |
| | unset '_JAVA_OPTIONS' |
| |
| # End</code> | # End</code> |
| ~/'Projects/LostCity-225-EngineTS/ext/bun' --cwd=$HOME/'Projects/LostCity-225-EngineTS/src' run 'setup' | ~/'Projects/LostCity-225-EngineTS/ext/bun' --cwd=$HOME/'Projects/LostCity-225-EngineTS/src' run 'setup' |
| |
| zenity --title '2004Scape Updater' --text 'localhost server update complete' --icon ~/'Projects/LostCity-225-EngineTS/ext/favicon.ico' --timeout '2' --info | zenity --title '2004Scape Updater' --text 'localhost server update complete' --icon ~/'Projects/LostCity-225-EngineTS/ext/favicon.ico' --timeout '1' --info |
| |
| # End</code> | # End</code> |
| tar -czf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-2004Scape-localhost-Saves.tar.gz' -C ~/'Projects/LostCity-225-EngineTS/src/data/players' 'localhost' | tar -czf ~/'Downloads/'$(date +%Y-%m-%d-%s)'-2004Scape-localhost-Saves.tar.gz' -C ~/'Projects/LostCity-225-EngineTS/src/data/players' 'localhost' |
| |
| zenity --title '2004Scape Save Backup' --text 'Save Data Backed-up to Downloads' --icon ~/'Projects/LostCity-225-EngineTS/ext/favicon.ico' --timeout '2' --info | zenity --title '2004Scape Save Backup' --text 'Save Data Backed-up to Downloads' --icon ~/'Projects/LostCity-225-EngineTS/ext/favicon.ico' --timeout '1' --info |
| |
| # End</code> | # End</code> |
| |
| ===== 2004Scape ===== | ===== 2004Scape ===== |
| | |
| | * :!: TODO: Ubuntu |
| |
| mkdir -p ~/'.local/share/applications' && nano ~/'.local/share/applications/2004Scape-localhost.desktop' && sed -i 's/'CHANGEME'/'$USER'/g' ~/'.local/share/applications/2004Scape-localhost.desktop' && update-desktop-database --quiet ~/'.local/share/applications' | mkdir -p ~/'.local/share/applications' && nano ~/'.local/share/applications/2004Scape-localhost.desktop' && sed -i 's/'CHANGEME'/'$USER'/g' ~/'.local/share/applications/2004Scape-localhost.desktop' && update-desktop-database --quiet ~/'.local/share/applications' |
| Name=2004Scape | Name=2004Scape |
| Categories=Game; | Categories=Game; |
| Exec='/usr/libexec/libwebkit2gtk-4_1-0/MiniBrowser' --dark-mode --autoplay-policy 'allow' --private --features='-PreferPageRenderingUpdatesNear60FPS' 'http://localhost:8888/rs2.cgi' | Exec='/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1/MiniBrowser' --dark-mode --autoplay-policy 'allow' --private --features='-PreferPageRenderingUpdatesNear60FPS' 'http://localhost:8888/rs2.cgi' |
| #Exec='/bin/bash' -c "gio open 'http://localhost:8888/rs2.cgi'" | |
| Type=Application | Type=Application |
| StartupNotify=false | StartupNotify=false |
| Icon=/home/CHANGEME/Projects/LostCity-225-EngineTS/ext/favicon.ico | Icon=/home/CHANGEME/Projects/LostCity-225-EngineTS/ext/favicon.ico |
| Actions=Map;Server;Update;Saves;Notes; | Actions=Map;Server;Browser;Update;Saves;Notes; |
| |
| [Desktop Action Map] | [Desktop Action Map] |
| Exec='/bin/bash' -c "kgx -T '2004Scape - Server' -e ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-start.sh'" | Exec='/bin/bash' -c "kgx -T '2004Scape - Server' -e ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-start.sh'" |
| Name=Server - Start | Name=Server - Start |
| | |
| | [Desktop Action Browser] |
| | Exec='/bin/bash' -c "gio open 'http://localhost:8888/rs2.cgi'" |
| | Name=Launch Client (browser) |
| |
| [Desktop Action Update] | [Desktop Action Update] |
| ===== MiniBrowser ===== | ===== MiniBrowser ===== |
| |
| zypper search 'minibrowser' | apt search 'webkit2gtk' |
| |
| sudo zypper install 'webkit2gtk3-minibrowser' | sudo apt install 'libwebkit2gtk-4.1-0' |
| |
| ls '/usr/libexec/libwebkit'*'/MiniBrowser' | dpkg-query -L 'libwebkit2gtk-4.1-0' | grep 'MiniBrowser' |
| |
| * Interestingly defaults to Pixel texture filtering (no need to toggle from Auto) | * Interestingly defaults to Pixel texture filtering (no need to toggle from Auto) |
| * :?: TODO: Test from battery (would randomly crash but seemingly fine on AC) | * :?: TODO: Test from battery (would randomly crash but seemingly fine on AC) |
| |
| '/usr/libexec/libwebkit2gtk-4_1-0/MiniBrowser' --dark-mode --autoplay-policy 'allow' --private --features='-PreferPageRenderingUpdatesNear60FPS' 'http://localhost:8888/rs2.cgi' | '/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1/MiniBrowser' --dark-mode --autoplay-policy 'allow' --private --features='-PreferPageRenderingUpdatesNear60FPS' 'http://localhost:8888/rs2.cgi' |
| |