Closed svin24 closed 1 year ago
As noted in https://github.com/runelite/runelite/pull/11921#issuecomment-646206980,
The Jagex client writes several files into
$HOME
which [...] we can't move easily.
Those are all Jagex files, not RuneLite files, so this should probably be reported to Jagex as a bug/feature request.
I've been using the _JAVA_OPTIONS
workaround mentioned in runelite/runelite#3162 in a Desktop Entry to launch the Linux AppImage and it works well. Note that everything, including the .runelite
directory, will be at this location.
[Desktop Entry]
Type=Application
Terminal=false
Name=RuneLite
GenericName=Old School RuneScape client
Comment=RuneLite is a free, open-source and super fast client for Old School RuneScape
Exec=env _JAVA_OPTIONS=-Duser.home=/home/MY_USER/.local/share/runelite /home/MY_USER/path/to/RuneLite.AppImage
Icon=/home/MY_USER/.local/share/runelite/.runelite/icon.png
Keywords=runescape;osrs;
Categories=Games;
In my case, I created a runelite directory, under $XDG_DATA_HOME
(.local/share
), because that's where it made the most sense to me.
Yes, it makes sense for RuneLite to store its icon in ~/.local/share
.
Also, if you create a little executable script, you can easily move RuneLite out of $HOME
. I use a very similar script for Steam, available in the same repository: Look at my script to execute RuneLite, and feel free to use it.
I have not only created a fakehome environment to boot up RuneLite, but I have also created support for backing up the different XDG directories independently, through the usage of symlinks.
The script should be able to handle all scenarios, so it /should/ be safe to use. It takes a backup before doing anything, so worst case scenario you will have to roll back to the backup.
And, although Jagex is responsible for creating a bunch of junk files under $HOME/.runelite
, we should still use XDG standards wherever we can. Look at the following implementation I have added to "fix" the problem:
Again, the launcher script is available here: https://github.com/mazunki/scripts/blob/main/runelitelauncher, and you can just add the script to your $PATH
for it to work. I have mine as ~/.local/bin/runelitelauncher
.
Also, please let me know if you encounter any bugs, or things which could be improved. I'll gladly try to amend them andor accept pull requests.
An important caveat here is that if you at any point after generating the fakehome directory you choose to change any XDG_*
variable, the symlinks will break.
If you want to move the logs out of ~/.local/share/runelite
, just set your XDG_LOG_HOME
variable to somewhere else.
Per Adam's comment and linked commit, we've moved jagexcache into ~/.runelite
All of the RuneLite and also jagex files now reside in .runelite, without any littering of the home directory anymore. I am currently not interested in making it adhere to the xdg specification due to how difficult it is to do. This is because we do not control all of the file access done by the client.
it would be better if all the jagexcache,jagex_cl_oldschool_LIVE.dat,random.dat was located in the appropriate folder instead of littering $HOME Probably ~/.cache/jagex