Hello,
I’m the author of a small app which load Steam’s client Shared Object file and uses them internally.
My app works fine with Steam installations via Snap, via system packages (apt, pacman…), and even on Windows.
However, after many failed attempts to make it work with Steam Flatpak files, I could not get it working. It seems as if the object loading works fine for a set amount of time ( < 3 seconds) and then all the imported functions I call fail in a way or another (logs mention broken pipes and failed IPC calls).
Is there a security feature at work that could cause some issues in this scenario? Is it just that Flatpak version this is different than others and it is unrelated to flatpak?
I’ve prepared a version of my app to use Flatpak paths specifically so you can see for yourself: GitHub - PaulCombal/SamRewritten at flatpak-test
Any thought is welcome,
Thanks
How do you attempt to load the shared object file?
Can you share the manifest you’ve used?
This is the code I use to load the library is as follows with the Libloading crate (filre in repo: create_client.rs):
pub fn load_steamclient_library() -> Result<Library, Box<dyn std::error::Error>> {
unsafe {
let steamclient_lib_path = get_steamclient_lib_path()?;
let lib_steamclient_path = PathBuf::from(steamclient_lib_path);
let lib_steamclient = Library::new(lib_steamclient_path)?;
Ok(lib_steamclient)
}
}
It’s using the defaults library loading settings.
My app is not a Flatpak app, so it does not have a manifest. Would it change the outcome if it were a Flatpak? Without sandbox, I would think it has more reasons to work.
For Steam, I’m using the default Flatpak Steam package. Changing the permissions of it in Flatseal didn’t yield any other positive result.
Thank you
Oh, my bad. I thought you wanted to create an Flatpak for your app, hence the question for the manifest.
Anyways, while running code of an Flatpak outside of its sandbox isn’t really supported, it still could work.
The Steam Flatpak does include a wrapper to make it work in the sandbox, but other than that it should be the same Steam you get from Valve…
Can’t help you there unfortunately.
It’s ok, thank you for taking the time to answer!