mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-17 08:34:26 -04:00
fix chrome trying to use novnc in docker when its not available
This commit is contained in:
parent
beefe69b74
commit
497d3e9c2d
2 changed files with 8 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue