X11vnc
   HOME

TheInfoList



OR:

x11vnc is a
Virtual Network Computing VNC (Virtual Network Computing) is a graphical desktop-sharing system that uses the RFB protocol, Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the computer keyboard, keyboard and computer mouse, mouse in ...
(VNC) server program. It allows remote access from a remote client to a computer hosting an
X Window The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been a ...
session and the x11vnc software, continuously polling the X server's
frame buffer A framebuffer (frame buffer, or sometimes framestore) is a portion of random-access memory (RAM) containing a bitmap that drives a video display. It is a memory buffer containing data representing all the pixels in a complete video frame. Mode ...
for changes. This allows the user to control their
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
desktop (
KDE KDE is an international free software community that develops free and open-source software. As a central development hub, it provides tools and resources that enable collaborative work on its projects. Its products include the KDE Plasma gra ...
,
GNOME A gnome () is a mythological creature and diminutive spirit in Renaissance magic and alchemy, introduced by Paracelsus in the 16th century and widely adopted by authors, including those of modern fantasy literature. They are typically depict ...
,
Xfce Xfce or XFCE (pronounced as four individual letters, ) is a Free and open-source software, free and open-source desktop environment for Linux and other Unix-like operating systems. Xfce aims to be fast and Lightweight software, lightweight whil ...
, etc.) from a remote computer either on the user's own network, or from over the Internet as if the user were sitting in front of it. x11vnc can also poll non-X11 frame buffer devices, such as
webcams A webcam is a video camera which is designed to record or stream to a computer or computer network. They are primarily used in Videotelephony, video telephony, live streaming and social media, and Closed-circuit television, security. Webcams can b ...
or
TV tuner card A TV tuner card is a kind of television tuner that allows television signals to be received by a computer. Most TV tuners also function as video capture cards, allowing them to record television programs onto a hard disk much like the digital ...
s,
iPAQ The iPAQ is a discontinued line of Pocket PC devices produced from 2000 until 2010. It was first unveiled by Compaq in April 2000. iPAQ included Personal digital assistant, PDA-devices, smartphones and GPS navigation device, GPS-navigators. ...
, Neuros OSD, the Linux console, and the
Mac OS X macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
graphics display. x11vnc is part of the LibVNCServer project and is
free software Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
available under the
GNU General Public License The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
. x11vnc was written by Karl Runge. x11vnc does not create an extra display (or X desktop) for remote control. Instead, it uses the existing
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
display shown on the monitor of a
Unix-like A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
computer in real time, unlike other
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
alternatives such as
TightVNC TightVNC is a Free and open-source software, free and open-source remote desktop software server and client application for Linux and Windows. A server for macOS is available under a commercial software, commercial source code license only, with ...
Server. However, it is possible to use Xvnc or Xvfb to create a 'virtual' extra display, and have x11vnc connect to it, enabling X-11 access to headless servers. x11vnc has security features that allows the user to set an access password or to use
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
usernames and passwords. It also has options for connection via a secure SSL link. An SSL Java VNC viewer
applet In computing, an applet is any small application that performs one specific task that runs within the scope of a dedicated widget engine or a larger program, often as a plug-in. The term is frequently used to refer to a Java applet, a program ...
is provided that enables secure connections from a
web browser A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
. The VeNCrypt SSL/TLS VNC security type is also supported. Many of the UltraVNC extensions to VNC are supported by x11vnc, including file transfer.


Polling algorithm

x11vnc keeps a copy of the X server's frame buffer in
RAM Ram, ram, or RAM most commonly refers to: * A male sheep * Random-access memory, computer memory * Ram Trucks, US, since 2009 ** List of vehicles named Dodge Ram, trucks and vans ** Ram Pickup, produced by Ram Trucks Ram, ram, or RAM may also ref ...
. The
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
programming interface XShmGetImage is used to retrieve the frame buffer
pixel In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a Raster graphics, raster image, or the smallest addressable element in a dot matrix display device. In most digital display devices, p ...
data. x11vnc compares the X server's frame buffer against its copy to see which
pixel In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a Raster graphics, raster image, or the smallest addressable element in a dot matrix display device. In most digital display devices, p ...
regions have changed (and hence need to be sent to the VNC viewers.) Reading pixel data from the physical
frame buffer A framebuffer (frame buffer, or sometimes framestore) is a portion of random-access memory (RAM) containing a bitmap that drives a video display. It is a memory buffer containing data representing all the pixels in a complete video frame. Mode ...
can be much slower than writing to it (because graphics devices are not optimized for reading) and so a sequential pixel by pixel check would often be too slow. To improve the situation, x11vnc reads in full rows of pixels separated by 32 pixels vertically. Once it gets to the bottom of the screen it starts again near the top with a slightly different offset. After 32 passes like this it has covered the entire screen. This method enables x11vnc to detect changes on the screen roughly 32 times more quickly than a sequential check would (unless the changes are very small, say only 1 pixel tall.) If the
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
DAMAGE extension is present, x11vnc uses it to provide hints where to focus its polling, thereby finding changes even more quickly and also lowering the system load.


Input injection

When x11vnc receives user input events (keystrokes, pointer motion, and pointer button clicks) from a VNC viewer, it must inject them synthetically into the X server. The
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
programming interfaces XTestFakeKeyEvent, XTestFakeMotionEvent, and XTestFakeButtonEvent of the XTEST extension are used to achieve this. For non-X11 managed devices (such as the
Mac OS X macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
graphics display) different programming interfaces must be used. x11vnc also provides an interface where the user can supply their own input injection program.


Interesting uses

