fix: give x86-64 Flatpak sandboxes /proc and /dev for FEX

Flatpak's ldconfig sandbox binds neither, and FEX finds FEXServer through
/proc/self/exe, so the server never started.
This commit is contained in:
The412Banner committed 2026-10-19 22:35:01 +00:00
1 parent bc046dc631
commit f1b5d06fec
2 files changed
+4

No files matched your search

@@ -186,6 +186,8 @@ object BwrapSpawner {
if (x86) {
fex(rootfs, dir, env)?.forEach { addBind(it) }
?: throw IOException("this app is built for x86-64 and the Linux runtime has no FEX to run it")
// FEX finds FEXServer through /proc/self/exe, and Flatpak's ldconfig sandbox has neither /proc nor /dev.
for (path in listOf("/proc", "/dev")) if (binds.none { it.guest == path }) bindsFor(session, rootfs, path, path).forEach { addBind(it) }
fakeEvdev(session, rootfs, env).forEach { addBind(it) }
} else {
if (binds.any { it.guest == "/dev" }) gpu(rootfs, root, env)?.forEach { addBind(it) }
@@ -164,6 +164,8 @@ class BwrapSpawnerPlanTest {
assertNull(plan.env["VK_ICD_FILENAMES"])
assertTrue(plan.env.getValue("FEX_SERVERSOCKETPATH").endsWith(".FEXServer.Socket"))
assertEquals("/run/droiddeck-fex/config/", plan.env["FEX_APP_CONFIG_LOCATION"])
assertTrue(plan.binds.any { it.guest == "/proc" })
assertTrue(plan.binds.any { it.guest == "/dev" })
} finally {
rootfs.deleteRecursively()
}