Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
Signed-off-by: Oguz Ozturk <[email protected]>
  • Loading branch information
oguzkaganozt committed Dec 18, 2024
1 parent c15311b commit dba1344
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ CMD ["/bin/bash"]
FROM simulator AS visualizer
WORKDIR /autoware

# Install VNC server with NoVNC
# Install openbox and VNC requirements
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
curl unzip lxde tigervnc-standalone-server tigervnc-common \
curl unzip openbox tigervnc-standalone-server tigervnc-common \
novnc websockify python3-numpy \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
Expand Down
10 changes: 7 additions & 3 deletions docker/etc/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#!/usr/bin/env bash

configure_vnc() {
# Start VNC server
echo "Starting VNC server..."
vncserver :1 -auth "$HOME"/.Xauthority -geometry 1024x768 -depth 16 -pixelformat rgb565 >/dev/null 2>&1
# Start VNC server with Openbox
echo "Starting VNC server with Openbox..."
vncserver :1 -rfbport 5901 -auth "$HOME"/.Xauthority -geometry 1280x1024 -depth 16 -pixelformat rgb565 \
-xstartup /root/.vnc/xstartup >/dev/null 2>&1
VNC_RESULT=$?

if [ $VNC_RESULT -ne 0 ]; then
echo "Failed to start VNC server (exit code: $VNC_RESULT)"
exit $VNC_RESULT
fi

# Set the DISPLAY variable to match VNC server
export DISPLAY=:1
sleep 2

# Start NoVNC
Expand Down
14 changes: 8 additions & 6 deletions docker/etc/xstartup
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash
#!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
export XKL_XMODMAP_DISABLE=1
export DESKTOP_SESSION=LXDE
export XDG_CURRENT_DESKTOP=LXDE
startlxde &
sleep infinity

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r "$HOME/.Xresources" ] && xrdb "$HOME/.Xresources"

# Start Openbox window manager
openbox &

0 comments on commit dba1344

Please sign in to comment.