john-shine / Docker-CodeWeavers_CrossOver-VNC

A docker for run CrossOver though VNC remote manage
454 stars 91 forks source link

ubuntu 16.04 安装,vncviewer无法连接 #59

Closed yuritry closed 3 years ago

yuritry commented 3 years ago

sudo docker run -d --name=baidupan -p 5901:5901 -v /home/baidu/baidunetdiskdownload:/home/baidu/baidunetdiskdownload/ johnshine/baidunetdisk-crossover-vnc:latest

容器运行正常,但vnc无法连接: vncserver closed connection.

root@vps:~# docker logs 0830 Please be aware that you are exposing your VNC server to all users on the local machine. These users can access your server without authentication! Use of uninitialized value $proto in socket at /usr/bin/vncserver line 355. Use of uninitialized value $proto in socket at /usr/bin/vncserver line 355. Use of uninitialized value $proto in socket at /usr/bin/vncserver line 355. Use of uninitialized value $proto in socket at /usr/bin/vncserver line 355. Use of uninitialized value $proto in socket at /usr/bin/vncserver line 355. Use of uninitialized value $proto in socket at /usr/bin/vncserver line 355.

New '0830a5d540e9:1 (baidu)' desktop at :1 on machine 0830a5d540e9

Starting applications specified in /home/baidu/.vnc/xstartup Log file is /home/baidu/.vnc/0830a5d540e9:1.log

Use xtigervncviewer -SecurityTypes None,TLSNone :1 to connect to the VNC server.

ptman-boy commented 3 years ago

同样无法使用vnc连接,浏览器上用另一端口可配置

DrPoohXi commented 3 years ago

我也是这样,用的最新版那个镜像,容器运行和端口映射都正常,但是VNC无法连接 以下是VNC日志,估计是这个/usr/bin/tigervncserver 启动脚本配置问题

I/O warning : failed to load external entity "/usr/share/xml/iso-codes/iso_639.xml" I/O warning : failed to load external entity "/usr/share/xml/iso-codes/iso_3166.xml" I/O warning : failed to load external entity "/usr/share/xml/iso-codes/iso_639.xml" I/O warning : failed to load external entity "/usr/share/xml/iso-codes/iso_3166.xml" (ERROR-128810 ime.c:432) fcitx-keyboard-cm-mmuock already exists (ERROR-128810 ime.c:432) fcitx-keyboard-us already exists Failed to read: session.screen0.titlebar.left Setting default value Failed to read: session.screen0.titlebar.right Setting default value

bigfoxtail commented 3 years ago

@rong280 @ptman-boy 映射出6080端口,然后直接浏览器访问6080端口试试,应该可以看到web的vnc界面,我估计是已经通过webvnc连接了服务,其他的vnc客户端无法连接进去

john-shine commented 3 years ago

将容器内的启动文件:/entrypoint.sh

if [ -z $vnc_password ]; then
    /usr/bin/vncserver -geometry 1920x1080 -fg -SecurityTypes None,TLSNone
else
    /usr/bin/vncserver -geometry 1920x1080 -fg
fi

修改为

if [ -z $vnc_password ]; then
    /usr/bin/vncserver -localhost no -geometry 1920x1080 -fg -SecurityTypes None,TLSNone
else
    /usr/bin/vncserver -localhost no -geometry 1920x1080 -fg
fi

即可从远程连接