Есть удаленная машина с серверной Ubuntu 14.04.2 LTS (без иксов). Подключился по ssh, поставил gnome (пакеты gnome-shell и ubuntu-gnome-desktop) и x11vnc. Далее как и написано тут
http://askubuntu.com/questions/304017/how-to-set-up-remote-desktop-sharing-through-ssh сделал ssh туннель с локального порта 5900 на localhost:5900 (удаленной машины). Подключился по ssh и там выполнил sudo x11vnc -display :0 -noxdamage. Судя по выводу команды все хорошо:
###############################################################
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@ @#
#@ ** WARNING ** WARNING ** WARNING ** WARNING ** @#
#@ @#
#@ YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!! @#
#@ @#
#@ This means anyone with network access to this computer @#
#@ may be able to view and control your desktop. @#
#@ @#
#@ >>> If you did not mean to do this Press CTRL-C now!! <<< @#
#@ @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@ @#
#@ You can create an x11vnc password file by running: @#
#@ @#
#@ x11vnc -storepasswd password /path/to/passfile @#
#@ or x11vnc -storepasswd /path/to/passfile @#
#@ or x11vnc -storepasswd @#
#@ @#
#@ (the last one will use ~/.vnc/passwd) @#
#@ @#
#@ and then starting x11vnc via: @#
#@ @#
#@ x11vnc -rfbauth /path/to/passfile @#
#@ @#
#@ an existing ~/.vnc/passwd file from another VNC @#
#@ application will work fine too. @#
#@ @#
#@ You can also use the -passwdfile or -passwd options. @#
#@ (note -passwd is unsafe if local users are not trusted) @#
#@ @#
#@ Make sure any -rfbauth and -passwdfile password files @#
#@ cannot be read by untrusted users. @#
#@ @#
#@ Use x11vnc -usepw to automatically use your @#
#@ ~/.vnc/passwd or ~/.vnc/passwdfile password files. @#
#@ (and prompt you to create ~/.vnc/passwd if neither @#
#@ file exists.) Under -usepw, x11vnc will exit if it @#
#@ cannot find a password to use. @#
#@ @#
#@ @#
#@ Even with a password, the subsequent VNC traffic is @#
#@ sent in the clear. Consider tunnelling via ssh(1): @#
#@ @#
#@ http://www.karlrunge.com/x11vnc/#tunnelling @#
#@ @#
#@ Or using the x11vnc SSL options: -ssl and -stunnel @#
#@ @#
#@ Please Read the documention for more info about @#
#@ passwords, security, and encryption. @#
#@ @#
#@ http://www.karlrunge.com/x11vnc/faq.html#faq-passwd @#
#@ @#
#@ To disable this warning use the -nopw option, or put @#
#@ 'nopw' on a line in your ~/.x11vncrc file. @#
#@ @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
###############################################################
29/06/2015 09:39:05 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 1848
29/06/2015 09:39:05 Using X display :0
29/06/2015 09:39:05 rootwin: 0x16d reswin: 0xe00001 dpy: 0x27acb60
29/06/2015 09:39:05
29/06/2015 09:39:05 ------------------ USEFUL INFORMATION ------------------
29/06/2015 09:39:05
29/06/2015 09:39:05 Wireframing: -wireframe mode is in effect for window moves.
29/06/2015 09:39:05 If this yields undesired behavior (poor response, painting
29/06/2015 09:39:05 errors, etc) it may be disabled:
29/06/2015 09:39:05 - use '-nowf' to disable wireframing completely.
29/06/2015 09:39:05 - use '-nowcr' to disable the Copy Rectangle after the
29/06/2015 09:39:05 moved window is released in the new position.
29/06/2015 09:39:05 Also see the -help entry for tuning parameters.
29/06/2015 09:39:05 You can press 3 Alt_L's (Left "Alt" key) in a row to
29/06/2015 09:39:05 repaint the screen, also see the -fixscreen option for
29/06/2015 09:39:05 periodic repaints.
29/06/2015 09:39:05
29/06/2015 09:39:05 XFIXES available on display, resetting cursor mode
29/06/2015 09:39:05 to: '-cursor most'.
29/06/2015 09:39:05 to disable this behavior use: '-cursor arrow'
29/06/2015 09:39:05 or '-noxfixes'.
29/06/2015 09:39:05 using XFIXES for cursor drawing.
29/06/2015 09:39:05 GrabServer control via XTEST.
29/06/2015 09:39:05
29/06/2015 09:39:05 Scroll Detection: -scrollcopyrect mode is in effect to
29/06/2015 09:39:05 use RECORD extension to try to detect scrolling windows
29/06/2015 09:39:05 (induced by either user keystroke or mouse input).
29/06/2015 09:39:05 If this yields undesired behavior (poor response, painting
29/06/2015 09:39:05 errors, etc) it may be disabled via: '-noscr'
29/06/2015 09:39:05 Also see the -help entry for tuning parameters.
29/06/2015 09:39:05 You can press 3 Alt_L's (Left "Alt" key) in a row to
29/06/2015 09:39:05 repaint the screen, also see the -fixscreen option for
29/06/2015 09:39:05 periodic repaints.
29/06/2015 09:39:05
29/06/2015 09:39:05 XKEYBOARD: number of keysyms per keycode 7 is greater
29/06/2015 09:39:05 than 4 and 51 keysyms are mapped above 4.
29/06/2015 09:39:05 Automatically switching to -xkb mode.
29/06/2015 09:39:05 If this makes the key mapping worse you can
29/06/2015 09:39:05 disable it with the "-noxkb" option.
29/06/2015 09:39:05 Also, remember "-remap DEAD" for accenting characters.
29/06/2015 09:39:05
29/06/2015 09:39:05 X FBPM extension not supported.
29/06/2015 09:39:05 X display is capable of DPMS.
29/06/2015 09:39:05 --------------------------------------------------------
29/06/2015 09:39:05
29/06/2015 09:39:05 Default visual ID: 0x21
29/06/2015 09:39:07 Read initial data from X display into framebuffer.
29/06/2015 09:39:07 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/4096
29/06/2015 09:39:07
29/06/2015 09:39:07 X display :0 is 32bpp depth=24 true color
29/06/2015 09:39:07
29/06/2015 09:39:07 Autoprobing TCP port
29/06/2015 09:39:07 Autoprobing selected TCP port 5900
29/06/2015 09:39:07 Autoprobing TCP6 port
29/06/2015 09:39:07 Autoprobing selected TCP6 port 5900
29/06/2015 09:39:07 listen6: bind: Address already in use
29/06/2015 09:39:07 Not listening on IPv6 interface.
29/06/2015 09:39:07
29/06/2015 09:39:07 Xinerama is present and active (e.g. multi-head).
29/06/2015 09:39:07 Xinerama: number of sub-screens: 1
29/06/2015 09:39:07 Xinerama: no blackouts needed (only one sub-screen)
29/06/2015 09:39:07
29/06/2015 09:39:08 fb read rate: 2 MB/sec
29/06/2015 09:39:08 The X server says there are 10 mouse buttons.
29/06/2015 09:39:08 screen setup finished.
29/06/2015 09:39:08
29/06/2015 09:39:08 WARNING: You are running x11vnc WITHOUT a password. See
29/06/2015 09:39:08 WARNING: the warning message printed above for more info.
29/06/2015 09:39:08
The VNC desktop is: ubuntu: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
Далее подключаюсь с помощью TightVNC (из-под винды) к localhost:5900 с параметрами из скриншота:
http://tinyurl.com/ppbbaokНо вижу черный экран и через какое-то время курсор становится черным крестиком. При этом в логи выводится следующее:
29/06/2015 09:44:28 Got connection from client ::1
29/06/2015 09:44:28 other clients:
29/06/2015 09:44:28 Normal socket connection
29/06/2015 09:44:28 Disabled X server key autorepeat.
29/06/2015 09:44:28 to force back on run: 'xset r on' (3 times)
29/06/2015 09:44:28 incr accepted_client=1 for ::1:46347 sock=11
29/06/2015 09:44:28 Client Protocol Version 3.8
29/06/2015 09:44:28 Protocol version sent 3.8, using 3.8
29/06/2015 09:44:28 rfbProcessClientSecurityType: executing handler for type 1
29/06/2015 09:44:28 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
29/06/2015 09:44:29 Using image quality level 5 for client ::1
29/06/2015 09:44:29 Using JPEG subsampling 2, Q77 for client ::1
29/06/2015 09:44:29 Enabling NewFBSize protocol extension for client ::1
29/06/2015 09:44:29 Enabling LastRect protocol extension for client ::1
29/06/2015 09:44:29 Enabling cursor position updates for client ::1
29/06/2015 09:44:29 Enabling full-color cursor updates for client ::1
29/06/2015 09:44:29 Using tight encoding for client ::1
29/06/2015 09:44:30 client useCopyRect: ::1 -1
29/06/2015 09:44:30 client_set_net: ::1 0.0000
29/06/2015 09:45:14 created selwin: 0xe00024
29/06/2015 09:45:14 called initialize_xfixes()
Пробовал /etc/X11/xorg.conf делать такой как тут:
http://ubuntuforums.org/showthread.php?t=1586016&highlight=headless Не помогло. Также видел совет, что нужно в /etc/hosts закомментировать строчку ::1 localhost ipv6-localhost ipv6-loopback. Но тоже не помогло. Куда копать?