TurboVNC / turbovnc

Main TurboVNC repository
https://TurboVNC.org
GNU General Public License v2.0
789 stars 142 forks source link

vncviewer fails to connect to vncserver #21

Closed zenny closed 8 years ago

zenny commented 8 years ago

Hi,

This is in pursuant to @dcommander suggestion at https://github.com/VirtualGL/virtualgl/issues/11#issuecomment-161181948

Platform: TurboVNC v2.0.1-20151105 in Ubuntu 14.04 Trusty.

I started a vncserver (official .deb from sf.net installed to /opt/TurboVNC/ folder by default) in reference to https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-14-04

$ sudo service vncserver start
 * Starting vncserver for user 'zenny' on localhost:2...                                                            
Desktop 'TurboVNC: MACHINE-GA-970A-D3:2 (zenny)' started on display MACHINE-GA-970A-D3:2

Starting applications specified in /home/zenny/.vnc/xstartup.turbovnc
Log file is /home/zenny/.vnc/MACHINE-GA-970A-D3:2.log

But when I try to connect with ssh it says,

channel_setup_fwd_listener: cannot listen to port: 5902
Could not request local forwarding.

I checked /etc/ssh/sshd_config`to check whether X11 forwarding was disabled, but was not the case.

$ grep Forwarding /etc/ssh/sshd_config
X11Forwarding yes

Obviously, vncviewer died with:

$ /opt/TurboVNC/bin/vncviewer 
libjawt.so path: /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64
Could not connect: Connection refused

'netstat -plant | grep Xvnc' gives Xvnc instant running in port 5902

tcp        0      0 0.0.0.0:5902            0.0.0.0:*               LISTEN      9911/Xvnc       
tcp        0      0 0.0.0.0:6002            0.0.0.0:*               LISTEN      9911/Xvnc              
tcp        0      0 0.0.0.0:5802            0.0.0.0:*               LISTEN      9911/Xvnc       
tcp6       0      0 :::6002                 :::*                    LISTEN      9911/Xvnc  

Appreciate any hints on the right way to use TurboVNC! Thanks!

dcommander commented 8 years ago
zenny commented 8 years ago

@dcommander Thanks a zillion for very useful inputs here to prove that how simple TurboVNC is as well as at https://github.com/VirtualGL/virtualgl/issues/11#issuecomment-161392904. The documentation you pointed to, and --help pages were extremely enlightening.

In the meantime, I am trying NOT to scale down the server's geometry while downsizing only the client's (vncviewer's) to half (1/2), but that does not seem possible with what I understood and executed as of below:

$ /opt/TurboVNC/bin/vncserver -geometry 3840x2160 -depth 32 -xstartup 'vglrun -c proxy libreoffice'
$ /opt/TurboVNC/bin/vncviewer MACHINE-GA-970A-D3:2 -DesktopSize=Server

Once I get connected, virtual x server's resolution is reportedly 1916x1022 instead of the geometry I assigned (3840x2160) above.

Did I miss some parameters? Thanks again.

PS: The second issue that I am having is that the icons of libreoffice app is not being rendered clearly (greyed out) as seen in the attached screenshot at http://picpaste.com/SKX3BlSH.png. Cannot figure out whether it is a bug or a feature?!

dcommander commented 8 years ago

Several comments: