Menu
Virtual Network Computing logo
In computing, Virtual Network Computing (VNC) is a graphical desktop-sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse events from one computer to another, relaying the graphical-screen updates back in the other direction, over a network.[1]
VNC is platform-independent – there are clients and servers for many GUI-based operating systems and for Java. Multiple clients may connect to a VNC server at the same time. Popular uses for this technology include remote technical support and accessing files on one's work computer from one's home computer, or vice versa.
VNC was originally developed at the Olivetti & Oracle Research Lab in Cambridge, United Kingdom. The original VNC source code and many modern derivatives are open source under the GNU General Public License.
VLC media player even has web plugins that are available for all kinds of browsers, that allows one to view all the content which is compatible with VLC.VLC web plugins are available for Chrome (Windows and Mac), Mozilla Firefox (Mac and Windows) and Safari. To download these plugins you can visit the leading download websites such as cnet, softonic etc. I installed Remmina from the repository. Also installed both the RDP and the VNC plugins from the repository. I have verified that remmina-plugin-vnc.so is in /usr/lib/remmina/plugins/ When I start Remmina, I see only the plugins for RDP, nothing for VNC. Connecting to a remote host using RDP works just fine.
VNC in KDE 3.1
There are a number of variants of VNC[2] which offer their own particular functionality; e.g., some optimised for Microsoft Windows, or offering file transfer (not part of VNC proper), etc. Many are compatible (without their added features) with VNC proper in the sense that a viewer of one flavour can connect with a server of another; others are based on VNC code but not compatible with standard VNC.
VNC and RFB are registered trademarks of RealVNC Ltd. in the US and some other countries.
History[edit]
The Olivetti & Oracle Research Lab (ORL)[3] at Cambridge in the UK developed VNC at a time when Olivetti and Oracle Corporation owned the lab. In 1999, AT&T acquired the lab, and in 2002 closed down the lab's research efforts.
Developers who worked on VNC while still at the AT&T Research Lab include:[4]
- Tristan Richardson (inventor)
- Andy Harter (project leader)
- James Weatherall
Following the closure of ORL in 2002, several members of the development team (including Richardson, Harter, Weatherall and Hopper) formed RealVNC in order to continue working on open-source and commercial VNC software under that name.
The original GPLed source code has fed into several other versions of VNC. Such forking has not led to compatibility problems because the RFB protocol is designed to be extensible. VNC clients and servers negotiate their capabilities with handshaking in order to use the most appropriate options supported at both ends.
As of 2013, RealVNC Ltd claims the term 'VNC' as a registered trademark in the United States and in other countries.[5]
Etymology[edit]
The name Virtual Network Computer/Computing (VNC) originated with ORL's work on a thin client called the Videotile, which also used the RFB protocol. The Videotile had an LCD display with pen input and a fast ATM connection to the network. At the time, network computer was commonly used as a synonym for a thin client; VNC is essentially a software-only (i.e. virtual) network computer.[citation needed]
Operation[edit]
- The VNC server is the program on the machine that shares some screen (and may not be related to a physical display – the server can be 'headless'), and allows the client to share control of it.
- The VNC client (or viewer) is the program that represents the screen data originating from the server, receives updates from it, and presumably controls it by informing the server of collected local input.
- The VNC protocol (RFB protocol) is very simple, based on transmitting one graphic primitive from server to client ('Put a rectangle of pixel data at the specified X,Y position') and event messages from client to server.
In the normal method of operation a viewer connects to a port on the server (default port: 5900). Alternatively (depending on the implementation) a browser can connect to the server (default port: 5800). And a server can connect to a viewer in 'listening mode' on port 5500. One advantage of listening mode is that the server site does not have to configure its firewall to allow access on port 5900 (or 5800); the duty is on the viewer, which is useful if the server site has no computer expertise and the viewer user is more knowledgeable.
The server sends small rectangles of the framebuffer to the client. In its simplest form, the VNC protocol can use a lot of bandwidth, so various methods have been devised to reduce the communication overhead. For example, there are various encodings (methods to determine the most efficient way to transfer these rectangles). The VNC protocol allows the client and server to negotiate which encoding they will use. The simplest encoding, supported by all clients and servers, is raw encoding, which sends pixel data in left-to-right scanline order, and after the original full screen has been transmitted, transfers only rectangles that change. This encoding works very well if only a small portion of the screen changes from one frame to the next (as when a mouse pointer moves across a desktop, or when text is written at the cursor), but bandwidth demands get very high if a lot of pixels change at the same time (such as when scrolling a window or viewing full-screen video).
VNC by default uses TCP port 5900+N,[6][7] where N is the display number (usually :0 for a physical display). Several implementations also start a basic HTTPserver on port 5800+N to provide a VNC viewer as a Java applet, allowing easy connection through any Java-enabled web-browser. Different port assignments can be used as long as both client and server are configured accordingly. A HTML5 VNC client implementation for modern browsers (no plugins required) exists too.[8]
Although possible even on low bandwidth, using VNC over the Internet is facilitated if the user has a broadband connection at both ends. However, it may require advanced NAT, firewall and router configuration such as port forwarding in order for the connection to go through. Users may establish communication through Virtual Private Network (VPN) technologies, including instant VPN applications (such as LogMeIn Hamachi) to ease usage over the Internet, or as a LAN connection if VPN is used as a proxy, or through a VNC repeater (useful in presence of a NAT).[9][10]
Xvnc is the Unix VNC server, which is based on a standard X server. To applications, Xvnc appears as an X 'server' (i.e., it displays client windows), and to remote VNC users it is a VNC server. Applications can display themselves on Xvnc as if it were a normal X display, but they will appear on any connected VNC viewers rather than on a physical screen.[11] Alternatively a machine (which may be a workstation or a network server) with screen, keyboard, and mouse can be set up to boot and run the VNC server as a service or daemon, then the screen, keyboard, and mouse can be removed and the machine stored in an out-of-the way location.
In addition, the display that is served by VNC is not necessarily the same display seen by a user on the server. On Unix/Linux computers that support multiple simultaneous X11 sessions, VNC may be set to serve a particular existing X11 session, or to start one of its own. It is also possible to run multiple VNC sessions from the same computer. On Microsoft Windows the VNC session served is always the current user session.[citation needed]
Users commonly deploy VNC as a cross-platform remote desktop system. For example, Apple Remote Desktop for Mac OS X (and more recently, 'Back to My Mac' in 'Leopard' - Mac OS X 10.5) interoperates with VNC and will connect to a Unix user's current desktop if it is served with x11vnc, or to a separate X11 session if one is served with TightVNC. From Unix, TightVNC will connect to a Mac OS X session served by Apple Remote Desktop if the VNC option is enabled, or to a VNC server running on Microsoft Windows.[12]
In July 2014 RealVNC published a Wayland developer preview.[13][14]
Security[edit]
By default, RFB is not a secure protocol. While passwords are not sent in plain-text (as in telnet), cracking could prove successful if both the encryption key and encoded password are sniffed from a network. For this reason it is recommended that a password of at least 8 characters be used. On the other hand, there is also an 8-character limit on some versions of VNC; if a password is sent exceeding 8 characters, the excess characters are removed and the truncated string is compared to the password.
UltraVNC supports the use of an open-source encryption plugin which encrypts the entire VNC session including password authentication and data transfer. It also allows authentication to be performed based on NTLM and Active Directory user accounts. However, use of such encryption plugins make it incompatible with other VNC programs. RealVNC offers high-strength AES encryption as part of its commercial package, along with integration with Active Directory. Workspot released AES encryption patches for VNC. According to TightVNC,[15] TightVNC is not secure as picture data is transmitted without encryption. To circumvent this, it should be tunneled through a SSH connection (see below).
VNC may be tunneled over an SSH or VPN connection which would add an extra security layer with stronger encryption. SSH clients are available for most platforms; SSH tunnels can be created from UNIX clients, Microsoft Windows clients, Macintosh clients (including Mac OS X and System 7 and up) – and many others. There are also freeware applications that create instant VPN tunnels between computers.
An additional security concern for the use of VNC is to check whether the version used requires authorization from the remote computer owner before someone takes control of their device. This will avoid the situation where the owner of the computer accessed realizes there is someone in control of their device without previous notice.
See also[edit]
References[edit]
- ^Richardson, T.; Stafford-Fraser, Q.; Wood, K. R.; Hopper, A. (1998). 'Virtual network computing'(PDF). IEEE Internet Computing. 2: 33–38. CiteSeerX10.1.1.17.5625. doi:10.1109/4236.656066.
- ^The VNC family of Remote Control Applications: a list of VNC variants
- ^'VNC Frequently Asked Questions (FAQ)'. 1999. Archived from the original on 15 August 2000.
- ^RealVNC Executive Profiles
- ^Copyright and trademarks RealVNC. Accessed Feb 23, 2018.
- ^'RealVNC - Frequently asked questions'.
- ^'UltraVnc Configuration'.
- ^'noVNC'.
- ^'OpenWRT VNC repeater'.
- ^'uVNC repeater'.
- ^AT&T Laboratories Cambridge (1999). 'X-based VNC server'. Virtual Network Computing. Archived from the original on 19 March 2007. Retrieved 24 March 2007.
- ^'OnlineVNC Server for Windows OSes'.
- ^'VNC® Wayland Developer Preview'. 8 July 2014. Archived from the original on 14 July 2014. Retrieved 10 July 2014.
- ^'RealVNC Wayland developer preview email'. freedesktop.org. 9 July 2014.
- ^How secure is TightVNC? TightVNC Frequently Asked Questions. TightVNC.com Accessed Feb 23, 2018
External links[edit]
Wikimedia Commons has media related to VNC. |
Wikibooks has a book on the topic of: Internet Technologies/VNC |
- AT&T VNC - Original AT&T-Cambridge VNC website
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Virtual_Network_Computing&oldid=932307632'
On this page
- Notes
VNC is a desktop sharing application (Virtual Network Computing) to connect and control a (remote or local) computer's desktop over a network connection.
However, on linux systems, many VNC server applications allow only to connect to a virtual desktop and not to the actual one. This howto offers you a solution, to connect via TigerVNC server to the actual active session on your Linux desktop.
Requirements
- A fully functional linux desktop environment
- root privilege (to install the TigerVNC server)
- basic knowledge of the linux shell
In order to get the latest packages, you may want to update.
This howto was tested on Debian/GNU Linux 9.5 (stretch) and Ubuntu 18.04
Install TigerVNC
First, you have to install the TigerVNC server.
Note, that on most debian-based systems, there is a small package called tigervnc-scraping-server, which you need to install. You don't have to install the main TigerVNC server (package name: tigervnc-standalone-server) to have the functionality to connect to the running desktop session, only if you prefer to connect to a virtual desktop, too.
The TigerVNC server provides a smaller application (x0vncserver) to grant access to the active session.
Then, create a .vnc directory in your home:
Create a password for your vnc session:
Starting the VNC server
A short description of the x0vncserver:
Now that you have successfully installed TigerVNC server on your computer, created a password with the vncpasswd command, we can begin to start our vnc server. Make sure that you're on the active session, and write (as user):
The option -passwordfile ~/.vnc/passwd reads the password file created earlier with the vncpasswd command. The second option -display :0 means, that you want to connect to the session on the display :0, which is usually the active session.
Now you can access your actual desktop with any vnc viewer application on the default vnc port 5900.
You can stop this process whenever you want by pressing Ctrl-c.
If you wish to run it in the background, type:
Now all the output standard output and errors are redirected to /dev/null and with the & at the end, it will run in the background. However, you won't be able anymore to stop the vnc server by pressing Ctrl-c, instead you have to kill it's process id (see below section 'Stopping the vnc server').
![View installed plugins View installed plugins](/uploads/1/2/6/3/126329477/331595425.png)
For more options and syntax, check the x0vncserver manual.
Stopping the VNC server
If your vnc server runs in the background, you have to know the process id, in order to stop it.
The output will be like this, so notice the pid 1328. In order to stop the vnc server, we have to 'kill' this process.
The option -9 for the kill command will send the KILL signal to the process id to make sure that it stops.
Script to run the VNC server
There is a script to start and stop the x0vncserver application on github. For testing purposes, you download the psmisc package, too:
Then, download the startvnc script using the git command:
Your output will look something like above.
Copy the startvnc script from the runvncserver directory to your home:
Change permissions to executable, in order to execute the script:
Then, run the script.
This script will only work, if you have a .vnc directory in your home and created a vncpasswd (it checks for ~/.vnc/passwd file). We already created the .vnc directory and the password earlier.
To start the vnc server on the actual display, just type:
You can test, if your vnc server is running with the option:
Few examples:
Or by checking the 5900 TCP port on your system with the fuser command (from the psmisc package):
You'll get an output like this if the vnc server is running on port 5900.
More instructions for this script you can find in the readme file:
The script will create a logfile, where the output is stored. If something goes wrong or you can't start or stop the x0vncserver, take a look at the logfile under ~/.vnc/logfile
Start the VNC server automatically
If you want to access the active desktop session automatically, you need to edit the .xsessionrc file in your home directory.
Replace user by your username and it will automatically run when starting the X session. The script logs its activity in ~/.vnc/logfile, if something goes wrong, you can check the log file there.
Notes
This tutorial doesn't deal with setting up a VNC virtual desktop.
Security
Be aware, that the x0vncserver doesn't use encryption by default, so use it carefully over the internet. If you want to use it remotely, you can tunnel it via ssh. However, there are other howtos where you can find a solution to encrypt your VNC session.
Or you can take a look at the ssvnc package.
VNC viewers
If you're looking for VNC viewers, there are plenty of them, for instance:
- gvncviewer
- tigervnc-viewer
- xtightvncviewer
- xvnc4viewer
Geometry
The x0vncserver on the actual display will use the same geometry as the running desktop on the :0 display. So if you set the -geometry option to a lower size, it won't get scaled, you'll just see a fraction of the desktop size.
Feedback
Feel free to write feedback. If you tested this tutorial or even the script on another system.