Applicable software
All the information in this Guide applies to connections established between a client computer running the latest version ofVNC Viewerand a host computer licensed to useVNC Server (Enterprise). Unless otherwise stated, this combination is assumed. To see how to set these applications up, readGetting the computers ready to use.
Note that general principles of remote control, and information relating to particular supported features, also apply to connections established between any combination of the products and license types listed below.
VNC Server (with different licenses applied)
•VNC Server (Personal)
Contains most RealVNC remote control features. A thirty day trial is available.
•VNC Server (Free)
Contains basic remote control features.
For more information on licensingVNC Server, start withLicensing VNC Server.
VNC Viewer
•VNC Viewer for Java
This application is freely available to download on demand fromVNC Server (Enterprise)orVNC Server (Personal).
•VNC Viewer Plus
This application is available to purchase from www.realvnc.com/products/viewerplus/.
•VNC Viewer for iOS
This application is available to purchase from the Apple App Store. Visit www.realvnc.com/products/ios/ for more information.
•VNC Viewer for Android
This application is available to purchase from Google Play. Visit www.realvnc.com/products/android/ for more information.
When a connection is established,VNC Viewerdisplays the host computer’s desktop in a new window on the client computer:
![](http://www.realvnc.com/products/vnc/documentation/5.0/guides/user/VNC_Viewer_Experience.png)
A.Desktop of a client computer running Windows 7.B.VNC Viewer displaying the desktop of a host computer running Ubuntu 11.04 Linux.
Note:If the host computer is running UNIX/Linux,VNC Viewermay display avirtualdesktop instead, in which case what you see isnotthe desktop visible to a host computer user. For more information on this feature, seeRunning multiple instances of VNC Server.
Note that otherVNC Viewerusers may be connected to the host computer and controlling it at the same time as you. In addition, a host computer user may be present. Operations may occur unexpectedly!
Controlling the host computer using your mouse
Your client computer’s mouse is now shared with the host computer. This means that:
• Moving the mouse and clicking within theVNC Viewerwindow affects the host computer and not the client.
• Moving the mouse and clicking outside theVNC Viewerwindow, or on theVNC Viewertitle bar or window buttons (Minimize,Maximize, andClose), affects the client computer and not the host.
Note:If your mouse has no effect on the host computer, it may have been disabled. For more information, seeRestricting access to features.
If client and host computers have different numbers of mouse buttons, you can configureVNC Viewerto emulate those you do not have. SeeConfiguring your mousefor more information.
Controlling the host computer using your keyboard
Your client computer’s keyboard is now shared with the host computer, with the exception of:
• The function key that opens the shortcut menu (F8 by default).
• The CTRL-ALT-DELETE key combination.
These commands are interpreted by the client computer. Alternative ways of sending them to the host computer are available; start withUsing the shortcut menufor more information. Under Windows, note you can choose for certain other keys or key combinations to be interpreted by your client computer rather than the host. SeeConfiguring your keyboardfor more information.
Note:If your keyboard has no effect on the host computer, it may have been disabled. For more information, seeRestricting access to features.
Note it is possible for client and host computers to have different types of keyboard. Not all the keys available to a host computer user may be available to you, and some keys with the same name may have different behavior. This is especially likely if you are connecting to Mac OS X from Windows or Linux with a PC keyboard, orvice versa; see www.realvnc.com/products/vnc/documentation/latest/misc/keyboard-mapping/.
When you connect, aVNC Servericonis displayed on the host computer’s desktop, shaded black:
![](http://www.realvnc.com/products/vnc/documentation/5.0/guides/user/VNC_Server_Icon_Connected_User.png)
(Windows 7 client computer; Ubuntu 11.10 Linux host)
TheVNC Servericon confirms thatVNC Serveris running on the host computer, provides information to helpVNC Viewerusers connect, confirms that at least oneVNC Vieweruser is connected (the icon changes color), and has a shortcut menu to perform useful operations. All this information and functionality is available to you as a connected user. For more information, seeWorking with VNC Server.
Note:Under UNIX/Linux, in some circumstances, theVNC Servericon is not shaded black. Under some versions, noVNC Servericon can be displayed. In the latter scenario, shortcut menu commands are available from theMorebutton on theVNC Serverdialog.
Note that theVNC Servericon also provides access toVNC Serveroptions. However, you cannot configureVNC Serverin Service Mode unless you know the credentials of a user with administrative privileges on the host computer (or are logged in as one). For more information, seeUsing the VNC Server - Options dialog.
安装VNC
Tarball 安装方式:
[root @ test root] # tar xvfz vnc-4_1_2-x86_linux.tar.gz
[root @ test root] # cd vnc-4_1_2-x86_linux
[root @ test vnc-4_1_2-x86_linux] # ./vncinstall /usr/local/bin
[root @ test vnc-4_1_2-x86_linux] # cp vnc.so /usr/X11R6/lib/modules/extensions/
RPM 安装方式:
[root @ test root] # rpm –ivh vnc-4_1_2-x86_linux.rpm
启动 vncserver
[root @ test vnc-4_1_2-x86_linux] # vncserver
Your will require a password to access your desktop.
Passwd: 输入密码
Verify: 再次输入密码确认
New ‘test:1’ desktop is test:1
# test:1 test是主机名,:1 是登录VNC 的窗口号。
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/test:1.log
第一次执行 vncserver 时需要设定提供远程连入时的访问密码,密码会记录在 /root/.vnc/passwd 文件中,日后可执行 vncpasswd 更改密码。
现在就可以通过 vncviewer 连入操作
[root @ test vnc-4_1_2-x86_linux] # vncviewer 192.168.98.32:1
会弹出一个对话框,要求输入访问密码,输入密码后,即可连接成功。
VNCServer 的X 桌面默认为 twm, 这时连接进去只能看到终端界面,而看不到远程桌面界面。可修改 /root/.vnc/xstartup 文件,将其改为 GNOME 或 KDE 桌面:
GNOME:
[root @ test vnc-4_1_2-x86_linux] # vi /root/.vnc/xstartup
#!/bin/sh
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot –solid grey
vncconfig –iconic &
xterm –geometry 80x24+10+10 –ls –title “$VNCDESKTOP Desktop” &
gnome-session &
KDE:
[root @ test vnc-4_1_2-x86_linux] # vi /root/.vnc/xstartup
#!/bin/sh
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot –solid grey
vncconfig –iconic &
xterm –geometry 80x24+10+10 –ls –title “$VNCDESKTOP Desktop” &
startkde &
修改完毕后须重新启动 VNCServer
[root @ test vnc-4_1_2-x86_linux] # vncserver –kill :1 && vncserver :1
[root @ test vnc-4_1_2-x86_linux] # vncviewer 192.168.98.32:1
连接后即可使用 GNOME 或 KDE 桌面啦(就像 WinXP 的远程桌面一般),也可以通过 WEB 访问,在浏览器中输入 http://192.168.0.252:5801 即可,VNC 默认的端口号为5801。
用 netstat –tlunp | grep 01,可以查看VNC 的端口是否牌监听状态,如看到5801 ,则表示 VNC 端口已正常启动。
遇到错误:
realvnc connect:connection refused(10061)
10061 means that the server computer was contactable, but not accepting connections on the port you were trying to connect to. This might be because VNC Server 4 was not running, or because it couldn't open the required port. Given that you are running 3.3.3R3 alongside 4, I'd guess that you started 4 after you started 3.3.3R3 and that you haven't told 4 to run on a different port number yet - in that case it will try to open the same port as 3.3.3R3, fail, and not try to re-open that port until it is restarted or a setting is changed.
A few things... I assume that since you built it, the XP firewall was opened for the incoming port (5900 as default)... However, the port could be blocked by: a) Any router/switch the XP host is attached to b) The Hughes 'modem' does not allow incoming IP connections c) Hughes itself is blocking it before the signal is being set to the sky Remember Hughes is very different than DSL/Cable/Fiber connections...
If you didn't import your VNC 3.3.7 settings using the Import Legacy Settings option then you might have found VNC Server 4.1.1 running on port 5900, but not port 8500, which is not a standard RFB port. The problem you were having with VNC 3.3.7 suggests that your VNC 3.3 Default settings had got out of sync with the per-user settings.
You are attempting to connect to the VNC server computer directly, rather than via the SSH tunnel port on the viewer machine. i.e. on the viewer machine, enter localhost:2 in the Server field.