Skip to content

Commit

Permalink
fix: Add workaround for issue when image is created with "docker comm…
Browse files Browse the repository at this point in the history
…it" (#57)
  • Loading branch information
Tiryoh authored Jul 9, 2024
1 parent c5c85e4 commit 040f805
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions melodic/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ VNCRUN_PATH="$HOME/.vnc/vnc_run.sh"
cat << EOF > "$VNCRUN_PATH"
#!/bin/sh
# Workaround for issue when image is created with "docker commit".
# Thanks to @SaadRana17
# https://github.com/Tiryoh/docker-ros2-desktop-vnc/issues/131#issuecomment-2184156856
if [ -e /tmp/.X1-lock ]; then
rm -f /tmp/.X1-lock
fi
if [ -e /tmp/.X11-unix/X1 ]; then
rm -f /tmp/.X11-unix/X1
fi
if [ $(uname -m) = "aarch64" ]; then
LD_PRELOAD=/lib/aarch64-linux-gnu/libgcc_s.so.1 vncserver :1 -fg -geometry 1920x1080 -depth 24
else
Expand Down
11 changes: 11 additions & 0 deletions noetic/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ VNCRUN_PATH="$HOME/.vnc/vnc_run.sh"
cat << EOF > "$VNCRUN_PATH"
#!/bin/sh
# Workaround for issue when image is created with "docker commit".
# Thanks to @SaadRana17
# https://github.com/Tiryoh/docker-ros2-desktop-vnc/issues/131#issuecomment-2184156856
if [ -e /tmp/.X1-lock ]; then
rm -f /tmp/.X1-lock
fi
if [ -e /tmp/.X11-unix/X1 ]; then
rm -f /tmp/.X11-unix/X1
fi
if [ $(uname -m) = "aarch64" ]; then
LD_PRELOAD=/lib/aarch64-linux-gnu/libgcc_s.so.1 vncserver :1 -fg -geometry 1920x1080 -depth 24
else
Expand Down

0 comments on commit 040f805

Please sign in to comment.