Linux game installation guide

From Old School RuneScape Wiki
Jump to: navigation, search
  • This is a general guide for installing the official Old School RuneScape client on Linux operating systems
  • 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
  • These notes are currently taken and adapted from a personal wiki page[1], in hopes of it being useful to others, and without warranty or guarantee, so use at your own risk

Snap Package[edit | edit source]

On systems that support Snaps (such as Ubuntu), you can install an unofficial Snap of Old School RuneScape from Snapcraft:

sudo snap install runescape

Dependencies[edit | edit source]

Information[edit | edit source]

Java[edit | edit source]

  • 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[edit | edit source]

  • 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[edit | edit source]

  • 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[edit | edit source]

  • 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[edit | edit source]

Ubuntu and Debian[edit | edit source]

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

Fedora[edit | edit source]

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

openSUSE[edit | edit source]

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

Arch Linux[edit | edit source]

sudo pacman -S jre11-openjdk wmctrl p7zip

Set Default Java[edit | edit source]

  • 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[edit | edit source]

Information[edit | edit source]

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

Clean-up[edit | edit source]

  • 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[edit | edit source]

  • 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[edit | edit source]

Information[edit | edit source]

  • 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[edit | edit source]

Download Image[edit | edit source]
  • This downloads OldSchool.dmg to the /tmp/oldschool directory
wget -O '/tmp/oldschool/OldSchool.dmg' 'https://www.runescape.com/downloads/OldSchool.dmg'
Extract Files[edit | edit source]
OldSchool.dmg[edit | edit source]
  • 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[edit | edit source]
  • 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[edit | edit source]
  • 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[edit | edit source]
  • Removes the temporary /tmp/oldschool folder
rm -Rf '/tmp/oldschool'

JAR Method[edit | edit source]

  • 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[edit | edit source]
  • This downloads jagexappletviewer.jar to the ~/runescape/oldschool directory
wget -O ~/'runescape/oldschool/jagexappletviewer.jar' 'https://oldschool.runescape.com/downloads/jagexappletviewer.jar'
Install Icon[edit | edit source]
wget -O ~/'runescape/oldschool/jagexappletviewer.png' 'https://lh3.googleusercontent.com/WLvp10q8TwtyVgMsYL7gW0c7NVG5vnFcRNS7oQtTnSyWbM9kgo_MS8QZa3bsylNgZDba'

One-liner[edit | edit source]

  • 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[edit | edit source]

Create Launcher Directory[edit | edit source]

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

Desktop Launcher[edit | edit source]

Edit Launcher File[edit | edit source]

  • 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[edit | edit source]

Information[edit | edit source]
  • 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 [2]
  • 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[edit | edit source]
[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[edit | edit source]
  • 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[edit | edit source]

  • 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[edit | edit source]

Information[edit | edit source]

  • 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[edit | edit source]

  • 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[edit | edit source]

  • 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[edit | edit source]

  • 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[edit | edit source]

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

Other Java Flags[edit | edit source]

  • May be useful for fixing errors related to Java
--add-opens='java.base/java.lang=ALL-UNNAMED'
--illegal-access='warn'
  1. RoE | Wiki
  2. This is known to potentially have rendering issues with Intel graphics