mirror of
https://github.com/Kron4ek/Conty
synced 2024-12-26 09:58:38 +01:00
Bind XAUTHORITY file
This is required for any graphical application to work (to connect to X server) when SANDBOX is enabled. Another possible solution is to allow any local user to connect to X server by using xhost, but binding XAUTHORITY is simpler.
This commit is contained in:
parent
85e0b8c837
commit
409a08d196
1 changed files with 7 additions and 1 deletions
|
@ -40,7 +40,7 @@ mount_point="${working_dir}"/mnt
|
||||||
# a problem with mounting the squashfs image due to an incorrectly calculated offset.
|
# a problem with mounting the squashfs image due to an incorrectly calculated offset.
|
||||||
|
|
||||||
# The size of this script
|
# The size of this script
|
||||||
scriptsize=18030
|
scriptsize=18217
|
||||||
|
|
||||||
# The size of the utils.tar archive
|
# The size of the utils.tar archive
|
||||||
# utils.tar contains bwrap and squashfuse binaries
|
# utils.tar contains bwrap and squashfuse binaries
|
||||||
|
@ -331,6 +331,11 @@ run_bwrap () {
|
||||||
dirs="${dirs} ${bind}"
|
dirs="${dirs} ${bind}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set XAUTHORITY variable if it's missing (which is unlikely)
|
||||||
|
if [ -z "${XAUTHORITY}" ]; then
|
||||||
|
XAUTHORITY="${HOME}"/.Xauthority
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
||||||
"${bwrap}" --ro-bind "${mount_point}" / \
|
"${bwrap}" --ro-bind "${mount_point}" / \
|
||||||
|
@ -348,6 +353,7 @@ run_bwrap () {
|
||||||
${dirs} \
|
${dirs} \
|
||||||
${net} \
|
${net} \
|
||||||
${nvidia_driver_bind} \
|
${nvidia_driver_bind} \
|
||||||
|
--ro-bind-try "${XAUTHORITY}" "${XAUTHORITY}" \
|
||||||
--setenv PATH "${CUSTOM_PATH}" \
|
--setenv PATH "${CUSTOM_PATH}" \
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue