Use commands from hostsystem

I have made a a custom Minecraft Launcher (PyQt) that I want to bring on Flathub. I have currently 2 problems with using commands from Hostsystem:

  1. The user can set a custom Java executable, which is needed for some older or modded versions. e.g. the User has a Arch based system and installs the jre8-openjdk package, he or she should be able to use /usr/lib/jvm/java-8-openjdk/jre/bin as Java Executable.

  2. The latest Beta on my PC (not on GitLab yet) supports Gamemode. This is done by simple put gamemoderun before the command to start Minecraft, if it is installed on the host system. How can I access gamemoderun from Flatpak?

Thanks for contributing!

I believe the eady solution would be to: have read only access to the /usr/lib/jvm path (which I hope is a standard) and underneath the path selector tell users they can gain access to more paths by using Flatseal.

Same thing could be done for gamemode

I figured out, that gamemode does not depend on a kernel module, so it can be included in a Flatpak. The host /usr is mounted at /run/host, so the User needs to change the path.