Commit 6a819ffb authored by intrigeri's avatar intrigeri

Explicitly set the Unsafe Browser's WM_CLASS (refs: #15708)

… otherwise it appears as "Tor Browser" in the taskbar.
parent 263e2b59
...@@ -267,12 +267,14 @@ run_browser_in_chroot () { ...@@ -267,12 +267,14 @@ run_browser_in_chroot () {
local browser_name="${2}" local browser_name="${2}"
local chroot_user="${3}" local chroot_user="${3}"
local local_user="${4}" local local_user="${4}"
local human_readable_name="${5}"
local profile="$(browser_profile_dir ${browser_name} ${chroot_user})" local profile="$(browser_profile_dir ${browser_name} ${chroot_user})"
sudo -u "${local_user}" xhost "+SI:localuser:${chroot_user}" sudo -u "${local_user}" xhost "+SI:localuser:${chroot_user}"
chroot "${chroot}" sudo -u "${chroot_user}" /bin/sh -c \ chroot "${chroot}" sudo -u "${chroot_user}" /bin/sh -c \
". /usr/local/lib/tails-shell-library/tor-browser.sh && \ ". /usr/local/lib/tails-shell-library/tor-browser.sh && \
exec_firefox -DISPLAY='${DISPLAY}' \ exec_firefox -DISPLAY='${DISPLAY}' \
--class='${human_readable_name}' \
-profile '${profile}'" -profile '${profile}'"
sudo -u "${local_user}" xhost "-SI:localuser:${chroot_user}" sudo -u "${local_user}" xhost "-SI:localuser:${chroot_user}"
} }
...@@ -113,7 +113,8 @@ fi ...@@ -113,7 +113,8 @@ fi
echo "* Starting Unsafe Browser" echo "* Starting Unsafe Browser"
run_browser_in_chroot "${CHROOT}" "${BROWSER_NAME}" "${BROWSER_USER}" \ run_browser_in_chroot "${CHROOT}" "${BROWSER_NAME}" "${BROWSER_USER}" \
"${SUDO_USER}" || \ "${SUDO_USER}" \
"${HUMAN_READABLE_NAME}" || \
error "`gettext \"Failed to run browser.\"`" error "`gettext \"Failed to run browser.\"`"
echo "* Exiting the Unsafe Browser" echo "* Exiting the Unsafe Browser"
......
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