X11VNC - connection failed due to incorrect password even though password correct
1
vote
2
answers
10002
views
Running Xubuntu 20.04 as VM on top of Ubuntu Server 20.04 with bridged interface. I am able to connect to the VM via SSH (also using Putty on Windows 10 machine that will access the VM).
Using VNCViewer (part of the TigerVNC project) on a Windows 10 machine I entered the IP address of the VM. A popup for password is displayed where I enter the password but when I click connect I get
TigerVNC
An unexpected error occurred when communicating with the server:
Authentication failure: password check failed!
Attempt to reconnect?
[No] [Yes]
I installed
x11vnc
the usual way using apt
. Following instructions online I created
* an encrypted password file
sudo x11vnc -storepasswd PASSWORD /home/USER/.vnc/passwd
* an unencrypted password file
echo PASSWORD > /home/USER/.vnc/password
Respectively I executed
x11vnc -forever -shared -display :0 -rfbauth /home/user/.vnc/passwd
for the encrypted and
x11vnc -forever -shared -display :0 -passwdfile /home/xubuntu/.vnc/passwd
for the unencrypted password file.
**Note:** Obviously I didn't do both in parallel. Also password typo is impossible due to the simplicity of the password (something like "abcd").
Both yielded the following log in the SSH terminal:
x11vnc -forever -shared -display :0 -passwdfile /home/xubuntu/.vnc/passwd
30/03/2022 10:38:02 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 6641
30/03/2022 10:38:02 Using X display :0
30/03/2022 10:38:02 rootwin: 0x53b reswin: 0x3800001 dpy: 0xc07a6840
30/03/2022 10:38:02
30/03/2022 10:38:02 ------------------ USEFUL INFORMATION ------------------
30/03/2022 10:38:02 X DAMAGE available on display, using it for polling hints.
30/03/2022 10:38:02 To disable this behavior use: '-noxdamage'
30/03/2022 10:38:02
30/03/2022 10:38:02 Most compositing window managers like 'compiz' or 'beryl'
30/03/2022 10:38:02 cause X DAMAGE to fail, and so you may not see any screen
30/03/2022 10:38:02 updates via VNC. Either disable 'compiz' (recommended) or
30/03/2022 10:38:02 supply the x11vnc '-noxdamage' command line option.
30/03/2022 10:38:02
30/03/2022 10:38:02 Wireframing: -wireframe mode is in effect for window moves.
30/03/2022 10:38:02 If this yields undesired behavior (poor response, painting
30/03/2022 10:38:02 errors, etc) it may be disabled:
30/03/2022 10:38:02 - use '-nowf' to disable wireframing completely.
30/03/2022 10:38:02 - use '-nowcr' to disable the Copy Rectangle after the
30/03/2022 10:38:02 moved window is released in the new position.
30/03/2022 10:38:02 Also see the -help entry for tuning parameters.
30/03/2022 10:38:02 You can press 3 Alt_L's (Left "Alt" key) in a row to
30/03/2022 10:38:02 repaint the screen, also see the -fixscreen option for
30/03/2022 10:38:02 periodic repaints.
30/03/2022 10:38:02
30/03/2022 10:38:02 XFIXES available on display, resetting cursor mode
30/03/2022 10:38:02 to: '-cursor most'.
30/03/2022 10:38:02 to disable this behavior use: '-cursor arrow'
30/03/2022 10:38:02 or '-noxfixes'.
30/03/2022 10:38:02 using XFIXES for cursor drawing.
30/03/2022 10:38:02 GrabServer control via XTEST.
30/03/2022 10:38:02
30/03/2022 10:38:02 Scroll Detection: -scrollcopyrect mode is in effect to
30/03/2022 10:38:02 use RECORD extension to try to detect scrolling windows
30/03/2022 10:38:02 (induced by either user keystroke or mouse input).
30/03/2022 10:38:02 If this yields undesired behavior (poor response, painting
30/03/2022 10:38:02 errors, etc) it may be disabled via: '-noscr'
30/03/2022 10:38:02 Also see the -help entry for tuning parameters.
30/03/2022 10:38:02 You can press 3 Alt_L's (Left "Alt" key) in a row to
30/03/2022 10:38:02 repaint the screen, also see the -fixscreen option for
30/03/2022 10:38:02 periodic repaints.
30/03/2022 10:38:02
30/03/2022 10:38:02 XKEYBOARD: number of keysyms per keycode 7 is greater
30/03/2022 10:38:02 than 4 and 51 keysyms are mapped above 4.
30/03/2022 10:38:02 Automatically switching to -xkb mode.
30/03/2022 10:38:02 If this makes the key mapping worse you can
30/03/2022 10:38:02 disable it with the "-noxkb" option.
30/03/2022 10:38:02 Also, remember "-remap DEAD" for accenting characters.
30/03/2022 10:38:02
30/03/2022 10:38:02 X FBPM extension not supported.
Xlib: extension "DPMS" missing on display ":0".
30/03/2022 10:38:02 X display is not capable of DPMS.
30/03/2022 10:38:02 --------------------------------------------------------
30/03/2022 10:38:02
30/03/2022 10:38:02 Default visual ID: 0x21
30/03/2022 10:38:02 Read initial data from X display into framebuffer.
30/03/2022 10:38:02 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/4096
30/03/2022 10:38:02
30/03/2022 10:38:02 X display :0 is 32bpp depth=24 true color
30/03/2022 10:38:02
30/03/2022 10:38:02 Autoprobing TCP port
30/03/2022 10:38:02 Autoprobing selected TCP port 5901
30/03/2022 10:38:02 Autoprobing TCP6 port
30/03/2022 10:38:02 rfbListenOnTCP6Port: error in bind IPv6 socket: Address already in use
30/03/2022 10:38:02 Autoprobing selected TCP6 port 5901
30/03/2022 10:38:02 listen6: bind: Address already in use
30/03/2022 10:38:02 Not listening on IPv6 interface.
30/03/2022 10:38:02
30/03/2022 10:38:02 Xinerama is present and active (e.g. multi-head).
30/03/2022 10:38:02 Xinerama: number of sub-screens: 1
30/03/2022 10:38:02 Xinerama: no blackouts needed (only one sub-screen)
30/03/2022 10:38:02
30/03/2022 10:38:02 fb read rate: 230 MB/sec
30/03/2022 10:38:02 fast read: reset -wait ms to: 10
30/03/2022 10:38:02 fast read: reset -defer ms to: 10
30/03/2022 10:38:02 The X server says there are 10 mouse buttons.
30/03/2022 10:38:02 screen setup finished.
30/03/2022 10:38:02
The VNC desktop is: SZA-DT043-L-VM0:1
PORT=5901
******************************************************************************
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
One thing I noticed is that at least in the case of creating an unencrypted password file running x11vnc
with sudo
yields an error
30/03/2022 10:46:06 x11vnc version: 0.9.16 lastmod: 2019-01-05 pid: 6708
No protocol specified
30/03/2022 10:46:06 XOpenDisplay(":0") failed.
30/03/2022 10:46:06 Trying again with XAUTHLOCALHOSTNAME=localhost ...
No protocol specified
30/03/2022 10:46:06 ***************************************
30/03/2022 10:46:06 *** XOpenDisplay failed (:0)
***x11vnc was unable to open the X DISPLAY ":0", it cannot continue
***There may be "Xlib:" error message above with details about the failure
Some tips and guidelines
...
I don't know how this affects the problem I am having but thought it might provide some insight to the more knowledgeable folks around here.
Since it's an internal company network I am not worried about someone breaking into my VM (which is meant to be disposable anyway). I will try to setup X11VNC without any authentication (if possible) but even if that works I am still interested into the cause of the issue at hand.
Asked by rbaleksandar
(512 rep)
Mar 30, 2022, 08:52 AM
Last activity: Sep 28, 2024, 07:19 AM
Last activity: Sep 28, 2024, 07:19 AM