Linux game installation guide

From Illerai
Jump to navigation Jump to search

This is a general guide for installing the official Old School RuneScape client on Linux operating systems. An easier alternative may be to use a third party client that supports Linux, such as RuneLite.

This guide will not cater to every set-up possible, but hopefully will help as a base for adaptation to other set-ups. This guide currently expects BASH and a desktop environment compliant with the XDG Desktop Entry specification.

Downloading the Jagex Launcher on Linux

This section is copied verbatim from the Jagex website. It is copyrighted by Jagex.

The Jagex launcher and Jagex Accounts will not be supported on the Linux OS.

If you wish to continue playing on a Linux machine you will have to use a mechanism that enables Windows applications to operate. There are community projects available that you can try such as:

Jagex is not responsible for the maintenance and safety of content produced and hosted by third parties and any use of third-party sites is at your own risk.

RoE | Wiki

  • These notes allow the Jagex Launcher and the C++ GPU-accelerated Old School RuneScape game client to run with Wine Staging from an isolated Wine Prefix
  • These notes aim for the least amount of dependencies and does not utilize Lutris, Proton, or Flatpak. You only need wine!
  • These notes come from a personal, non-affiliated wiki page with no guarantees. Be safe and read and understand the commands provided before executing them!

Requirements

  • Wine Staging (non-Staging wasn't tested, see WineHQ if your distro does not provide Staging)

Installation

Launch

Other Information

  • The notes were primarily tested on Fedora 38 and most of its Workstation defaults (GNOME, bash, systemd)
  • If framerate is unexpectedly low, try adding MESA_LOADER_DRIVER_OVERRIDE=zink
  • If the client was fullscreen when closed, it may start in an odd state that's fullscreen and not. Toggling the fullscreen option from the log-in screen or in-game fixes this

Java

Information

Java

  • Old School RuneScape currently requires a Java runtime to execute
  • The two most popular options are OpenJDK, and Oracle's version of Java
  • Most distributions will have a version of OpenJDK in their default repositories
  • Some distributions may come with a version of OpenJDK installed, but it is important to make sure a non-headless version is installed
  • If your distribution offers JRE and JDK versions of OpenJDK, JRE is preferred, but if it isn't provided explicitly, JDK will also work fine
  • Use your distribution's package manager to install a version of OpenJDK
  • OpenJDK versions 8, 9, 10, 11, 12, and 13 were tested and confirmed working
  • As of February 2021, OpenJDK / Oracle Java version 15 is not working because the required Pack200 class has been removed.
  • If the client does not work using OpenJDK, try using the Oracle Java package for your distribution instead

7z

  • 7z is being used in order to extract the necessary files from the .dmg installer provided by Jagex
  • The .dmg installer is being used in order to workaround a minor issue with the copyright footer not disappearing upon successful log-in
  • This package is not a hard requirement

wmctrl

  • wmctrl can be used to change the state of the Old School RuneScape window, allowing for a toggle between windowed and fullscreen states
  • This package is optional

Other packages

  • notify-send is used in the Desktop Launcher to send notifications when manually updating the client, and is optional
  • wget is used to download files, and while useful to have, can be substituted for aria2, or any other preferred command-line download tool. It's not included in all distributions (ie. Arch)
  • gvfs is needed to open links (to this wiki, or the official website) in the browser (optional)

Specific-distributions

Ubuntu and Debian

sudo apt install openjdk-17-jre wmctrl p7zip-full

Fedora

sudo dnf install java-11-openjdk wmctrl p7zip-plugins

openSUSE

sudo zypper install java-11-openjdk wmctrl p7zip-full

Arch Linux

sudo pacman -S jre11-openjdk wmctrl p7zip

Set Default Java

  • This allows you to set and/or confirm the default Java executable being used system-wide
  • Some distros automatically set the non-headless version of Java as-default upon installing the package
sudo update-alternatives --config 'java'

Installation

Information

  • The following commands install Old School RuneScape to ~/runescape/oldschool

Clean-up

  • This is ran to potentially clean-up an older attempt to install Old School RuneScape
  • If this is a first-time installation, this command does not need to be ran, but it also won't hurt anything if it's ran at this point during the installation either
rm -Rf ~/'runescape/oldschool' '/tmp/oldschool'

Create Directories

  • This creates the main ~/runescape/oldschool directory, along with a temporary /tmp/oldschool folder to download and extract the initial installation files
mkdir -p ~/'runescape/oldschool' '/tmp/oldschool'

Install JAR File

Information

  • There are two methods to proceed
  • The first method includes extracting jagexappletviewer.jar from the macOS client OldSchool.dmg file, allowing the best desktop integration across all operating systems, and the hiding of the copyright-footer regardless of Java version
  • The second method includes downloading jagexappletviewer.jar as-is and potentially having the copyright footer being shown at all times
  • The first method requires 7z as an extra dependency
  • The second method has no additional dependencies

macOS Client Method

Download Image
  • This downloads OldSchool.dmg to the /tmp/oldschool directory
wget -O '/tmp/oldschool/OldSchool.dmg' 'https://www.runescape.com/downloads/OldSchool.dmg'
Extract Files
OldSchool.dmg
  • This extracts the files from OldSchool.dmg into the /tmp/oldschool/OldSchool-dmg folder
7z e -o'/tmp/oldschool/OldSchool-dmg' -y '/tmp/oldschool/OldSchool.dmg'
Install JAR
  • This copies jagexappletviewer.jar from the /tmp/oldschool/OldSchool-dmg folder into the ~/runescape/oldschool folder
cp '/tmp/oldschool/OldSchool-dmg/jagexappletviewer.jar' ~/'runescape/oldschool/jagexappletviewer.jar'
Install Icon
  • This copies OSRS.icns from the /tmp/oldschool/OldSchool-dmg folder into the ~/runescape/oldschool folder
cp '/tmp/oldschool/OldSchool-dmg/OSRS.icns' ~/'runescape/oldschool/OSRS.icns'
Clean-up
  • Removes the temporary /tmp/oldschool folder
rm -Rf '/tmp/oldschool'

JAR Method

  • This is the second method involving the direct JAR file
  • Either continue on with this method, or return back up the page if you wish to go with the first method involving the macOS client
Download and Install JAR
  • This downloads jagexappletviewer.jar to the ~/runescape/oldschool directory
wget -O ~/'runescape/oldschool/jagexappletviewer.jar' 'https://oldschool.runescape.com/downloads/jagexappletviewer.jar'
Install Icon
wget -O ~/'runescape/oldschool/jagexappletviewer.png' 'https://lh3.googleusercontent.com/WLvp10q8TwtyVgMsYL7gW0c7NVG5vnFcRNS7oQtTnSyWbM9kgo_MS8QZa3bsylNgZDba'

One-liner

  • Performs the macOS client download, extraction of jagexappletviewer.jar and OSRS.icns, and clean-up of temporary files
  • Provided for convenience
rm -Rf ~/'runescape/oldschool' '/tmp/oldschool' && mkdir -p ~/'runescape/oldschool' '/tmp/oldschool' && wget -O '/tmp/oldschool/OldSchool.dmg' 'https://www.runescape.com/downloads/OldSchool.dmg' && 7z e -o'/tmp/oldschool/OldSchool-dmg' -y '/tmp/oldschool/OldSchool.dmg' && cp '/tmp/oldschool/OldSchool-dmg/jagexappletviewer.jar' ~/'runescape/oldschool/jagexappletviewer.jar' && cp '/tmp/oldschool/OldSchool-dmg/OSRS.icns' ~/'runescape/oldschool/OSRS.icns' && rm -Rf '/tmp/oldschool' && sync

Desktop Launcher

Create Launcher Directory

  • This creates the ~/.local/share/applications folder if it doesn't exist
mkdir -p ~/'.local/share/applications'

Desktop Launcher

Edit Launcher File

  • This opens a text editor to edit the Old School RuneScape.desktop file that will be created upon saving
  • nano can be replaced with your preferred text editor
nano ~/'.local/share/applications/Old School RuneScape.desktop'

Desktop Launcher Contents

Information
  • Read this section carefully
  • You can edit some of the text contents below, but otherwise, you can copy and paste it as-is if you're happy with the defaults and meet all file requirements mentioned
  • Do not change any text labelled CHANGEME, as this is handled later with another command
  • The following desktop launcher contents expects the following:
  • Expects /usr/bin/java to link to your default, non-headless Java runtime executable
  • Expects /usr/bin/wmctrl to exist to allow toggling windowed and fullscreen states
  • Expects /bin/bash to exist for running a series of commands to perform maintenance of the client
  • Expects cp, rm, 7z, notify-send, and sync to exist in PATH with BASH
  • This also assumes your Linux distribution uses ideal, default Java flags for memory allocation and garbage collection
  • Hardware-acceleration can be enabled by changing the -Dsun.java2d.opengl flag from false to true [1]
  • UI scaling is possible with the -Dsun.java2d.uiScale flag, and can be set to a value of 2 or higher to increase the UI size
Contents
[Desktop Entry]
Name=Old School RuneScape
Comment=Relive the challenging levelling system and risk-it-all PvP of the biggest retro styled MMO. Play with millions of other players in this piece of online gaming heritage where the community controls the development so the game is truly what you want it to be!
Categories=Game;Java;AdventureGame;RolePlaying
Exec='/usr/bin/java' -Duser.home='/home/CHANGEME/runescape/oldschool' -Djava.class.path='/home/CHANGEME/runescape/oldschool/jagexappletviewer.jar' -Dcom.jagex.config='http://oldschool.runescape.com/jav_config.ws' -Dhttps.protocols='TLSv1.2' -Xms'768M' -Xmx'768M' -Djava.system.class.loader='app.systemclassloader' -Dswing.crossplatformlaf='com.sun.java.swing.plaf.gtk.GTKLookAndFeel' -Dsun.java2d.opengl='false' -Dsun.java2d.uiScale='1' 'jagexappletviewer' 'oldschool'
Type=Application
StartupNotify=true
Path=/home/CHANGEME/runescape/oldschool
Icon=/home/CHANGEME/runescape/oldschool/OSRS.icns
StartupWMClass=jagexappletviewer
Actions=GL;Screen;Cache;

[Desktop Action GL]
Exec='/usr/bin/java' -Duser.home='/home/CHANGEME/runescape/oldschool' -Djava.class.path='/home/CHANGEME/runescape/oldschool/jagexappletviewer.jar' -Dcom.jagex.config='http://oldschool.runescape.com/jav_config.ws' -Dhttps.protocols='TLSv1.2' -Xms'768M' -Xmx'768M' -Djava.system.class.loader='app.systemclassloader' -Dswing.crossplatformlaf='com.sun.java.swing.plaf.gtk.GTKLookAndFeel' -Dsun.java2d.opengl='true' -Dsun.java2d.uiScale='1' 'jagexappletviewer' 'oldschool'
Name=Start with OpenGL acceleration

[Desktop Action Screen]
StartupNotify=false
Exec='/usr/bin/wmctrl' -r 'Old School RuneScape' -b toggle,fullscreen -F
Name=Toggle Fullscreen/Windowed

[Desktop Action Cache]
StartupNotify=false
Exec='/bin/bash' -c "rm -Rf '/home/CHANGEME/runescape/oldschool/jagexcache' '/home/CHANGEME/runescape/oldschool/jagexappletviewer.preferences' '/home/CHANGEME/runescape/oldschool/jagex_cl_oldschool_LIVE.dat' '/home/CHANGEME/runescape/oldschool/random.dat' '/home/CHANGEME/runescape/oldschool/'*'.log' '/home/CHANGEME/runescape/oldschool/.java' '/tmp/oldschool' && sync && notify-send 'The Old School RuneScape cache has been cleaned.'"
Name=Cache Cleanup
Set Launcher's User
  • This changes all instances of CHANGEME in Old School RuneScape.desktop with sed to the user account being used to run the command
sed -i 's/'CHANGEME'/'$USER'/g' ~/'.local/share/applications/Old School RuneScape.desktop'

Troubleshooting

  • If the launcher doesn't appear in your app launcher immediately, try reloading your shell, logging out and then back in, or rebooting the system
  • If the launcher still doesn't appear, one or more executable files may be missing, or there is a syntax error
  • If one or more audio channels in-game are not working (missing music or in-game sound effects), try using an older version of Java

Quick Commands

Information

  • Various commands for trying out different combination of command flags and diagnostics
  • Assumes Old School RuneScape is installed with the above set-up

Main Folder

  • Opens the main game folder with your default file explorer
  • If gio open doesn't work, xdg-open may work
gio open ~/'runescape/oldschool'
xdg-open ~/'runescape/oldschool'

Execute

  • Base execution command with minimal Java flags
cd ~/'runescape/oldschool' && java -Duser.home='.' -Djava.class.path='jagexappletviewer.jar' -Dcom.jagex.config='http://oldschool.runescape.com/jav_config.ws' 'jagexappletviewer' 'oldschool'

Additional Java Flags

  • All of these flags can have different settings
-Dhttps.protocols='TLSv1.2'
-Dawt.useSystemAAFontSettings='on'
-Dsun.java2d.opengl='True'
-Dsun.java2d.xrender='True'
-Dsun.java2d.uiScale='2'

Default Java Flags

  • This command will show the Java flags set by-default
java -XX:+PrintCommandLineFlags --version

Other Java Flags

  • May be useful for fixing errors related to Java
--add-opens='java.base/java.lang=ALL-UNNAMED'
--illegal-access='warn'

Other Set-up Notes

  1. ^ This is known to potentially have rendering issues with Intel graphics