LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1045|回复: 3

[已解决] 如何通过XDMCP连接无显示器的主机

[复制链接]
发表于 2009-11-19 21:46:50 | 显示全部楼层 |阅读模式
局域网中有两台计算机A,B。 两台计算机上都安装了Gentoo,配置好了Gnome、登陆时使用GDM认证。原来两台机器都有显示器,在两台机器上配置好XDMCP好之后,可以通过 "窗口中的新登录" -> Run XDMCP Chooser 看到对方机器,并且可以登录。

后来,因为显示器另有别用,把机器B的显示器拿走了。刚拿走那会儿,机器A仍能通过XDMCP Chooser看到B。后来,做了一次大的升级,机器B重启了(仍然没有连接显示器),问题就来了:A无法从XDMCP Chooser上看到B。搞了半天没有搞通,只能把显示器重新连到B上,xdm restart以后问题解决了,现在可以把显示器从B拿走。但是,每次重启B或者重启B上的xdm(gdm)重启后,XDMCP Chooser又看不到B了。

[问题] 在无显示器的的机器B上,重启xdm,会导致机器B从“XDMCP Chooser”列表中消失。

下面贴出相关的.log,大家看看有没有头绪:

gmd log


  1. X.Org X Server 1.6.4
  2. Release Date: 2009-9-27
  3. X Protocol Version 11, Revision 0
  4. Build Operating System: Linux 2.6.30-gentoo-r6 i686
  5. Current Operating System: Linux wlxbox 2.6.30-gentoo-r6 #3 SMP Wed Oct 21 00:46:15 CST 2009 i686
  6. Build Date: 06 October 2009  06:08:50AM

  7.         Before reporting problems, check http://wiki.x.org
  8.         to make sure that you have the latest version.
  9. Markers: (--) probed, (**) from config file, (==) default setting,
  10.         (++) from command line, (!!) notice, (II) informational,
  11.         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
  12. (==) Log file: "/var/log/Xorg.0.log", Time: Fri Nov 20 05:45:42 2009
  13. (==) Using config file: "/etc/X11/xorg.conf"
  14. (EE) intel(0): No valid modes.
  15. (EE) Screen(s) found, but none have a usable configuration.

  16. Fatal server error:
  17. no screens found

  18. Please consult the The X.Org Foundation support
  19.          at http://wiki.x.org
  20. for help.
  21. Please also check the log file at "/var/log/Xorg.0.log" for additional information.
复制代码



xorg.conf


  1. Section "ServerLayout"
  2.         Identifier     "X.org Configured"
  3.         Screen      0  "Screen0" 0 0
  4.         # InputDevice    "Mouse0" "CorePointer"
  5.         # InputDevice    "Keyboard0" "CoreKeyboard"
  6.         ## for compiz
  7.         # Option         "AIGLX" "true"
  8. EndSection

  9. Section "Files"
  10.         FontPath     "/usr/share/fonts/misc/"
  11.         FontPath     "/usr/share/fonts/TTF/"
  12.         FontPath     "/usr/share/fonts/OTF"
  13.         FontPath     "/usr/share/fonts/Type1/"
  14.         FontPath     "/usr/share/fonts/100dpi/"
  15.         FontPath     "/usr/share/fonts/75dpi/"
  16. EndSection

  17. Section "Module"
  18.         Load  "dbe"
  19.         Load  "dri"
  20.         Load "dri2"
  21.         Load  "extmod"
  22.         Load  "glx"
  23.         Load  "record"
  24.         # Load "freetype"
  25.         # Load    "type1"
  26.         # Load    "bitmap"
  27.         # Load  "xtrap"
  28. EndSection

  29. Section "Monitor"
  30.         Identifier   "Monitor0"
  31.         VendorName   "Monitor Vendor"
  32.         ModelName    "Monitor Model"
  33. EndSection

  34. Section "Device"
  35.         ### Available Driver options are:-
  36.         ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
  37.         ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
  38.         ### [arg]: arg optional
  39.         #Option     "NoAccel"                   # [<bool>]
  40.         #Option     "SWcursor"                  # [<bool>]
  41.         #Option     "ColorKey"                  # <i>
  42.         #Option     "CacheLines"                # <i>
  43.         #Option     "Dac6Bit"                   # [<bool>]
  44.         #Option     "DRI"                       # [<bool>]
  45.         #Option     "NoDDC"                     # [<bool>]
  46.         #Option     "ShowCache"                 # [<bool>]
  47.         #Option     "XvMCSurfaces"              # <i>
  48.         #Option     "PageFlip"                  # [<bool>]
  49.         Option "AccelMethod"   "UXA"
  50.             Option "Tiling"        "False"
  51.         Identifier  "Card0"
  52.         Driver      "intel"
  53.         VendorName  "Intel Corporation"
  54.         BoardName   "82G33/G31 Express Integrated Graphics Controller"
  55.         BusID       "PCI:0:2:0"
  56. EndSection

  57. Section "Screen"
  58.         Identifier "Screen0"
  59.         Device     "Card0"
  60.         Monitor    "Monitor0"
  61.         SubSection "Display"
  62.                 Viewport   0 0
  63.                 Depth     24
  64.                 Modes "1280x768"
  65.         EndSubSection
  66.         SubSection "Display"
  67.                 Viewport   0 0
  68.                 Depth     4
  69.         EndSubSection
  70.         SubSection "Display"
  71.                 Viewport   0 0
  72.                 Depth     8
  73.         EndSubSection
  74.         SubSection "Display"
  75.                 Viewport   0 0
  76.                 Depth     15
  77.         EndSubSection
  78.         SubSection "Display"
  79.                 Viewport   0 0
  80.                 Depth     16
  81.         EndSubSection
  82.         SubSection "Display"
  83.                 Viewport   0 0
  84.                 Depth     24
  85.         EndSubSection
  86. EndSection
