flatpak-docs
flatpak-docs copied to clipboard
add tmpdir env var export to launch app
This allows for zypak to share the chromium singleton between instances. This is useful when apps are launched via xdg-open from other flatpaks as normally this would start another instance of the app.
This is no longer needed with flatpak 1.11.1
I've had people report issues unless this was exported
It is needed but for other reasons. Electron applications often pack their status icons or whatever inside the asar which tries to extract to /tmp/.chromium-xxxxx but /tmp is unavailable unless explicitly granted access. So they end up going nowhere.
In that case setting TMPDIR to say $XDG_CACHE_HOME/tmp allows it to be self contained while things work.
Giving access to /tmp just for that is a bad idea.
Eg. https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/blob/f83d036fb83d6302750507714c330cd2c610ef7e/src/backend/constants.ts#L75-L77
It is complicated because setting TMPDIR to a non-tmpfs ($XDG_CACHE_HOME/tmp) has other implications, like the files will persist forever on disk.
The best solution depends on the specific problem.