multimc: fix instances not running because of missing permissions #6216
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When starting an instance, in the logs, a failed attempt to load the lwjgl library is shown and the game doesn't run.
The library is in the /tmp directory. The reason for this appears to be, in the lwjgl source code, the shared library loading function, extracts in the temporary directory and continues from there. This is fixed by whitelisting.
The reason for adding "ignore noexec /tmp" as well, is that without it, the game can't run, even if the directory is whitelisted. It seems the library needs to be loaded from /tmp.
A second error for a failed attempt to access /home/user/.cache/JNA is also shown in the logs. This is also fixed by whitelisting.
The errors which inspired the commit:
Links to the source code that should be responsible for the /tmp error:
https://github.com/LWJGL/lwjgl3/blob/56d09c39ff26ad49c74f6be6884d60ef3f597384/modules/lwjgl/core/src/main/java/org/lwjgl/system/SharedLibraryLoader.java#L51
https://github.com/LWJGL/lwjgl3/blob/56d09c39ff26ad49c74f6be6884d60ef3f597384/modules/lwjgl/core/src/main/java/org/lwjgl/system/SharedLibraryLoader.java#L137