复制代码



Xorg.0.log


  1. X.Org X Server 1.6.4
  2. Release Date: 2009-9-27
  3. X Protocol Version 11, Revision 0
  4. Build Operating System: Linux 2.6.30-gentoo-r6 i686
  5. Current Operating System: Linux wlxbox 2.6.30-gentoo-r6 #3 SMP Wed Oct 21 00:46:15 CST 2009 i686
  6. Build Date: 06 October 2009  06:08:50AM

  7.         Before reporting problems, check http://wiki.x.org
  8.         to make sure that you have the latest version.
  9. Markers: (--) probed, (**) from config file, (==) default setting,
  10.         (++) from command line, (!!) notice, (II) informational,
  11.         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
  12. (==) Log file: "/var/log/Xorg.0.log", Time: Fri Nov 20 05:45:38 2009
  13. (==) Using config file: "/etc/X11/xorg.conf"
  14. (==) ServerLayout "X.org Configured"
  15. (**) |-->Screen "Screen0" (0)
  16. (**) |   |-->Monitor "Monitor0"
  17. (**) |   |-->Device "Card0"
  18. (==) Automatically adding devices
  19. (==) Automatically enabling devices
  20. (WW) The directory "/usr/share/fonts/TTF/" does not exist.
  21.         Entry deleted from font path.
  22. (WW) The directory "/usr/share/fonts/OTF" does not exist.
  23.         Entry deleted from font path.
  24. (WW) The directory "/usr/share/fonts/TTF/" does not exist.
  25.         Entry deleted from font path.
  26. (WW) The directory "/usr/share/fonts/OTF" does not exist.
  27.         Entry deleted from font path.
  28. (**) FontPath set to:
  29.         /usr/share/fonts/misc/,
  30.         /usr/share/fonts/Type1/,
  31.         /usr/share/fonts/100dpi/,
  32.         /usr/share/fonts/75dpi/,
  33.         /usr/share/fonts/misc/,
  34.         /usr/share/fonts/Type1/,
  35.         /usr/share/fonts/100dpi/,
  36.         /usr/share/fonts/75dpi/
  37. (==) ModulePath set to "/usr/lib/xorg/modules"
  38. (II) Cannot locate a core pointer device.
  39. (II) Cannot locate a core keyboard device.
  40. (II) The server relies on HAL to provide the list of input devices.
  41.         If no devices become available, reconfigure HAL or disable AllowEmptyInput.
  42. (II) Loader magic: 0x1da0
  43. (II) Module ABI versions:
  44.         X.Org ANSI C Emulation: 0.4
  45.         X.Org Video Driver: 5.0
  46.         X.Org XInput driver : 4.0
  47.         X.Org Server Extension : 2.0
  48. (II) Loader running on linux
  49. (++) using VT number 9

  50. (--) PCI:*(0:0:2:0) 8086:29c2:1028:0294 Intel Corporation 82G33/G31 Express Integrated Graphics Controller rev 10, Mem @ 0xdfe00000/524288, 0xc0000000/268435456, 0xdff00000/1048576, I/O @ 0x0000ecd8/8
  51. (--) PCI: (0:0:2:1) 8086:29c3:1028:0294 Intel Corporation 82G33/G31 Express Integrated Graphics Controller rev 10, Mem @ 0xdfe80000/524288
  52. (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
  53. (II) No APM support in BIOS or kernel
  54. (II) System resource ranges:
  55.         [0] -1        0        0xffffffff - 0xffffffff (0x1) MX[b]
  56.         [1] -1        0        0x000f0000 - 0x000fffff (0x10000) MX[b]
  57.         [2] -1        0        0x000c0000 - 0x000effff (0x30000) MX[b]
  58.         [3] -1        0        0x00000000 - 0x0009ffff (0xa0000) MX[b]
  59.         [4] -1        0        0x0000ffff - 0x0000ffff (0x1) IX[b]
  60.         [5] -1        0        0x00000000 - 0x00000000 (0x1) IX[b]
  61. (II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
  62. (II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
  63. (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
  64. (II) "record" will be loaded. This was enabled by default and also specified in the config file.
  65. (II) "dri" will be loaded. This was enabled by default and also specified in the config file.
  66. (II) "dri2" will be loaded. This was enabled by default and also specified in the config file.
  67. (II) LoadModule: "dbe"
  68. (II) Loading /usr/lib/xorg/modules/extensions//libdbe.so
  69. (II) Module dbe: vendor="X.Org Foundation"
  70.         compiled for 1.6.4, module version = 1.0.0
  71.         Module class: X.Org Server Extension
  72.         ABI class: X.Org Server Extension, version 2.0
  73. (II) Loading extension DOUBLE-BUFFER
  74. (II) LoadModule: "dri"
  75. (II) Loading /usr/lib/xorg/modules/extensions//libdri.so
  76. (II) Module dri: vendor="X.Org Foundation"
  77.         compiled for 1.6.4, module version = 1.0.0
  78.         ABI class: X.Org Server Extension, version 2.0
  79. (II) Loading extension XFree86-DRI
  80. (II) LoadModule: "dri2"
  81. (II) Loading /usr/lib/xorg/modules/extensions//libdri2.so
  82. (II) Module dri2: vendor="X.Org Foundation"
  83.         compiled for 1.6.4, module version = 1.1.0
  84.         ABI class: X.Org Server Extension, version 2.0
  85. (II) Loading extension DRI2
  86. (II) LoadModule: "extmod"
  87. (II) Loading /usr/lib/xorg/modules/extensions//libextmod.so
  88. (II) Module extmod: vendor="X.Org Foundation"
  89.         compiled for 1.6.4, module version = 1.0.0
  90.         Module class: X.Org Server Extension
  91.         ABI class: X.Org Server Extension, version 2.0
  92. (II) Loading extension MIT-SCREEN-SAVER
  93. (II) Loading extension XFree86-VidModeExtension
  94. (II) Loading extension XFree86-DGA
  95. (II) Loading extension DPMS
  96. (II) Loading extension XVideo
  97. (II) Loading extension XVideo-MotionCompensation
  98. (II) Loading extension X-Resource
  99. (II) LoadModule: "glx"
  100. (II) Loading /usr/lib/xorg/modules/extensions//libglx.so
  101. (II) Module glx: vendor="X.Org Foundation"
  102.         compiled for 1.6.4, module version = 1.0.0
  103.         ABI class: X.Org Server Extension, version 2.0
  104. (==) AIGLX enabled
  105. (II) Loading extension GLX
  106. (II) LoadModule: "record"
  107. (II) Loading /usr/lib/xorg/modules/extensions//librecord.so
  108. (II) Module record: vendor="X.Org Foundation"
  109.         compiled for 1.6.4, module version = 1.13.0
  110.         Module class: X.Org Server Extension
  111.         ABI class: X.Org Server Extension, version 2.0
  112. (II) Loading extension RECORD
  113. (II) LoadModule: "intel"
  114. (II) Loading /usr/lib/xorg/modules/drivers//intel_drv.so
  115. (II) Module intel: vendor="X.Org Foundation"
  116.         compiled for 1.6.4, module version = 2.9.0
  117.         Module class: X.Org Video Driver
  118.         ABI class: X.Org Video Driver, version 5.0
  119. (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
  120.         i810-dc100, i810e, i815, i830M, 845G, 852GM/855GM, 865G, 915G,
  121.         E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM, Pineview G,
  122.         965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, GM45,
  123.         4 Series, G45/G43, Q45/Q43, G41, B43, Clarkdale, Arrandale
  124. (II) Primary Device is: PCI 00@00:02:0
  125. (II) resource ranges after probing:
  126.         [0] -1        0        0xffffffff - 0xffffffff (0x1) MX[b]
  127.         [1] -1        0        0x000f0000 - 0x000fffff (0x10000) MX[b]
  128.         [2] -1        0        0x000c0000 - 0x000effff (0x30000) MX[b]
  129.         [3] -1        0        0x00000000 - 0x0009ffff (0xa0000) MX[b]
  130.         [4] -1        0        0x0000ffff - 0x0000ffff (0x1) IX[b]
  131.         [5] -1        0        0x00000000 - 0x00000000 (0x1) IX[b]
  132. (II) Loading sub module "vgahw"
  133. (II) LoadModule: "vgahw"
  134. (II) Loading /usr/lib/xorg/modules//libvgahw.so
  135. (II) Module vgahw: vendor="X.Org Foundation"
  136.         compiled for 1.6.4, module version = 0.1.0
  137.         ABI class: X.Org Video Driver, version 5.0
  138. (II) Loading sub module "ramdac"
  139. (II) LoadModule: "ramdac"
  140. (II) Module "ramdac" already built-in
  141. drmOpenDevice: node name is /dev/dri/card0
  142. drmOpenDevice: open result is 7, (OK)
  143. drmOpenByBusid: Searching for BusID pci:0000:00:02.0
  144. drmOpenDevice: node name is /dev/dri/card0
  145. drmOpenDevice: open result is 7, (OK)
  146. drmOpenByBusid: drmOpenMinor returns 7
  147. drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
  148. (==) intel(0): Depth 24, (--) framebuffer bpp 32
  149. (==) intel(0): RGB weight 888
  150. (==) intel(0): Default visual is TrueColor
  151. (**) intel(0): Option "Tiling" "False"
  152. (II) intel(0): Integrated Graphics Chipset: Intel(R) G33
  153. (--) intel(0): Chipset: "G33"
  154. (--) intel(0): Linear framebuffer at 0xC0000000
  155. (--) intel(0): IO registers at addr 0xDFE00000 size 524288
  156. (WW) intel(0): libpciaccess reported 0 rom size, guessing 64kB
  157. (II) intel(0): No SDVO device is found in VBT
  158. (II) intel(0): 2 display pipes available.
  159. (II) Loading sub module "ddc"
  160. (II) LoadModule: "ddc"
  161. (II) Module "ddc" already built-in
  162. (II) Loading sub module "i2c"
  163. (II) LoadModule: "i2c"
  164. (II) Module "i2c" already built-in
  165. (II) intel(0): Output VGA using monitor section Monitor0
  166. (II) intel(0): Output VGA disconnected
  167. (WW) intel(0): No outputs definitely connected, trying again...
  168. (II) intel(0): Output VGA disconnected
  169. (WW) intel(0): Unable to find initial modes
  170. (EE) intel(0): No valid modes.
  171. (II) UnloadModule: "intel"
  172. (II) UnloadModule: "vgahw"
  173. (II) Unloading /usr/lib/xorg/modules//libvgahw.so
  174. (EE) Screen(s) found, but none have a usable configuration.

  175. Fatal server error:
  176. no screens found

  177. Please consult the The X.Org Foundation support
  178.          at http://wiki.x.org
  179. for help.
  180. Please also check the log file at "/var/log/Xorg.0.log" for additional information.
复制代码
发表于 2009-11-20 00:04:26 | 显示全部楼层
1。内核中关闭显示器监视
2。xorg.conf加上Option        "AutoAddDevices"        "false"
指定Monitor并配上屏显大小

以上基于机器重启后要搜索显示器的一种设想,没有实现过,仅供参考
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-11-20 15:43:13 | 显示全部楼层
多谢 kingbo 的回复。

我好像把大家误解了,也把自己搞迷糊了。所以这里先把想要的结果说清楚吧,下面所提到的计算机都在同一局域网内,没有配置防火墙:

计算机B安装了Gentoo操作系统,X和GDM配置好了,但是没有显示器连接。局域网中的计算机想通过XDMCP连接计算机B。分两种:Windows计算机,尝试通过Xmanager连接;Linux计算机,通过xnest连接(“窗口中的新登录” -> XDMCP Chooser)。因此,所使用的 X Server 都是在“本地”——发起连接的计算机,使用的不是B上的X Server。

问题是:当B没有显示器与它相连时,无法在XDMCP Chooser中看到B,因此不能连接B。

只有当B连接上显示器,/etc/init.d/xdm restart时,才能看到B。如果把显示器拔除,重启机器,B又消失了。

总之,和B上的X是否起来应该没有关系,只要B完成认证就行。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-11-20 16:56:50 | 显示全部楼层
OK,把登录管理器由gdm换成xdm之后,问题解决了。主要参考的是,做法如下:

《Gentoo Wiki Archive -- XDMCP》
http://www.gentoo-wiki.info/XDMCP

把登录管理器设为 xdm:

修改 /etc/conf.d/xdm

  1. DISPLAYMANAGER="xdm"
复制代码


修改 /etc/X11/xdm/xdm-config

  1. ! SECURITY: do not listen for XDMCP or Chooser requests
  2. ! Comment out this line if you want to manage X terminals with xdm
  3. #  DisplayManager.requestPort: 0
复制代码


修改  /etc/X11/xdm/Xaccess

  1. *                                       #any host can get a login window
复制代码


重启 xdm
# /etc/init.d/xdm restart

然后就可以从“窗口中的新登录” -> XDMCP Chooser看到机器了,并且能够通过xdm登录。但是X.0.log仍然提示如同第一贴的错误,但是先不管了,能用就好。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表