mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 04:46:08 +00:00
fix: open Flatpak apps in renamed app variants (#1192)
Flatpak starts bwrap with an empty environment, so the bwrap shim lost DROIDDECK_BWRAP_SOCKET and dialled the default package's socket. The session now writes the socket name to /etc/droiddeck/bwrap-socket and the shim reads it when the variable is missing. Fixes #1092
This commit is contained in:
1 parent
99ab6dd64e
commit
31a6c3d033
4 files changed
+61
-1
No files matched your search
@@ -7,7 +7,21 @@ import socket
|
||||
import struct
|
||||
import sys
|
||||
|
||||
SOCKET = "\0" + os.environ.get("DROIDDECK_BWRAP_SOCKET", "com.droiddeck.launcher.bwrap")
|
||||
SOCKET_FILE = "/etc/droiddeck/bwrap-socket"
|
||||
|
||||
|
||||
def socket_name():
|
||||
name = os.environ.get("DROIDDECK_BWRAP_SOCKET", "")
|
||||
if not name:
|
||||
try:
|
||||
with open(SOCKET_FILE, encoding="utf-8") as f:
|
||||
name = f.read().strip()
|
||||
except OSError:
|
||||
pass
|
||||
return "\0" + (name or "com.droiddeck.launcher.bwrap")
|
||||
|
||||
|
||||
SOCKET = socket_name()
|
||||
VERSION = "bubblewrap 0.11.0 (droiddeck)"
|
||||
|
||||
NO_ARG = {
|
||||
|
||||
Reference in new issue
Block a user