All,

I'm trying to use TurboVNC running in a docker container running in WSL2
and am failing to succeed.

%%%%%%%%%%%%%%%%%
System Information:
%%%%%%%%%%%%%%%%%
Windows 10
Version: 20H2
OS build: 19042.867
Docker version 20.10.5, build 55c4c88

%%%%%%%%%%%%%%%%%
Dockerfile:
%%%%%%%%%%%%%%%%%
FROM ubuntu:bionic

RUN apt-get update \
    && apt-get install -y dpkg wget glmark2 geany libglu1-mesa libxv1
libxt6 xauth x11-xkb-utils iproute2 x11-apps

RUN wget
https://downloads.sourceforge.net/project/virtualgl/2.6.5/virtualgl_2.6.5_amd64.deb
RUN dpkg -i virtualgl_2.6.5_amd64.deb
RUN rm virtualgl_2.6.5_amd64.deb

RUN wget
https://downloads.sourceforge.net/project/turbovnc/2.2.6/turbovnc_2.2.6_amd64.deb
RUN dpkg -i turbovnc_2.2.6_amd64.deb
RUN rm turbovnc_2.2.6_amd64.deb
RUN apt install -f

CMD ["bash"]

%%%%%%%%%%%%%%%%%
Commands in WSL2:
%%%%%%%%%%%%%%%%%
docker build --network=host -t mycontainer .
docker run -it -t mycontainer

%%%%%%%%%%%%%%%%%
Commands in container:
%%%%%%%%%%%%%%%%%
# /opt/TurboVNC/bin/vncserver  -geometry 1920x1080 -securitytypes none :0

Desktop 'TurboVNC: 750e2d44f228:0 ()' started on display 750e2d44f228:0

Creating default startup script /root/.vnc/xstartup.turbovnc
Starting applications specified in /root/.vnc/xstartup.turbovnc
Log file is /root/.vnc/750e2d44f228:0.log


~/dev/$ ip address

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group
default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
47: eth0@if48: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP group default
    link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0
       valid_lft forever preferred_lft forever


~/dev/$ export DISPLAY=<ip of windows machine>:0.0
~/dev/$ xeyes

(the xeyes application shows up on windows)

~/dev/$ export DISPLAY=:0

root@750e2d44f228:/# ps aux | grep -i vnc

root       454  0.0  0.3 1369844 51004 pts/0   Sl   00:17   0:00
/opt/TurboVNC/bin/Xvnc :0 -desktop TurboVNC: 750e2d44f228:0 () -httpd
/opt/TurboVNC/bin//../java -auth /root/.Xauthority -geometry 1920x1080
-depth 24 -rfbwait 120000 -securitytypes none -rfbport 5900 -deferupdate 1
-dridir /usr/lib/x86_64-linux-gnu/dri


%%%%%%%%%%%%%%%%%
/etc/hosts file (in WS2):
%%%%%%%%%%%%%%%%%
~/dev/$ cat /etc/hosts

<snip>
 # This file was automatically generated by WSL. To stop automatic
generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateHosts = false
127.0.0.1       localhost

192.168.50.62   host.docker.internal
192.168.50.62   gateway.docker.internal
127.0.0.1       kubernetes.docker.internal
</snip>


%%%%%%%%%%%%%%%%%
Commands Windows:
%%%%%%%%%%%%%%%%%
PS C:\Users\joehays> ipconfig

Windows IP Configuration
Wireless LAN adapter Wi-Fi:
   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::a0d3:2261:f58e:6c0e%22
   IPv4 Address. . . . . . . . . . . : 192.168.50.62
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.50.1

Ethernet adapter vEthernet (Default Switch):
   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::c8:4c3e:c8df:ca20%24
   IPv4 Address. . . . . . . . . . . : 172.19.128.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :

Ethernet adapter vEthernet (WSL):
   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::b1a6:efe6:1f94:ac2c%48
   IPv4 Address. . . . . . . . . . . : 172.24.240.1
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . :

Ethernet adapter Ethernet:
   Connection-specific DNS Suffix  . : <my domain>
   Link-local IPv6 Address . . . . . : fe80::a546:14d6:e57c:e4ed%7
   Link-local IPv6 Address . . . . . : fe80::a71d:a869:24dc:7bc5%7
   IPv4 Address. . . . . . . . . . . : 132.250.202.74
   Subnet Mask . . . . . . . . . . . : 255.255.255.255
   Default Gateway . . . . . . . . . : ::
                                       0.0.0.0


%%%%%%%%%%%%%%%%%
/etc/hosts file (in docker container):
%%%%%%%%%%%%%%%%%
root@750e2d44f228:/# cat /etc/hosts

127.0.0.1       localhost
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.2      750e2d44f228


%%%%%%%%%%%%%%%%%
TurboVNC Viewer on Windows:
%%%%%%%%%%%%%%%%%
VNCServer: 132.250.202.74    (fails)
VNCServer: 132.250.202.74:0    (fails)
VNCServer: 132.250.202.74:5900    (fails)
VNCServer:  172.17.0.2    (fails)
VNCServer:  172.17.0.2:0    (fails)
VNCServer:  172.17.0.2:5900    (fails)
VNCServer:  172.24.240.1    (fails)
VNCServer:  172.24.240.1:0    (fails)
VNCServer:  172.24.240.1:5900    (fails)
VNCServer:  172.19.128.1     (fails)
VNCServer:  172.19.128.1:0      (fails)
VNCServer:  172.19.128.1:5900      (fails)


I don't know how to connect to the VNC server running in the container...

Help?

-- 
You received this message because you are subscribed to the Google Groups 
"TurboVNC User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/turbovnc-users/CAGVM2begh_eqOa9Ed4js5S_S9AkJ8Qbp2C4dnijKWHKy%3D4Wwig%40mail.gmail.com.

Reply via email to