Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docker/mac/RosDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ RUN rm -rf /usr/local/lib/python3.10/dist-packages/setuptools \
# RViz's display: Xvfb with Mesa's software OpenGL, shown over VNC (x11vnc) and
# in a browser (noVNC on websockify), started by vnc_display.sh, the entrypoint.
# A Mac has no X server a container can render OpenGL through (docs/MAC.md).
# matchbox-window-manager fits each window to the screen: the RViz configs keep
# the lab monitors' window geometry, which lies off a 1280x800 display.
RUN apt-get update && apt-get install -y --no-install-recommends \
xvfb x11vnc novnc python3-websockify \
xvfb x11vnc novnc python3-websockify matchbox-window-manager \
&& rm -rf /var/lib/apt/lists/*
COPY docker/mac/vnc_display.sh /opt/golem/vnc_display.sh
ENTRYPOINT ["/opt/golem/vnc_display.sh"]
5 changes: 4 additions & 1 deletion docker/mac/vnc_display.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
# A Mac has no X server a container can render through (XQuartz gives no
# OpenGL on Apple Silicon), so RViz draws on Xvfb display :99 with Mesa's
# software OpenGL (llvmpipe), shown by x11vnc on port 5901 and by noVNC in a
# browser on port 6080. The containers run on the VM's host network, which
# browser on port 6080; matchbox-window-manager fits each window to the screen
# (the RViz configs keep the lab monitors' window geometry, off this display).
# The containers run on the VM's host network, which
# OrbStack and Docker Desktop forward to the Mac's localhost:
# http://localhost:6080/vnc.html or vnc://localhost:5901 (Screen Sharing)
# Environment: DISPLAY (:99, docker-compose.mac.yml); GOLEM_VNC=0 starts no
Expand All @@ -33,6 +35,7 @@ start_display() {
echo "vnc_display: Xvfb did not start on $display (/tmp/xvfb.log)" >&2
return 0
fi
DISPLAY=$display matchbox-window-manager -use_titlebar no >/tmp/wm.log 2>&1 &
# No password: the VM's network is reachable only from the Mac.
x11vnc -display "$display" -rfbport 5901 -forever -shared -nopw -quiet \
>/tmp/x11vnc.log 2>&1 &
Expand Down
Loading