Ubuntu18/armhf/ARM/VNC
1. sudo apt-get update
2. xfce4 xvfb
xfce4 xvfb
######################### slim is NOT compatible with systemd now
lake@localhost:~$ sudo apt install -y xfce4
sudo apt-get install -y xvfb
lake@localhost:~$ sudo apt-get install -y xvfb
3. VNC X11 Server
################ install vnc server
lake@localhost:~$ sudo apt-get install -y x11vnc
4. allowed_users/X11
lake@localhost:~$ cat /etc/X11/Xwrapper.config
# Xwrapper.config (Debian X Window System server wrapper configuration file)
#
# This file was generated by the post-installation script of the
# xserver-xorg-legacy package using values from the debconf database.
#
# See the Xwrapper.config(5) manual page for more information.
#
# This file is automatically updated on upgrades of the xserver-xorg-legacy
# package *only* if it has not been modified since the last upgrade of that
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command as root:
# dpkg-reconfigure xserver-xorg-legacy
allowed_users=anybody
lake@localhost:~$
5. start Xvfb wiht xfce local
############# start X11
lake@localhost:~$export DISPLAY=:1
lake@localhost:~$Xvfb $DISPLAY -screen 0 800x600x24 &
ps -elf |grep Xvfb
0 S lake 520 355 2 80 0 - 42050 ? 12:47 pts/0 00:00:00 Xvfb :1 -screen 0 800x600x24
0 R lake 532 355 0 80 0 - 1176 - 12:47 pts/0 00:00:00 ps -elf
lake@localhost:~$ startxfce4 &
lake@localhost:~$ bg
[2]+ startxfce4 &
lake@localhost:~$ jobs
[1]- Running Xvfb $DISPLAY -screen 0 800x600x24 &
[2]+ Running startxfce4 & ===============> After X11vnc
lake@localhost:/vip42x5_HiSTBLinuxV100R005C00SPC050$ netstat -an --tcp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 184 10.213.5.74:22 10.213.0.8:49363 ESTABLISHED
6. start X11 vnc server
############# start X11 vnc server : default 5900 port
lake@localhost:~$ x11vnc -display $DISPLAY -bg -nopw -listen 0.0.0.0 -xkb
27/07/2020 10:55:23 passing arg to libvncserver: -listen
27/07/2020 10:55:23 passing arg to libvncserver: 0.0.0.0
27/07/2020 10:55:23 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 1329
27/07/2020 10:55:23 Using X display :1
27/07/2020 10:55:23 rootwin: 0x298 reswin: 0x1600001 dpy: 0x80ac82a8
27/07/2020 10:55:23
27/07/2020 10:55:23 ------------------ USEFUL INFORMATION ------------------
27/07/2020 10:55:23 X DAMAGE available on display, using it for polling hints.
27/07/2020 10:55:23 To disable this behavior use: '-noxdamage'
27/07/2020 10:55:23
27/07/2020 10:55:23 Most compositing window managers like 'compiz' or 'beryl'
27/07/2020 10:55:23 cause X DAMAGE to fail, and so you may not see any screen
27/07/2020 10:55:23 updates via VNC. Either disable 'compiz' (recommended) or
27/07/2020 10:55:23 supply the x11vnc '-noxdamage' command line option.
27/07/2020 10:55:23
27/07/2020 10:55:23 Wireframing: -wireframe mode is in effect for window moves.
27/07/2020 10:55:23 If this yields undesired behavior (poor response, painting
27/07/2020 10:55:23 errors, etc) it may be disabled:
27/07/2020 10:55:23 - use '-nowf' to disable wireframing completely.
27/07/2020 10:55:23 - use '-nowcr' to disable the Copy Rectangle after the
27/07/2020 10:55:23 moved window is released in the new position.
27/07/2020 10:55:23 Also see the -help entry for tuning parameters.
27/07/2020 10:55:23 You can press 3 Alt_L's (Left "Alt" key) in a row to
27/07/2020 10:55:23 repaint the screen, also see the -fixscreen option for
27/07/2020 10:55:23 periodic repaints.
27/07/2020 10:55:23
27/07/2020 10:55:23 XFIXES available on display, resetting cursor mode
27/07/2020 10:55:23 to: '-cursor most'.
27/07/2020 10:55:23 to disable this behavior use: '-cursor arrow'
27/07/2020 10:55:23 or '-noxfixes'.
27/07/2020 10:55:23 using XFIXES for cursor drawing.
27/07/2020 10:55:23 GrabServer control via XTEST.
27/07/2020 10:55:23
27/07/2020 10:55:23 Scroll Detection: -scrollcopyrect mode is in effect to
27/07/2020 10:55:23 use RECORD extension to try to detect scrolling windows
27/07/2020 10:55:23 (induced by either user keystroke or mouse input).
27/07/2020 10:55:23 If this yields undesired behavior (poor response, painting
27/07/2020 10:55:23 errors, etc) it may be disabled via: '-noscr'
27/07/2020 10:55:23 Also see the -help entry for tuning parameters.
27/07/2020 10:55:23 You can press 3 Alt_L's (Left "Alt" key) in a row to
27/07/2020 10:55:23 repaint the screen, also see the -fixscreen option for
27/07/2020 10:55:23 periodic repaints.
27/07/2020 10:55:23 X FBPM extension not supported.
27/07/2020 10:55:23 X display is not capable of DPMS.
27/07/2020 10:55:23 --------------------------------------------------------
27/07/2020 10:55:23
27/07/2020 10:55:23 Default visual ID: 0x21
27/07/2020 10:55:24 Read initial data from X display into framebuffer.
27/07/2020 10:55:24 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/3200
27/07/2020 10:55:24
27/07/2020 10:55:24 X display :1 is 32bpp depth=24 true color
27/07/2020 10:55:24
27/07/2020 10:55:24 Autoprobing TCP port
27/07/2020 10:55:24 Autoprobing selected TCP port 5900
27/07/2020 10:55:24 Autoprobing TCP6 port
27/07/2020 10:55:25 Not listening on IPv6 interface.
27/07/2020 10:55:25
27/07/2020 10:55:25 Xinerama is present and active (e.g. multi-head).
27/07/2020 10:55:25 Xinerama: number of sub-screens: 1
27/07/2020 10:55:25 Xinerama: no blackouts needed (only one sub-screen)
27/07/2020 10:55:25
27/07/2020 10:55:25 fb read rate: 461 MB/sec
27/07/2020 10:55:25 fast read: reset -wait ms to: 10
27/07/2020 10:55:25 fast read: reset -defer ms to: 10
27/07/2020 10:55:25 The X server says there are 10 mouse buttons.
27/07/2020 10:55:25 screen setup finished.
27/07/2020 10:55:25
The VNC desktop is: 0.0.0.0:0
PORT=5900
******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?
The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval. It should work with any VNC viewer. Try it by running:
x11vnc -ncache 10 ...
One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching
lake@localhost:/vip42x5_HiSTBLinuxV100R005C00SPC050$ netstat -an --tcp -p
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 803/x11vnc
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
tcp 0 256 10.213.5.74:22 10.213.0.8:49363 ESTABLISHED -
7. Win10/VNCview client
VNCview 10.213.5.74:0 ====> xfce4 X GUI
############## VNCview 10.213.5.74:0
lake@localhost:~$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Xvfb mouse id=6 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Xvfb keyboard id=7 [slave keyboard (3)]
lake@localhost:~$
lake@localhost:~$ xdpyinfo |more
name of display: :1
version number: 11.0
vendor string: The X.Org Foundation
vendor release number: 11906000
X.Org version: 1.19.6
maximum request size: 16777212 bytes
motion buffer size: 256
bitmap unit, bit order, padding: 32, LSBFirst, 32
image byte order: LSBFirst
number of supported pixmap formats: 6
supported pixmap formats:
depth 1, bits_per_pixel 1, scanline_pad 32
depth 4, bits_per_pixel 8, scanline_pad 32
depth 8, bits_per_pixel 8, scanline_pad 32
depth 16, bits_per_pixel 16, scanline_pad 32
depth 24, bits_per_pixel 32, scanline_pad 32
depth 32, bits_per_pixel 32, scanline_pad 32
keycode range: minimum 8, maximum 255
focus: window 0x1800004, revert to Parent
number of extensions: 25
BIG-REQUESTS
Composite
DAMAGE
DOUBLE-BUFFER
DPMS
GLX
Generic Event Extension
MIT-SCREEN-SAVER
MIT-SHM
Present
RANDR
lake@localhost:~$
8 By Win10 X Windows Server on Win10/MobaXterm_Personal_12.2
Note SSH X11 forward must be enabled!