Comments (3)
Hi @alex77272,
It sounds like a frustrating issue, and I'm sorry to hear it's not working out. The good news is that the container can indeed operate in network_mode=host
, but it requires a couple of minor adjustments to avoid port conflicts with the host system. These adjustments can be achieved by modifying the entrypoint.sh
script. Below, I've outlined the necessary changes:
Original Code Block Adjustment:
From:
if [ $(uname -m) = "aarch64" ]; then
LD_PRELOAD=/lib/aarch64-linux-gnu/libgcc_s.so.1 vncserver :1 -fg -geometry 1920x1080 -depth 24
else
vncserver :1 -fg -geometry 1920x1080 -depth 24
fi
To:
if [ $(uname -m) = "aarch64" ]; then
LD_PRELOAD=/lib/aarch64-linux-gnu/libgcc_s.so.1 vncserver :5 -geometry 1920x1080 -depth 24
else
vncserver :5 -geometry 1920x1080 -depth 24
fi
This change switches the virtual display from 1 to 5. As a result, the VNC server will now operate on port 5905 instead of port 5901, helping to prevent conflicts with existing VNC servers.
Additional Code Modification:
From:
command=gosu '$USER' bash -c "websockify --web=/usr/lib/novnc 80 localhost:5901"
To:
command=gosu '$USER' bash -c "websockify --web=/usr/lib/novnc 6080 localhost:5905"
This ensures that the noVNC web UI is directly accessible on port 6080 and that noVNC looks for the VNC server on the newly defined port 5905.
With these changes, everything should work as intended. You can now access via http://localhost:6080/
Best regards,
Stefan
from docker-ros2-desktop-vnc.
Wow, your help was incredibly valuable. Thank you for solving the Git issue. I've been struggling with it for hours and your guidance has made all the difference. I wish you all the best and once again, thank you so much.
Alex
from docker-ros2-desktop-vnc.
@XO30 Thanks for your support!
from docker-ros2-desktop-vnc.
Related Issues (20)
- Can't connect to local host after 1st time HOT 6
- unable to launch with docker compose in pycharm windows 10 HOT 1
- naming convection tiryoh/ros2-desktop-vnc:humble-arm64-20220921T0434 HOT 4
- Commit from container error vnc HOT 20
- Update screenshots in README
- Unable to communicate with ROS 2 system outside of docker container. HOT 3
- Run with --net=host break access to vnc HOT 8
- /bin/bash: /entrypoint.sh: /bin/bash^M: bad interpreter: No such file or directory - Unable to run on Windows 10 HOT 3
- codium install error
- Try KasmVNC
- Why `rm /etc/apt/apt.conf.d/docker-clean` is needed? HOT 2
- USB access HOT 1
- Suggestion: add terminator HOT 4
- Suggestion: enable auto completion in docker container HOT 2
- Suggestion: enable colcon-argcomplete HOT 1
- Add colcon extentions
- gazebo was blackout when I run docker image with humble tag HOT 11
- apt-get install error HOT 3
- Suggestion: add web browser HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-ros2-desktop-vnc.