Skip to content

Commit

Permalink
Patch gzserver to run headless using xvfb
Browse files Browse the repository at this point in the history
to avoid host/platform specific x11 quirks
exposed by vscode automatic x11 forwarding

This is needed to provide gazebo a virtual frame buffer
as it still need one after all these years.
This also avoids the need modifying launch files to call xvfb-run

- microsoft/vscode-remote-release#8031
- gazebosim/gazebo-classic#1602
  • Loading branch information
ruffsl committed Apr 4, 2023
1 parent 1c44200 commit e621c4c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ RUN cd $GZWEB_WS && . /usr/share/gazebo/setup.sh && \
xvfb-run -s "-screen 0 1280x1024x24" ./deploy.sh -m local && \
ln -s $GZWEB_WS/http/client/assets http/client/assets/models

# patch gzsever
RUN GZSERVER=$(which gzserver) && \
mv $GZSERVER $GZSERVER.orig && \
echo '#!/bin/bash' > $GZSERVER && \
echo 'xvfb-run -s "-screen 0 1280x1024x24" gzserver.orig "$@"' >> $GZSERVER && \
chmod +x $GZSERVER

# install foxglove dependacies
RUN apt-get install -y --no-install-recommends \
caddy \
Expand Down

0 comments on commit e621c4c

Please sign in to comment.