mirror of
https://github.com/Kron4ek/Conty
synced 2024-11-16 19:50:06 +01:00
Check if X11 display already exists
This commit is contained in:
parent
bf11b6e631
commit
de0ffb94be
1 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,7 @@ mount_point="${working_dir}"/mnt
|
|||
# a problem with mounting the image due to an incorrectly calculated offset.
|
||||
|
||||
# The size of this script
|
||||
scriptsize=28712
|
||||
scriptsize=28814
|
||||
|
||||
# The size of the utils.tar.gz archive
|
||||
# utils.tar.gz contains bwrap, squashfuse and dwarfs binaries
|
||||
|
@ -824,6 +824,10 @@ if [ "$(ls "${mount_point}" 2>/dev/null)" ] || \
|
|||
|
||||
xephyr_display="$((${script_id}+2))"
|
||||
|
||||
if [ -S /tmp/.X11-unix/X${xephyr_display} ]; then
|
||||
xephyr_display="$((${script_id}+10))"
|
||||
fi
|
||||
|
||||
QUIET_MODE=1 DISABLE_NET=1 SANDBOX_LEVEL=2 run_bwrap \
|
||||
--bind /tmp/.X11-unix /tmp/.X11-unix \
|
||||
Xephyr -noreset -ac -br -screen ${XEPHYR_SIZE} :${xephyr_display} &>/dev/null & sleep 1
|
||||
|
|
Loading…
Reference in a new issue