无法启动startxwin cygwin

时间:2017-05-15 15:19:15

标签: bash cygwin xterm

我正在组织中使用Cygwin下载并且xterm工作正常,我最近更新了xterm版本,从那时起我失去了使用xwindow /启动xserver的能力。我运行startxwin的bash控制台显示以下内容并且不会打开xterm窗口。我手动打开xterm窗口,当我进入远程机器时它不会打开xwindows。

$ startxwin
:0" in "list" command display name "6175
xauth: (stdin):1:  bad "add" command line

Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.19.3.0
OS: CYGWIN_NT-6.1 6175 2.8.0(0.309/5/3) 2017-04-01 20:47 x86_64
OS: Windows 7 Service Pack 1 [Windows NT 6.1 build 7601] (Win64)
Package: version 1.19.3-2 built 2017-04-23

XWin was started with the following command line:

/usr/bin/XWin :0 -multiwindow -auth
 /home/usrpao/.serverauth.13204

(II) xorg.conf is not supported
(II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
LoadPreferences: /home/usrpao/.XWinrc not found
LoadPreferences: Loading /etc/X11/system.XWinrc
LoadPreferences: Done parsing the configuration file...
winDetectSupportedEngines - RemoteSession: no
winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL
winDetectSupportedEngines - Returning, supported engines 00000005
winSetEngine - Multi Window or Rootless => ShadowGDI
winScreenInit - Using Windows display depth of 32 bits per pixel
winAllocateFBShadowGDI - Creating DIB with width: 2560 height: 1024 depth: 32
winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
MIT-SHM extension disabled due to lack of kernel support
XFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in                                                                                 the kernel
glWinSelectGLimplementation: Loaded 'cygnativeGLthunk.dll'
(II) AIGLX: Testing pixelFormatIndex 1
GL_VERSION:     4.3.0 - Build 10.18.14.4280
GL_VENDOR:      Intel
GL_RENDERER:    Intel(R) HD Graphics 4600
(II) GLX: enabled GLX_SGI_make_current_read
(II) GLX: enabled GLX_SGI_swap_control
(II) GLX: enabled GLX_MESA_swap_control
(II) GLX: enabled GLX_SGIX_pbuffer
(II) GLX: enabled GLX_ARB_multisample
(II) GLX: enabled GLX_SGIS_multisample
(II) GLX: enabled GLX_ARB_fbconfig_float
(II) GLX: enabled GLX_EXT_fbconfig_packed_float
(II) GLX: enabled GLX_ARB_create_context
(II) GLX: enabled GLX_ARB_create_context_profile
(II) GLX: enabled GLX_ARB_create_context_robustness
(II) GLX: enabled GLX_EXT_create_context_es2_profile
(II) GLX: enabled GLX_ARB_framebuffer_sRGB
(II) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) 80 pixel formats reported by wglGetPixelFormatAttribivARB
(II) 44 fbConfigs
(II) ignored pixel formats: 0 not OpenGL, 0 unknown pixel type, 36 unaccelerated
(II) GLX: Initialized Win32 native WGL GL provider for screen 0
winPointerWarpCursor - Discarding first warp: 1280 512
(--) 8 mouse buttons found
(--) Setting autorepeat to delay=500, rate=31
(--) Windows keyboard layout: "00000409" (00000409) "US", type 4
(--) Found matching XKB configuration "English (USA)"
(--) Model = "pc105" Layout = "us" Variant = "none" Options = "none"
Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none"
winInitMultiWindowWM - DISPLAY=:0.0
winMultiWindowXMsgProc - DISPLAY=:0.0
winInitMultiWindowWM - xcb_connect () returned and successfully opened the display.
winProcEstablishConnection - winInitClipboard returned.
winClipboardThreadProc - DISPLAY=:0.0
winMultiWindowXMsgProc - xcb_connect() returned and successfully opened the display.
OS maintains clipboard viewer chain: yes
winClipboardProc - XOpenDisplay () returned and successfully opened the display.
Using Composite redirection

2 个答案:

答案 0 :(得分:1)

我有一个类似的问题,并将其追踪到startx行为不端。这就是我所看到的:

$ ./startx -- :1
:1" in "list" command display name "hostname
xauth: (stdin):1:  bad "add" command line

问题在于startx设置其hostname变量的方式。它不会剥离回车。之后,当startx使用hostname变量时,包含的回车会导致xuath"添加"命令提前终止并失败。

对我来说,解决方法就是取消回车。

找到变量hostname/usr/bin/startx中设置的位置,然后在下面添加此行:

hostname=$(echo $hostname | sed 's/\x0D//g')

答案 1 :(得分:0)

这是PATH问题。 Cygwin \ bin应该在Windows \ System32之前的PATH中。

否则,将调用system32\hostname.exe而不是/bin/hostname,这会在主机名后添加换行符。

可能的解决方法是调用/bin/hostname而不是hostname

sed -i s/\`hostname/\`\\/bin\\/hostname/ /usr/bin/startx /usr/bin/startxwin

...但是在将Cygwin放在PATH的开头之前,您将面临其他问题(尽管那时您可能还会遇到其他问题,因此没有理想的解决方案)。