mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-02 21:37:24 +08:00
[docker] make it possible to disable X server access. (#2679)
This commit is contained in:
+4
-1
@@ -13,6 +13,7 @@ fi
|
|||||||
# check if running on Linux or OSX
|
# check if running on Linux or OSX
|
||||||
UNAME=$(uname -s)
|
UNAME=$(uname -s)
|
||||||
|
|
||||||
|
useX="${useX:-true}"
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# share this paparazzi directory with the container
|
# share this paparazzi directory with the container
|
||||||
@@ -40,6 +41,8 @@ SHARE_PAPARAZZI_HOME_OPTS="--volume=$PAPARAZZI_SRC:$PPRZ_HOME_CONTAINER \
|
|||||||
############################################################
|
############################################################
|
||||||
# grant access to X-Server
|
# grant access to X-Server
|
||||||
############################################################
|
############################################################
|
||||||
|
if [ $useX = "true" ]
|
||||||
|
then
|
||||||
if [ $UNAME == "Linux" ]; then
|
if [ $UNAME == "Linux" ]; then
|
||||||
XSOCK=/tmp/.X11-unix
|
XSOCK=/tmp/.X11-unix
|
||||||
XAUTH=/tmp/.docker.xauth
|
XAUTH=/tmp/.docker.xauth
|
||||||
@@ -56,7 +59,7 @@ if [ $UNAME == "Darwin" ]; then
|
|||||||
X_WINDOW_OPTS="--env=DISPLAY=192.168.99.1:0"
|
X_WINDOW_OPTS="--env=DISPLAY=192.168.99.1:0"
|
||||||
TCPPROXY="socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\""
|
TCPPROXY="socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\""
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
# Audio
|
# Audio
|
||||||
|
|||||||
Reference in New Issue
Block a user