diff --git a/Dockerfile b/Dockerfile index 7f6e5f2..3765da1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -179,16 +179,16 @@ # sound driver and GTK library # If you want to use sounds on docker, try `pulseaudio --start` RUN apt-get update && apt-get install -y --no-install-recommends \ - alsa pulseaudio libgtk2.0-0 && \ + alsa pulseaudio libgtk2.0-0 lightdm && \ rm -rf /var/lib/apt/lists/* # novnc # download websockify as well -RUN wget https://github.com/novnc/noVNC/archive/v1.2.0.zip && \ - unzip -q v1.2.0.zip && \ - rm -rf v1.2.0.zip && \ - git clone https://github.com/novnc/websockify /noVNC-1.2.0/utils/websockify - +RUN wget https://github.com/novnc/noVNC/archive/v1.1.0.zip && \ + unzip -q v1.1.0.zip && \ + rm -rf v1.1.0.zip && \ + git clone https://github.com/novnc/websockify /noVNC-1.1.0/utils/websockify && \ + sudo dpkg-reconfigure lightdm # Xorg segfault error # dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory) # related? https://github.com/Microsoft/WSL/issues/2016 diff --git a/run.sh b/run.sh index 9066d76..8db54bf 100755 --- a/run.sh +++ b/run.sh @@ -3,7 +3,7 @@ # 0. generate xorg.conf BUS_ID=$(nvidia-xconfig --query-gpu-info | grep 'PCI BusID' | sed -r 's/\s*PCI BusID : PCI:(.*)/\1/') -nvidia-xconfig -a --virtual=$RESOLUTION --allow-empty-initial-configuration --enable-all-gpus --busid $BUS_ID +nvidia-xconfig -a --virtual=$RESOLUTION --allow-empty-initial-configuration --enable-all-gpus --busid $BUS_ID --cool-bits=28 --use-display-device="DFP-0" --connected-monitor="DFP-0" # 1. launch X server Xorg :0 & @@ -11,7 +11,7 @@ # 2. start x11 and vnc connection # to inspect logs in detail, use --verbose -x11vnc -display :0 -passwd $VNCPASS -forever -rfbport 5900 & +x11vnc -display :0 -passwd $VNCPASS -forever -rfbport 5900 -ncache 10 & sleep 2 # wait for the server gets ready # 2.5 start audio @@ -20,7 +20,7 @@ # sleep 2 # 3. start noVNC -/noVNC-1.2.0/utils/launch.sh --vnc localhost:5900 --listen 8081 & +/noVNC-1.1.0/utils/launch.sh --vnc localhost:5900 --listen 8081 & sleep 2 echo 'running noVNC at http://docker_ip:6080/vnc_lite.html'