1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-08-09 16:17:10 +02:00

fix chrome trying to use novnc in docker when its not available

This commit is contained in:
Nick Sweeting
2024-10-04 22:29:32 -07:00
parent beefe69b74
commit 497d3e9c2d
2 changed files with 8 additions and 2 deletions

View File

@@ -81,6 +81,13 @@ else
mkdir -p "$DATA_DIR/logs"
fi
# check if novnc x11 $DISPLAY is available
export DISPLAY="${DISPLAY:-"novnc:0.0"}"
if ! xdpyinfo > /dev/null 2>&1; then
# cant connect to x11 display, unset it so that chrome doesn't try to connect to it and hang indefinitely
unset DISPLAY
fi
# force set the ownership of the data dir contents to the archivebox user and group
# this is needed because Docker Desktop often does not map user permissions from the host properly
chown $PUID:$PGID "$DATA_DIR"