RuneScape NXT always start with fixed size on Linux


#1

RuneScape NXT client remember last screen size. So every time you restart it start with previous screen size. I prefer playing on fixed size (small screen) when i am AFKing. Only when bossing/raid etc… i play in full screen.

NXT save client size on exit to file ~/.runescape

I modifed the file to suit the client size i wanted.

[Preferences]
splash=/home/boby/Jagex/launcher/splash6.gif
[Persistent_Options]
[Persistent_Options/Window]
[Persistent_Options/Window/frame]
x=868
y=285
w=801
h=660
Maximized=0
Iconized=0

I want this file reset every time before NXT start, so it always use fixed size. I did try chattr +i to make this file non writable, then NXT save lot of .runescapeRANDOM-NAME_HERE file in my home directory.

I edited the file /usr/bin/runescape-launcher and added

rm -f /home/boby/.runescape
cp /home/boby/www/my-pc/.runescape-default /home/boby/.runescape

the full content of the file is

[email protected]:~ $ cat  /usr/bin/runescape-launcher
#!/bin/sh

if [ -z $1 ]; then
    configURI=http://www.runescape.com/k=5/l=\$\(Language:0\)/jav_config.ws
else
    configURI=$1
    shift
fi

rm -f /home/boby/.runescape
cp /home/boby/www/my-pc/.runescape-default /home/boby/.runescape

export PULSE_PROP_OVERRIDE="application.name='RuneScape' application.icon_name='runescape' media.role='game'"
export SDL_VIDEO_X11_WMCLASS="RuneScape"
export MESA_GL_VERSION_OVERRIDE=3.0
unset XMODIFIERS
/usr/share/games/runescape-launcher/runescape --configURI $configURI [email protected]
[email protected]:~ $ 

I copied the default settings to folder /home/boby/www/my-pc/.runescape-default

/home/boby is my home directory, replace it with your own or $HOME may work, i don’t test it.