无法从 Cygwin 终端运行 Cygwin GUI 应用程序

无法从 Cygwin 终端运行 Cygwin GUI 应用程序

我无法从 Cygwin 终端启动 Cygwin GUI 应用程序,如果我在开始菜单中单击“XWin 服务器”,过一会儿服务器启动后,通知区域中会出现“X 应用程序菜单开启:0”,如果我单击一个程序,它也不会启动。

如果我希望从控制台运行 GUI 应用程序,比如 2048-qt,我将收到以下消息:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-XeneiXenwes'
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.

我谷歌了这个错误信息,发现了这个问题:https://unix.stackexchange.com/questions/227889/cygwin-on-windows-cant-open-display

它提到了 xorg-server 和 xinit 包,当我安装 Cygwin 时,X11 设置为默认值,并且默认安装了这两个包。

现在,如果我startxwin在终端中运行,我可以从结果菜单正常启动 GUI 应用程序,但是我仍然无法从另一个 Cygwin 终端启动 GUI 应用程序,这是服务器的输出:

Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.20.10.0
OS: CYGWIN_NT-10.0-19042 DESKTOP-PD984VK 3.1.7-340.x86_64 2020-08-22 17:48 UTC x86_64
OS: Windows 10  [Windows NT 10.0 build 19042] (Win64)
Package: version 1.20.10-1 built 2020-12-21

XWin was started with the following command line:

/usr/bin/XWin :0 -multiwindow -auth
 /home/XeneiXenwes/.serverauth.1002

(II) xorg.conf is not supported
(II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
LoadPreferences: /home/XeneiXenwes/.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: 1920 height: 1080 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 5
GL_VERSION:     4.6.0 NVIDIA 461.72
GL_VENDOR:      NVIDIA Corporation
GL_RENDERER:    GeForce GTX 1050 Ti/PCIe/SSE2
(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) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) 670 pixel formats reported by wglGetPixelFormatAttribivARB
(II) 634 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: 960 540
(--) 5 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
cat: /home/XeneiXenwes/.serverauth.1002: No such file or directory
winMultiWindowXMsgProc - xcb_connect() returned and successfully opened the display.
winClipboardThreadProc - DISPLAY=:0.0
winProcEstablishConnection - winInitClipboard returned.
winInitMultiWindowWM - xcb_connect () returned and successfully opened the display.
winClipboardProc - xcb_connect () returned and successfully opened the display.
Using Composite redirection
wglCreatePbufferARBWrapper error: Unknown error (c0070591)
SetupSysMenu: GetSystemMenu() failed for HWND 0x150bbe
wglCreatePbufferARBWrapper error: The parameter is incorrect.  (00000057)
IsOverrideRedirect: Failed to get window attributes

现在有趣的是,如果我xinit在终端中运行(当 xwin 服务器关闭时),它会比更快地打开服务器startxwin,并且会打开此窗口:

在此处输入图片描述

如果我在其中输入,2048-qt应用程序将正常启动,这就是它所说的:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-XeneiXenwes'

JIT is disabled for QML. Property bindings and animations will be very slow. Visit https://wiki.qt.io/V4 to learn about possible solutions for your platform.
libGL error: Screen is not Windows-DRI capable
qml: Started a new game

该问题可能由什么原因造成?我该如何解决?

相关内容