uvms: support .desktop applications
This commit is contained in:
parent
90614bdf74
commit
3540b5aba2
3 changed files with 15 additions and 0 deletions
|
|
@ -678,6 +678,9 @@ def main(args, args_next, cleanup, ps):
|
||||||
"EXTRA_PATH": [
|
"EXTRA_PATH": [
|
||||||
f"{a}/bin" for a in app_paths
|
f"{a}/bin" for a in app_paths
|
||||||
], # noqa: E501
|
], # noqa: E501
|
||||||
|
"EXTRA_XDG_DATA_DIRS": [
|
||||||
|
f"{a}/share" for a in app_paths
|
||||||
|
], # noqa: E501
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
).encode("utf8")
|
).encode("utf8")
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,16 @@ class Processes:
|
||||||
"/run/current-system/sw/bin",
|
"/run/current-system/sw/bin",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
"XDG_DATA_DIRS": ":".join(
|
||||||
|
[
|
||||||
|
*os.environ.get("XDG_DATA_DIRS", "").split(":"),
|
||||||
|
*run.get(
|
||||||
|
"EXTRA_XDG_DATA_DIRS",
|
||||||
|
[],
|
||||||
|
),
|
||||||
|
"/run/current-system/sw/share",
|
||||||
|
],
|
||||||
|
),
|
||||||
}
|
}
|
||||||
proc = None
|
proc = None
|
||||||
try:
|
try:
|
||||||
|
|
@ -116,6 +126,7 @@ def guest_main():
|
||||||
# IDK why but I keep getting empty messages
|
# IDK why but I keep getting empty messages
|
||||||
if req == b"":
|
if req == b"":
|
||||||
print(f"Lost [{con.fileno()}]")
|
print(f"Lost [{con.fileno()}]")
|
||||||
|
ps.sources = [s for s in ps.sources if s.fileno() != con.fileno()]
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
req = json.loads(req)
|
req = json.loads(req)
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.profileRelativeSessionVariables.PATH = lib.mkForce [ "/bin\${PATH:+:}$PATH" ];
|
environment.profileRelativeSessionVariables.PATH = lib.mkForce [ "/bin\${PATH:+:}$PATH" ];
|
||||||
|
environment.profileRelativeSessionVariables.XDG_DATA_DIRS = lib.mkForce [ "/run/current-system/sw/share/\${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS" ];
|
||||||
environment.sessionVariables = env;
|
environment.sessionVariables = env;
|
||||||
environment.variables = env;
|
environment.variables = env;
|
||||||
systemd.globalEnvironment = env;
|
systemd.globalEnvironment = env;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue