Commit cfd1c144 authored by anonym's avatar anonym

Move env fix from caller to callee.

This way tails-additional-software-notify will open a browser with
propoer "GNOME" environment no matter who calls it.
parent 2bc052e5
......@@ -6,6 +6,8 @@ import os.path
import subprocess
import sys
from tailslib.gnome import gnome_env_vars
import gi
from gi.repository import GLib
......@@ -56,7 +58,9 @@ class ASPNotifier(object):
elif action == "deny":
sys.exit(3)
elif action == "documentation":
subprocess.Popen(["tails-documentation", user_data])
subprocess.Popen(
["env", *gnome_env_vars(), "tails-documentation", user_data]
)
sys.exit(5)
def cb_notification_closed(self, notification):
......
......@@ -23,8 +23,6 @@ from tailslib.additionalsoftware import (
get_packages_list_path,
remove_additional_packages)
from tailslib.gnome import gnome_env_vars
from tailslib.persistence import (
has_unlocked_persistence,
has_persistence,
......@@ -112,7 +110,6 @@ def _notify(title, body="", accept_label="", deny_label="",
completed_process = subprocess.run(
[
"sudo", "-u", LIVE_USERNAME,
'env', *gnome_env_vars(),
cmd, title, body, accept_label, deny_label,
documentation_target, urgent
],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment