[问题]求助~VNC突然出現問題..

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
chrispong
帖子: 8
注册时间: 2008-08-15 0:58

[问题]求助~VNC突然出現問題..

#1

帖子 chrispong » 2008-09-08 15:25

各位大大:

電腦1: Ubuntu server 8.04內已安裝VNC Server
電腦2: Windows XP 遠端Remote連上電腦1(一直都沒有問題)

今天當update Ubuntu server後,
VNC出現了無法Remote電腦1的情況,但用firefox上網是正常的
我已測試用Ubuntu的VNC viewer remote電腦1
並出現了一句 "到主機「xxx.xxx.xxx.xxx:5900」的連線已關閉"

而在電腦2 remote 電腦1, 就出現了:
VNC Viewer: Question
The connection closed unexpectedly
Do you wish to attempt to reconnect to xxx.xxx.xxx.xxx?

求教求教~~請問如何才可以解決此問題呢?
头像
arabian
帖子: 91
注册时间: 2007-10-29 17:29

#2

帖子 arabian » 2008-09-08 21:50

连接失败后,去看一下VNC server的日志文件有没有记录。
chrispong
帖子: 8
注册时间: 2008-08-15 0:58

#3

帖子 chrispong » 2008-09-09 11:42

arabian 写了:连接失败后,去看一下VNC server的日志文件有没有记录。
arabian大, 請問vnc server日志文件在那?
头像
arabian
帖子: 91
注册时间: 2007-10-29 17:29

#4

帖子 arabian » 2008-09-09 13:05

一般是在/home/xxx/.vnc/目录下面。
chrispong
帖子: 8
注册时间: 2008-08-15 0:58

#5

帖子 chrispong » 2008-09-10 11:17

arabian 写了:一般是在/home/xxx/.vnc/目录下面。
請各位幫幫忙~~~~

我在 /root/.vnc/ 內有四個files:
==================================================
abcabc.com:2.log
abcabc:2.pid
passwd
xstartup


而在abcabc.com:2.log 中出現以下內容:
==================================================
Unrecognized option: -kill:display
use: X [:<display>] [option]
-a # mouse acceleration (pixels)
-ac disable access control restrictions
-audit int set audit trail level
-auth file select authorization file
bc enable bug compatibility
-br create root window with black background
+bs enable any backing store support
-bs disable any backing store support
-c turns off key-click
c # key-click volume (0-100)
-cc int default color visual class
-co file color database file
-core generate core dump on fatal error
-dpi int screen resolution in dots per inch
dpms enables VESA DPMS monitor control
-dpms disables VESA DPMS monitor control
-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs
-f # bell base (0-100)
-fc string cursor font
-fn string default font name
-fp string default font path
-help prints message with these options
-I ignore all remaining arguments
-ld int limit data space to N Kb
-lf int limit number of open files to N
-ls int limit stack space to N Kb
-nolock disable the locking mechanism
-logo enable logo in screen saver
nologo disable logo in screen saver
-nolisten string don't listen on protocol
-noreset don't reset after last client exists
-reset reset after last client exists
-p # screen-saver pattern duration (minutes)
-pn accept failure to listen on all ports
-nopn reject failure to listen on all ports
-r turns off auto-repeat
r turns on auto-repeat
-render [default|mono|gray|color] set render color alloc policy
-s # screen-saver timeout (minutes)
-sp file security policy file
-su disable any save under support
-t # mouse threshold (pixels)
-terminate terminate at server reset
-to # connection time out
-tst disable testing extensions
ttyxx server started from init on /dev/ttyxx
v video blanking for screen-saver
-v screen-saver without video blanking
-wm WhenMapped default backing-store
-x string loads named extension at init time
-maxbigreqsize set maximal bigrequest size
+xinerama Enable XINERAMA extension
-xinerama Disable XINERAMA extension
-dumbSched Disable smart scheduling, enable old behavior
-schedInterval int Set scheduler interval in msec
+extension name Enable extension
-extension name Disable extension
-query host-name contact named host for XDMCP
-broadcast broadcast for XDMCP
-multicast [addr [hops]] IPv6 multicast for XDMCP
-indirect host-name contact named host for indirect XDMCP
-port port-num UDP port number to send messages to
-from local-address specify the local address to connect from
-once Terminate server after one session
-class display-class specify display class to send in manage
-cookie xdm-auth-bits specify the magic cookie for XDMCP
-displayID display-id manufacturer display ID for request
The X Keyboard Extension adds the following arguments:
-kb disable the X Keyboard Extension
+kb enable the X Keyboard Extension
[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]
enable/disable accessx key sequences
-ar1 set XKB autorepeat delay
-ar2 set XKB autorepeat interval
-noloadxkb don't load XKB keymap description
-xkbdb file that contains default XKB keymaps
-xkbmap XKB keyboard description to load on startup

Xvnc Free Edition 4.1.1
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 70000000, The X.Org Foundation

-screen scrn WxHxD set screen's width, height, depth
-pixdepths list-of-int support given pixmap depths
-linebias n adjust thin line pixelization
-blackpixel n pixel value for black
-whitepixel n pixel value for white
-geometry WxH set screen 0's width, height
-depth D set screen 0's depth
-pixelformat fmt set pixel format (rgbNNN or bgrNNN)
-inetd has been launched from inetd

VNC parameters:

Parameters can be turned on with -<param> or off with -<param>=0
Parameters which take a value can be specified as -<param> <value>
Other valid forms are <param>=<value> -<param>=<value> --<param>=<value>
Parameter names are case-insensitive. The parameters are:

Global Parameters:
localhost - Only allow connections from localhost (default=0)
desktop - Name of VNC desktop (default=x11)
rfbport - TCP port to listen for RFB protocol (default=0)
rfbwait - Alias for ClientWaitTimeMillis
httpPort - TCP port to listen for HTTP (default=0)
httpd - Directory containing files to serve via HTTP (default=)
rfbauth - Alias for PasswordFile
QueryConnectTimeout - Number of seconds to show the Accept Connection dialog
before rejecting the connection (default=10)
AlwaysSetDeferUpdateTimer - Always reset the defer update timer on every
change (default=0)
DeferUpdate - Time in milliseconds to defer updates (default=40)
Log - Specifies which log output should be directed to which
target logger, and the level of output to log. Format is
<log>:<target>:<level>[, ...]. (default=)
QueryConnect - Prompt the local user to accept or reject incoming
connections. (default=0)
SendCutText - Send clipboard changes to clients. (default=1)
AcceptCutText - Accept clipboard updates from clients. (default=1)
AcceptPointerEvents - Accept pointer press and release events from clients.
(default=1)
AcceptKeyEvents - Accept key press and release events from clients.
(default=1)
DisconnectClients - Disconnect existing clients if an incoming connection is
non-shared. If combined with NeverShared then new
connections will be refused while there is a client active
(default=1)
NeverShared - Never treat incoming connections as shared, regardless of
the client-specified setting (default=0)
AlwaysShared - Always treat incoming connections as shared, regardless of
the client-specified setting (default=0)
Protocol3.3 - Always use protocol version 3.3 for backwards compatibility
with badly-behaved clients (default=0)
CompareFB - Perform pixel comparison on framebuffer to reduce
unnecessary updates (default=1)
ClientWaitTimeMillis - The number of milliseconds to wait for a client which
is no longer responding (default=20000)
IdleTimeout - The number of seconds after which an idle VNC connection
will be dropped (zero means no timeout) (default=0)
Password - Obfuscated binary encoding of the password which clients
must supply to access the server (default=)
PasswordFile - Password file for VNC authentication (default=)
ReverseSecurityTypes - Specify encryption scheme to use for reverse
connections (None) (default=None)
SecurityTypes - Specify which security scheme to use for incoming
connections (None, VncAuth) (default=VncAuth)
BlacklistTimeout - The initial timeout applied when a host is first
black-listed. The host cannot re-attempt a connection until
the timeout expires. (default=10)
BlacklistThreshold - The number of unauthenticated connection attempts
allowed from any individual host before that host is
black-listed (default=5)
RemapKeys - Comma-separated list of incoming keysyms to remap. Mappings
are expressed as two hex values, prefixed by 0x, and
separated by -> (default=)
ZlibLevel - Zlib compression level (default=-1)
MaxCutText - Maximum permitted length of an incoming clipboard update
(default=262144)

Fatal server error:
Unrecognized option: -kill:display

xsetroot: unable to open display 'abcabc.com:2'
/root/.vnc/xstartup: 12: twm: not found
vncconfig: unable to open display "abcabc.com:2"
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s
头像
forsearch
帖子: 105
注册时间: 2008-05-17 18:36

#6

帖子 forsearch » 2008-09-10 12:48

chrispong 写了:
arabian 写了:一般是在/home/xxx/.vnc/目录下面。
請各位幫幫忙~~~~

我在 /root/.vnc/ 內有四個files:
==================================================
abcabc.com:2.log
abcabc:2.pid
passwd
xstartup


而在abcabc.com:2.log 中出現以下內容:
==================================================
Unrecognized option: -kill:display
use: X [:<display>] [option]
-a # mouse acceleration (pixels)
-ac disable access control restrictions
-audit int set audit trail level
-auth file select authorization file
bc enable bug compatibility
-br create root window with black background
+bs enable any backing store support
-bs disable any backing store support
-c turns off key-click
c # key-click volume (0-100)
-cc int default color visual class
-co file color database file
-core generate core dump on fatal error
-dpi int screen resolution in dots per inch
dpms enables VESA DPMS monitor control
-dpms disables VESA DPMS monitor control
-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs
-f # bell base (0-100)
-fc string cursor font
-fn string default font name
-fp string default font path
-help prints message with these options
-I ignore all remaining arguments
-ld int limit data space to N Kb
-lf int limit number of open files to N
-ls int limit stack space to N Kb
-nolock disable the locking mechanism
-logo enable logo in screen saver
nologo disable logo in screen saver
-nolisten string don't listen on protocol
-noreset don't reset after last client exists
-reset reset after last client exists
-p # screen-saver pattern duration (minutes)
-pn accept failure to listen on all ports
-nopn reject failure to listen on all ports
-r turns off auto-repeat
r turns on auto-repeat
-render [default|mono|gray|color] set render color alloc policy
-s # screen-saver timeout (minutes)
-sp file security policy file
-su disable any save under support
-t # mouse threshold (pixels)
-terminate terminate at server reset
-to # connection time out
-tst disable testing extensions
ttyxx server started from init on /dev/ttyxx
v video blanking for screen-saver
-v screen-saver without video blanking
-wm WhenMapped default backing-store
-x string loads named extension at init time
-maxbigreqsize set maximal bigrequest size
+xinerama Enable XINERAMA extension
-xinerama Disable XINERAMA extension
-dumbSched Disable smart scheduling, enable old behavior
-schedInterval int Set scheduler interval in msec
+extension name Enable extension
-extension name Disable extension
-query host-name contact named host for XDMCP
-broadcast broadcast for XDMCP
-multicast [addr [hops]] IPv6 multicast for XDMCP
-indirect host-name contact named host for indirect XDMCP
-port port-num UDP port number to send messages to
-from local-address specify the local address to connect from
-once Terminate server after one session
-class display-class specify display class to send in manage
-cookie xdm-auth-bits specify the magic cookie for XDMCP
-displayID display-id manufacturer display ID for request
The X Keyboard Extension adds the following arguments:
-kb disable the X Keyboard Extension
+kb enable the X Keyboard Extension
[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]
enable/disable accessx key sequences
-ar1 set XKB autorepeat delay
-ar2 set XKB autorepeat interval
-noloadxkb don't load XKB keymap description
-xkbdb file that contains default XKB keymaps
-xkbmap XKB keyboard description to load on startup

Xvnc Free Edition 4.1.1
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 70000000, The X.Org Foundation

-screen scrn WxHxD set screen's width, height, depth
-pixdepths list-of-int support given pixmap depths
-linebias n adjust thin line pixelization
-blackpixel n pixel value for black
-whitepixel n pixel value for white
-geometry WxH set screen 0's width, height
-depth D set screen 0's depth
-pixelformat fmt set pixel format (rgbNNN or bgrNNN)
-inetd has been launched from inetd

VNC parameters:

Parameters can be turned on with -<param> or off with -<param>=0
Parameters which take a value can be specified as -<param> <value>
Other valid forms are <param>=<value> -<param>=<value> --<param>=<value>
Parameter names are case-insensitive. The parameters are:

Global Parameters:
localhost - Only allow connections from localhost (default=0)
desktop - Name of VNC desktop (default=x11)
rfbport - TCP port to listen for RFB protocol (default=0)
rfbwait - Alias for ClientWaitTimeMillis
httpPort - TCP port to listen for HTTP (default=0)
httpd - Directory containing files to serve via HTTP (default=)
rfbauth - Alias for PasswordFile
QueryConnectTimeout - Number of seconds to show the Accept Connection dialog
before rejecting the connection (default=10)
AlwaysSetDeferUpdateTimer - Always reset the defer update timer on every
change (default=0)
DeferUpdate - Time in milliseconds to defer updates (default=40)
Log - Specifies which log output should be directed to which
target logger, and the level of output to log. Format is
<log>:<target>:<level>[, ...]. (default=)
QueryConnect - Prompt the local user to accept or reject incoming
connections. (default=0)
SendCutText - Send clipboard changes to clients. (default=1)
AcceptCutText - Accept clipboard updates from clients. (default=1)
AcceptPointerEvents - Accept pointer press and release events from clients.
(default=1)
AcceptKeyEvents - Accept key press and release events from clients.
(default=1)
DisconnectClients - Disconnect existing clients if an incoming connection is
non-shared. If combined with NeverShared then new
connections will be refused while there is a client active
(default=1)
NeverShared - Never treat incoming connections as shared, regardless of
the client-specified setting (default=0)
AlwaysShared - Always treat incoming connections as shared, regardless of
the client-specified setting (default=0)
Protocol3.3 - Always use protocol version 3.3 for backwards compatibility
with badly-behaved clients (default=0)
CompareFB - Perform pixel comparison on framebuffer to reduce
unnecessary updates (default=1)
ClientWaitTimeMillis - The number of milliseconds to wait for a client which
is no longer responding (default=20000)
IdleTimeout - The number of seconds after which an idle VNC connection
will be dropped (zero means no timeout) (default=0)
Password - Obfuscated binary encoding of the password which clients
must supply to access the server (default=)
PasswordFile - Password file for VNC authentication (default=)
ReverseSecurityTypes - Specify encryption scheme to use for reverse
connections (None) (default=None)
SecurityTypes - Specify which security scheme to use for incoming
connections (None, VncAuth) (default=VncAuth)
BlacklistTimeout - The initial timeout applied when a host is first
black-listed. The host cannot re-attempt a connection until
the timeout expires. (default=10)
BlacklistThreshold - The number of unauthenticated connection attempts
allowed from any individual host before that host is
black-listed (default=5)
RemapKeys - Comma-separated list of incoming keysyms to remap. Mappings
are expressed as two hex values, prefixed by 0x, and
separated by -> (default=)
ZlibLevel - Zlib compression level (default=-1)
MaxCutText - Maximum permitted length of an incoming clipboard update
(default=262144)

Fatal server error:
Unrecognized option: -kill:display

xsetroot: unable to open display 'abcabc.com:2'
/root/.vnc/xstartup: 12: twm: not found
vncconfig: unable to open display "abcabc.com:2"
Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s

貌似sever已经关闭了
头像
arabian
帖子: 91
注册时间: 2007-10-29 17:29

#7

帖子 arabian » 2008-09-10 15:01

Fatal server error:
Unrecognized option: -kill:display

-kill这个参数是加到哪里了。
chrispong
帖子: 8
注册时间: 2008-08-15 0:58

#8

帖子 chrispong » 2008-09-11 9:34

arabian 写了:Fatal server error:
Unrecognized option: -kill:display

-kill这个参数是加到哪里了。
請問arabian大大,
不太明白你的意思,可以再解答一下嗎? 感謝
头像
arabian
帖子: 91
注册时间: 2007-10-29 17:29

#9

帖子 arabian » 2008-09-11 12:36

出现错误的时候,看一下系统进程,vncserver是不是已经崩溃掉了。

如果这些是全部的日志内容,那么里面并没有关于远程连接的问题,反正我是没看到。

有点用处的就是最后这几行。
Fatal server error:
Unrecognized option: -kill:display

xsetroot: unable to open display 'abcabc.com:2'
/root/.vnc/xstartup: 12: twm: not found
vncconfig: unable to open display "abcabc.com:2"

第一行那个“致命错误”是说有不合法的参数“-kill:display”,我只知道在服务器端-kill这个参数是用来结束远程桌面的,比如你在服务器上执行vncserver -kill:2这样的命令,就会结束掉id是2的这个远程桌面。所以我不太理解它为什么会出现在错误日志里面,你可以检查一下vncserver的启动脚本。

下面的几行跟窗口界面有关,你可以检查一下X window有没有问题,twm这个窗口管理器有没有安装或者损坏。
回复