首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >X11VNC -尽管密码正确,但由于密码错误,连接失败

X11VNC -尽管密码正确,但由于密码错误,连接失败
EN

Unix & Linux用户
提问于 2022-03-30 08:52:18
回答 1查看 4K关注 0票数 1

将Xubuntu20.04作为VM运行在UbuntuServer20.04之上,并具有桥接接口。我能够通过SSH连接到VM (也可以在Windows 10机器上使用Putty来访问VM)。

使用VNCViewer ( TigerVNC项目的一部分)在Windows 10机器上输入VM的IP地址。当我输入密码时,会显示一个密码弹出,但当我单击connect时,就会得到

代码语言:javascript
复制
TigerVNC
An unexpected error occurred when communicating with the server:
Authentication failure: password check failed!
Attempt to reconnect?

                                                      [No] [Yes]

我以通常使用apt的方式安装了D2。按照联机说明我创建了

  • 加密密码文件sudo x11vnc -storepasswd密码/home/USER/..vnc/passwd
  • 未加密的密码文件回显密码>/home/USER/..vnc/ password

我分别执行了

代码语言:javascript
复制
x11vnc -forever -shared -display :0 -rfbauth /home/user/.vnc/passwd

为了加密和

代码语言:javascript
复制
x11vnc -forever -shared -display :0 -passwdfile /home/xubuntu/.vnc/passwd

用于未加密的密码文件。

注意:显然我没有并行地做这两件事。此外,由于密码的简单性(类似于"abcd"),密码错误是不可能的。

两者都在SSH终端中生成了以下日志:

代码语言:javascript
复制
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

我注意到的一件事是,至少在创建一个未加密的密码文件时,使用x11vnc运行sudo会产生一个错误。

代码语言:javascript
复制
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
 ...

我不知道这是如何影响我的问题,但认为它可能会提供一些洞察力,在这里的知识更多的人。

因为这是一个内部的公司网络,我不担心有人闯入我的VM (反正这是一次性的)。我将尝试在没有任何身份验证的情况下设置X11VNC (如果可能的话),但是即使这样做有效,我仍然对当前问题的原因感兴趣。

EN

回答 1

Unix & Linux用户

发布于 2022-03-31 06:44:04

解决办法太荒谬了。我正在使用TigerVNC查看器。显然,它需要端口5900 (我希望,这是默认的VNC端口),但是我的x11vnc总是从5901开始。我所要做的就是增加港口。如果其他人无意中遇到这种不便,请使用:访问您的计算机,以防端口不是5900。

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/697340

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档