我正在尝试连接到托管在 Ubuntu 上的 VNCserver。我正在使用 Mac。终端通过命令进行连接open vnc://username@IP
。日志文件向我抛出了安全策略文件的错误。但我看不到任何这样的文件。我尝试过互联网上的解决方案,但没有用。
Xvnc Free Edition 4.1.1 - built Feb 25 2015 23:02:21
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 40300000, The XFree86 Project, Inc
Sat May 27 13:50:32 2017
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5901
vncext: created VNC server for screen 0
error opening security policy file /etc/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list!
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
** (gnome-session-binary:1804): WARNING **: Unknown option -session=gnome-classic
Failed to parse arguments: Unknown option --login
Window manager warning: Log level 32: could not find XKB extension.
Window manager warning: Missing composite extension required for compositing
Sat May 27 13:51:25 2017
Connections: accepted: 0.0.0.0::56680
Sat May 27 13:51:26 2017
SConnection: Client needs protocol version 3.3
Sat May 27 13:51:29 2017
Connections: closed: 0.0.0.0::56680 (Clean disconnection)
Connections: accepted: 0.0.0.0::56681
Sat May 27 13:51:30 2017
SConnection: Client needs protocol version 3.3
SConnection: AuthFailureException: Authentication failure
Connections: closed: 0.0.0.0::56681 (Authentication failure)
Sat May 27 13:51:36 2017
Connections: accepted: 0.0.0.0::56682
SConnection: Client needs protocol version 3.3
SConnection: AuthFailureException: Authentication failure
Connections: closed: 0.0.0.0::56682 (Authentication failure)
Sat May 27 13:51:39 2017
Connections: accepted: 0.0.0.0::56683
Sat May 27 13:51:40 2017
SConnection: Client needs protocol version 3.3
SConnection: AuthFailureException: Authentication failure
Connections: closed: 0.0.0.0::56683 (Authentication failure)
我的~/.vnc/xstartup
文件内容如下。注意 - 我gnome-classic
也尝试过不使用该行。
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
gnome-session -session=gnome-classic &
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
用于启动我的 VNC 服务器的命令:vncserver
xauth: (stdin):1: bad display name "dexter:1" in "add" command
New 'dexter:1 (dexter)' desktop is dexter:1
Starting applications specified in /home/dexter/.vnc/xstartup
Log file is /home/dexter/.vnc/dexter:1.log
lsb_release -a
通过命令查看 Ubuntu 的详细信息
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
通过ls /usr/share/xsessions
命令支持的会话
gnome.desktop gnome-flashback-metacity.desktop
gnome-flashback-compiz.desktop ubuntu.desktop
我使用 访问我的远程机器ssh username@IP
。我也尝试过使用-X
和-Y
选项。