android-studio / entrypoint.sh
binary1ne's picture
Create entrypoint.sh
44e3507 verified
raw
history blame
434 Bytes
#!/bin/bash
set -e
# Start virtual display
Xvfb :0 -screen 0 $RESOLUTION &
# Start window manager
fluxbox &
# Start VNC server
x11vnc -display :0 -forever -passwd $VNC_PASSWORD -listen 0.0.0.0 -xkb -rfbport $VNC_PORT &
# If HOST_DISPLAY is set, connect to host display
if [ "$HOST_DISPLAY" == "1" ]; then
echo "Using host display"
exec android-studio
else
echo "Starting with dummy display"
exec android-studio
fi