Often special-purpose systems are built using the
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
to manage the graphical display. x11vnc can be used to export the system's display for remote VNC access. This enables remote monitoring, control, and troubleshooting of the special-purpose system. Sometimes this saves sending a technician to a remote site or allows users to control equipment from their workstation or laptop. x11vnc is known to have been run on the following types of systems:
Electron microscope An electron microscope is a microscope that uses a beam of electrons as a source of illumination. It uses electron optics that are analogous to the glass lenses of an optical light microscope to control the electron beam, for instance focusing it ...
,
MRI Magnetic resonance imaging (MRI) is a medical imaging technique used in radiology to generate pictures of the anatomy and the physiological processes inside the body. MRI scanners use strong magnetic fields, magnetic field gradients, and rad ...
and
Radiology Radiology ( ) is the medical specialty that uses medical imaging to diagnose diseases and guide treatment within the bodies of humans and other animals. It began with radiography (which is why its name has a root referring to radiation), but tod ...
image analysis system,
Power plant A power station, also referred to as a power plant and sometimes generating station or generating plant, is an industrial facility for the electricity generation, generation of electric power. Power stations are generally connected to an electr ...
and
Oil platform An oil platform (also called an oil rig, offshore platform, oil production platform, etc.) is a large structure with facilities to extract and process petroleum and natural gas that lie in rock formations beneath the seabed. Many oil platforms w ...
management consoles, Materials distribution control, Ship self-defense system testing,
NMR Nuclear magnetic resonance (NMR) is a physical phenomenon in which atomic nucleus, nuclei in a strong constant magnetic field are disturbed by a weak oscillating magnetic field (in the near and far field, near field) and respond by producing ...
systems,
Silicon wafer In electronics, a wafer (also called a slice or substrate) is a thin slice of semiconductor, such as a crystalline silicon (c-Si, silicium), used for the fabrication of integrated circuits and, in photovoltaics, to manufacture solar cells. The ...
analysis microscope, and Theater and concert lighting control. x11vnc is used to export the X11 displays in
embedded systems An embedded system is a specialized computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is em ...
such as Linux-based PDAs and
Home theater PC A home theater PC (HTPC) or media center computer is a technological convergence, convergent device that combines some or all the capabilities of a personal computer with a software application that focuses on video, photo, audio playback, and ...
s. If x11vnc cannot be run on the special-purpose system, sometimes it can be run on a nearby computer and poll the X server frame buffer over the network. This is how proprietary
X terminal X, or x, is the twenty-fourth letter of the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''ex'' (pronounced ), plural ''exes''."X", ' ...
devices can be accessed via x11vnc.


Xvnc emulation

Although x11vnc's primary use is for X servers associated with physical graphics hardware, it can also attach to virtual X servers (whose frame buffers exist in RAM only) such as Xvfb or a
Sun Ray The Sun Ray is a stateless thin client computer (and associated software) aimed at corporate environments, that was originally introduced by Sun Microsystems in September 1999 and discontinued by Oracle Corporation in 2014. It features a smart ...
session. x11vnc has options (-create and -svc) to start Xvfb automatically, possibly as the Unix user that logged in. The interactive response of x11vnc and Xvfb may not be as fast as Xvnc, however this mode enables features that Xvnc does not have, such as SSL encryption and Unix usernames and passwords.


Client-side caching

The RFB (VNC) protocol is odd when compared to other network graphics protocols, such as
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
and
RDP RDP may refer to: Computing * Ramer–Douglas–Peucker algorithm, an algorithm for polygonal simplification * Recombination detection program, for analysing genetic recombination * Recursive descent parser, a type of top-down parser * Remote Desk ...
, in that there is no provision for viewer-side caching of pixel data. While this makes the client easier to implement, there is a price to pay in terms of interactive response. For example, every re-exposure of a window or background region needs to have its (compressed) pixel data resent over the network. This effect is particularly noticeable for windows with complex or photo regions (such as a web browser window) that gets iconified and deiconified or re-exposed often. x11vnc has an experimental and somewhat brute-force implementation of client-side caching. It is enabled via the -ncache option. When creating the RFB frame buffer in this mode, x11vnc allocates a very large scratch region below the top portion used for the actual (on-screen) pixel data. x11vnc can then use the RFB CopyRect command to instruct the viewer to move rectangles of pixel data into and out of the scratch region. These moves are done locally on the viewer side. In this way x11vnc can manage the scratch region to store and retrieve pixel data without having to resend it over the network. x11vnc's client-side caching mode can give noticeable interactive response improvements for many activities. Since it uses the existing RFB CopyRect command, the scheme will work with any (i.e. unmodified) VNC viewer. There are some disadvantages, however. The first is that it consumes a large amount of memory. For good performance a scratch region 10 to 20 times larger than the actual screen should be used. So instead of using 5 MB for a 1280x1024 truecolor frame buffer, closer to 100 MB will be used (on both the VNC client and server sides). This is not so much of an issue on modern computers, but would not be possible on a low memory device. Second, the VNC viewer may treat the scratch region in ways that confuse the user, for example displaying it to the user or automatically panning down into it if the mouse reaches the bottom of the real screen. The Unix VNC viewer i
SSVNC
automatically hides the scratch region. Finally, x11vnc's heuristics for caching and reusing window pixel data are not perfect and can lead to unexpected flashing of a window's contents and other undesired effects.


See also

*
KRDC The KDE Software Compilation (KDE SC) was an umbrella term for the desktop environment plus a range of included applications produced by KDE. From its 1.0 release in July 1998 until the release of version 4.4 in February 2010, the Software Compi ...
*
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...


References


External links

*{{github, LibVNC/x11vnc
x11vnc: a VNC server for real X displays
(old project home page) Remote desktop software for Linux Virtual Network Computing X Window programs