Commit 36612449 authored by anonym's avatar anonym

ASP: fix AT-SPI for browser started via notification (Will-fix: #16475).

We lacked sufficient environment for AT-SPI to work for the browser
child processes started for browsing the docs.
parent 2e63aad3
GNOME_ENV_VARS="
DBUS_SESSION_BUS_ADDRESS
DISPLAY
XAUTHORITY
XDG_RUNTIME_DIR
"
export_gnome_env() {
# Get LIVE_USERNAME
. /etc/live/config.d/username.conf
local gnome_shell_pid="$(pgrep --newest --euid ${LIVE_USERNAME} gnome-shell)"
local tmp_env_file="$(tempfile)"
local vars="(DBUS_SESSION_BUS_ADDRESS|DISPLAY|XAUTHORITY)"
local vars="($(echo ${GNOME_ENV_VARS} | tr ' ' '|'))"
tr '\0' '\n' < "/proc/${gnome_shell_pid}/environ" | \
grep -E "^${vars}=" > "${tmp_env_file}"
while read line; do export "${line}"; done < "${tmp_env_file}"
......
......@@ -23,6 +23,8 @@ 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,
......@@ -110,6 +112,7 @@ 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
],
......
pythonlib @ 551524ad
Subproject commit 1629492eaec69483d05658f79c881a7d172cf02d
Subproject commit 551524ad02ec09b137c0c9b885b3b4b0bbd719aa
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