| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| games:linux:2004scape_localhost [2025/12/06 20:16] – [Dependencies] 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> |
| * https://drive.google.com/file/d/1wdYpwoCka8r7ZuIzPn1CHy13_4aP9oSq/view?usp=sharing | * https://drive.google.com/file/d/1wdYpwoCka8r7ZuIzPn1CHy13_4aP9oSq/view?usp=sharing |
| * ''SC55_zzdenis_v0.5.sf2'' | * ''SC55_zzdenis_v0.5.sf2'' |
| * Symlink above ''zenity'' line | |
| |
| mkdir -p ~/'Projects/LostCity-225-EngineTS/ext' && sha384sum ~/'Downloads/SC55_zzdenis_v0.5.sf2' | grep 'f386f638777072fc220e39afbd7efcd227ca2bfcf13403bf47fbb2e2b8f4d151239710cc36c8530a75c3b4c3f55066b7' > '/dev/null' && mv -f ~/'Downloads/SC55_zzdenis_v0.5.sf2' ~/'Projects/LostCity-225-EngineTS/ext' | mkdir -p ~/'Projects/LostCity-225-EngineTS/ext' && sha384sum ~/'Downloads/SC55_zzdenis_v0.5.sf2' | grep 'f386f638777072fc220e39afbd7efcd227ca2bfcf13403bf47fbb2e2b8f4d151239710cc36c8530a75c3b4c3f55066b7' > '/dev/null' && mv -f ~/'Downloads/SC55_zzdenis_v0.5.sf2' ~/'Projects/LostCity-225-EngineTS/ext' |
| | |
| | ==== Update Script ==== |
| | |
| | * Above ''zenity'' line |
| |
| nano ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-update.sh' | nano ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-update.sh' |
| |
| ln -s -f ~/'Projects/LostCity-225-EngineTS/ext/SC55_zzdenis_v0.5.sf2' ~/'Projects/LostCity-225-EngineTS/src/public/client/SCC1_Florestan.sf2' | <code> |
| | # SC55_zzdenis_v0.5.sf2 |
| | |
| | ln -s -f ~/'Projects/LostCity-225-EngineTS/ext/SC55_zzdenis_v0.5.sf2' ~/'Projects/LostCity-225-EngineTS/src/public/client/SCC1_Florestan.sf2' |
| | |
| | # SF End</code> |
| |
| ===== Login Autofill ===== | ===== Login Autofill ===== |
| |
| * [[https://github.com/2004Scape/Server/issues/1498|#1498]] | * [[https://github.com/2004Scape/Server/issues/1498|#1498]] |
| * ''sed'' above ''zenity'' line | |
| | sed -i -e 's/usernameInput="";passwordInput=""/usernameInput="Espionage724";passwordInput="1"/g' ~/'Projects/LostCity-225-EngineTS/src/public/client/client.js' |
| | |
| | ==== Update Script ==== |
| | |
| | * Above ''zenity'' line |
| |
| nano ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-update.sh' | nano ~/'Projects/LostCity-225-EngineTS/scripts/localhost-server-update.sh' |
| |
| sed -i -e 's/usernameInput="";passwordInput=""/usernameInput="Espionage724";passwordInput="1"/g' ~/'Projects/LostCity-225-EngineTS/src/public/client/client.js' | <code> |
| | # Login Autofill |
| | |
| | sed -i -e 's/usernameInput="";passwordInput=""/usernameInput="Espionage724";passwordInput="1"/g' ~/'Projects/LostCity-225-EngineTS/src/public/client/client.js' |
| | |
| | # Autofill End</code> |
| |
| ====== Desktop Launcher ====== | ====== Desktop Launcher ====== |
| |
| ===== 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='/bin/bash' -c "gio open '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='/usr/libexec/libwebkit2gtk-4_1-0/MiniBrowser' --dark-mode --autoplay-policy 'allow' --private --features='-PreferPageRenderingUpdatesNear60FPS' '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 ===== |
| |
| sudo zypper install 'webkit2gtk3-minibrowser' | apt search 'webkit2gtk' |
| | |
| | sudo apt install 'libwebkit2gtk-4.1-0' |
| | |
| | dpkg-query -L 'libwebkit2gtk-4.1-0' | grep 'MiniBrowser' |
| |
| ls '/usr/libexec/libwebkit'*'/MiniBrowser' | * Interestingly defaults to Pixel texture filtering (no need to toggle from Auto) |
| | * :?: 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' |
| |