Reprinted please indicate the source and the author contact: http://blog.csdn.net/mimepp
Contact information: Yu Tao <yut616 at Sohu dot com>
Keywords: Microwindows, nanox, vncserver, libvncserver
Nanox integrates the vncserver function in its drivers. Record it here.
The corresponding code is in:
Src/Drivers/vncserver. c
It uses PSD-> ADDR as rfbscreen-> framebuffer and sets markrect to indicate that the corresponding rect needs to be updated when the screen changes.
However, it should be noted that libvncserver is GPL, which has an impact on commercial applications.
The running screenshot is as follows:
Demo: ntetris
Access VNC server from a PC through web:
The authentication dialog box is displayed.
VNC connection options.
View the image in VNC.
Demo running log:
Src/bin $. /ntetris <br/> selected visual: <br/> visual class: truecolor (4) <br/> ID: 33 <br/> bits_per_rgb: 8 <br/> map_entries: 256 <br/> red_mask: 0x00ff0000 <br/> green_mask: 0x0000ff00 <br/> blue_mask: 0x000000ff <br/> createfont: (Height = 0) found builtin font System (0) <br/> 15/04/2010 14:24:15 listening for VNC connections on TCP port 5900 <br/> 15/04/2010 14:24:15 listening for HTTP connections on TCP port 5800 <br/> 15/04/2010 14:24:15 URL http: // yutao-desktop: 5800 <br/> createfont: (Height = 0) found builtin font System (0) <br/> 15/04/2010 14:24:39 other clients: <br/> 15/04/2010 14:24:39 client Protocol version 3.8 <br/> 15/04/2010 14:24:39 Protocol version sent 3.8, using 3.8 <br/> 15/04/2010 14:24:39 rfbprocessclientsecuritytype: executing handler for Type 2 <br/> 15/04/2010 14:24:42 pixel format for client 192.168.1.10: <br/> 15/04/2010 14:24:42 32 bpp, depth 24, little endian <br/> 15/04/2010 14:24:42 true color: max R 255g 255 B 255, shift R 16G 8 B 0 <br/> 15/04/2010 14:24:42 Using Compression level 1 for client 192.168.1.10 <br/> 15/04/2010 14:24:42 using image quality level 6 for client 192.168.1.10 <br/> 15/04/2010 14:24:42 enabling X-style cursor updates for client 192.168.1.10 <br/> 15/04/2010 14:24:42 enabling full-color cursor updates for client 192.168.1.10 <br/> 15/04/2010 14:24:42 enabling cursor position updates for client 192.168.1.10 <br/> 15/04/2010 14:24:42 enabling lastrect protocol extension for client 192.168.1.10 <br/> 15/04/2010 14:24:42 using raw encoding for client 192.168.1.10 <br/>
Log of vncviewer connection:
$ Vncviewer 192.168.1.10 <br/> connected to RFB server, using protocol version 3.8 <br/> specify Ming standard VNC authentication <br/> password: <br/> authentication successful <br/> desktop name "nano-X" <br/> VNC Server default format: <br/> 32 bits per pixel. <br/> least significant byte first in each pixel. <br/> true color: Max red 65535 green 65535 blue 65535, shift red 0 green 255 blue 254 <br/> using default colormap which is truecolor. pixel format: <br/> 32 bits per pixel. <br/> least significant byte first in each pixel. <br/> true color: Max red 255 green 255 blue 255, shift Red 16 green 8 blue 0 <br/> using shared memory putimage <br/> same machine: preferring raw encoding <br/>
Vncviewer screen: