startxwin - xinit unable to connect to X server - cygwin

After updating to the latest Cygwin distribution, I can no longer connect to X server. When I run startxwin (on a fresh Cygwin install), I get the following errors:
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
The XWin.#.log looks okay (I think):
Could not load crashreporter dll
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.17.1.0
OS: CYGWIN_NT-6.1-WOW ENDYMION 2.0.2(0.287/5/3) 2015-05-08 17:03 i686
OS: Windows 7 Service Pack 1 [Windows NT 6.1 build 7601] (WoW64)
Package: version 1.17.1-4 built 2015-05-01
XWin was started with the following command line:
/usr/bin/XWin :4 -multiwindow -auth
/home/clkunz/.serverauth.8376
ddxProcessArgument - Initializing default screens
winInitializeScreenDefaults - primary monitor w 1920 h 1200
winInitializeScreenDefaults - native DPI x 96 y 96
[ 10857.934] Could not load crashreporter dll
[ 10857.965] (II) xorg.conf is not supported
[ 10857.965] (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
[ 10857.965] LoadPreferences: /home/clkunz/.XWinrc not found
[ 10857.965] LoadPreferences: Loading /etc/X11/system.XWinrc
[ 10857.965] LoadPreferences: Done parsing the configuration file...
[ 10857.981] winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL
[ 10858.012] winDetectSupportedEngines - Returning, supported engines 00000005

This recent cygwin link shows one failure mode related to Symantec Endpoint Protection (SEP) not working with the 32-bit version of XWin on 64-bit machines.
One solution (if that's the problem) is to add an exception for XWin.exe to SEP; or you can also disable SEM while you invoke XWin.
To add a SEP exception, open SEP, Change Settings -> Exceptions [Configure Settings].
To disable SEP, right click on the icon in the system tray, and disable it all. Start XWin. Don't forget to turn SEP back on.

Related

Popup notification about connection failed on Manjaro 22.0

When working in Manjaro I getting a weird and annoying notification every 7 minutes about connection failed,
however, at the same time the Internet works for me
Screenshot of problem.
I've tried to switch on/off automatic connection in network settings to see if the problem goes away but this not works.
OS info:
Kernel: x86_64 Linux 5.15.65-1-MANJARO
Packages: 1503
Shell: bash 5.1.16
DE: GNOME 42.3
Font: URW Gothic 10

Cannot start J-Link GDB Server on Ubuntu

I am currently working on the ARM Cortex-M4 inside the NXP i.MX8M Mini.
I am able to compile a project for M4 on Eclipse IDE on an Ubuntu VM.
I would now like to debug on the M4 via a SEGGER Flasher ARM probe, still from Ubuntu.
My probe is well recognized by Ubuntu, and I can launch the J-Link GDB server by simply typing the command :
$ sudo ./JLinkGDBServerCLExe
However, if I type the same command without sudo, I get :
$ ./JLinkGDBServerCLExe
SEGGER J-Link GDB Server V7.58b Command Line Version
JLinkARM.dll V7.58b (DLL compiled Nov 16 2021 15:04:27)
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: yes
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: Unspecified
Target interface: JTAG
Target interface speed: 4000kHz
Target endian: little
Connecting to J-Link...
Connecting to J-Link failed. Connected correctly?
GDBServer will be closed...
Shutting down...
Could not connect to J-Link.
Please check power, connection and settings.
My problem is that when I start eclipse, I get the same result as starting the GDB server without sudo.
It seems that this is a rights issue, how can I solve it?
As #KamilCuk said, the problem came from the udev rules.
So you just have to copy the rules provided by Segger with J-Link Software on the system:
$ sudo cp 99-jlink.rules /etc/udev/rules.d
Then you have to reboot the system:
$ reboot

How to create an x server with Singularity

Overall, I am trying to render images using Unity on a remote cluster.
The cluster does not have an X server; I don't have sudo permissions, or can start a Docker container, but I can start a Singularity container.
My plan is to create a container that would simulate the X Server. I created the following Singularity definition file:
Bootstrap: docker
From: nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
%post
# xvfb for rendering in headless mode
apt-get update
apt-get install -y xvfb mesa-utils xorg
echo "allowed_users = anybody" > /etc/X11/Xwrapper.config
I started the container with the option --containall. From the container, I launched the command /usr/bin/X :0, but it failed with the following error:
Singularity xvfb.sif:~> /usr/bin/X :0
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
X.Org X Server 1.19.6
Release Date: 2017-12-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.15.0-140-generic x86_64 Ubuntu
Current Operating System: Linux cooper 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.8.0-50-generic root=/dev/mapper/vgubuntu-root ro quiet splash vt.handoff=7
Build Date: 08 April 2021 01:57:21PM
xorg-server 2:1.19.6-1ubuntu4.9 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/pierre-louis/.local/share/xorg/Xorg.0.log", Time: Wed May 26 09:17:05 2021
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (No such file or directory)
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/home/pierre-louis/.local/share/xorg/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
Not any /dev/tty* exist. Then I tried to launch startx, but only to get the same message error.
How can I launch an X Server using a Singularity image?
As mentioned in a separate discussion, Xvfb is not supposed to be start through startx or /usr/bin/X but rather with the supplied run script.

Unable to launch weston on linux yocto from ssh

I have the error "no drm device found" as shown below.
I thinks the mail error is fatal: failed to create compoitor backend.
I have the following in my lib
desktop-shell.so drm-backend.so fbdev-backend.so fullscreen-shell.so gl-renderer.so hmi-controller.so ivi-shell.so wayland-backend.so x11-backend.so
root#salvator-x:/etc/systemd/system/multi-user.target.wants# /usr/bin/weston-launch \
-u root -- --idle-time=0 --config=/etc/xdg/weston/weston-drm-hdmi.ini $OPTARGS
Date: 2018-02-26 UTC
[21:29:08.949] weston 1.11.0
http://wayland.freedesktop.org
Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.11.0
Build: a9df8430-dirty v4l2-renderer: Fix calcluation of clip region (2017-04-13 18:25:00 +0900)
[21:29:08.949] OS: Linux, 4.9.0-yocto-standard, #1 SMP PREEMPT Mon Feb 26 17:46:03 EST 2018, aarch64
[21:29:08.949] Using config file '/etc/xdg/weston/weston-drm-hdmi.ini'
[21:29:08.950] Output repaint window is 34 ms maximum.
[21:29:08.950] Loading module '/usr/lib/weston/drm-backend.so'
[21:29:08.954] initializing drm backend
[21:29:08.954] logind: failed to get session seat
[21:29:08.954] logind: cannot setup systemd-logind helper (-61), using legacy fallback
[21:29:08.955] no drm device found
[21:29:08.955] fatal: failed to create compositor backend
failed to restore keyboard mode: Bad file descriptor
failed to set KD_TEXT mode on tty: Bad file descriptor
could not reset vt handling
How do I launch weston on linux yocto?
Here is the image:
So.. I found the answer to my question
it has three errors logind (systemd) was having trouble access the input keyboard type
second one is drm device is not found which implies that you have trouble accesing your output port. try to troubleshoot the port make it accessible to the board and then try to launch weston with correct config.
NOTE: Weston wayland wont launch if you dont have keyboard or a mouse connected preferably a usb

X does not start after cygwin upgrade

After upgrading Cygwin the X Server does not start. As far as I can tell the only error message from the command output is:
xinit: XFree86_VT property unexpectedly has 0 items instead of 1
/var/log/xwin/XWin.0.log does not have this message. I have pasted the entire output is at the bottom.
After initally installing from a cygwin mirror, I had used Cygwin Ports to get a recent version of git. My latest update was from Cygwin mirror. Could that have caused the problem?
I have already tried reinstalling everything from cygwin mirror, using the reinstall option for every category. Do I have any other option besides uninstalling everything and reinstalling?
$ /usr/bin/startxwin
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.16.2.0
OS: CYGWIN_NT-6.1 OAKN00563024A 1.7.33-2(0.280/5/3) 2014-11-13 15:47 x86_64
OS: Windows 7 Service Pack 1 [Windows NT 6.1 build 7601] (Win64)
Package: version 1.16.2-1 built 2014-11-11
XWin was started with the following command line:
/usr/bin/XWin :0 -multiwindow -nolisten tcp -auth
/home/I063510/.serverauth.1328
(II) xorg.conf is not supported
(II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
LoadPreferences: /home/I063510/.XWinrc not found
LoadPreferences: Loading /etc/X11/system.XWinrc
LoadPreferences: Done parsing the configuration file...
winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL
winDetectSupportedEngines - Returning, supported engines 00000015
winSetEngine - Multi Window or Rootless => ShadowGDI
winScreenInit - Using Windows display depth of 32 bits per pixel
winAllocateFBShadowGDI - Creating DIB with width: 1600 height: 900 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'
GL_VERSION: 4.3.0
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: Quadro K2100M/PCIe/SSE2
(II) AIGLX: enabled GLX_SGI_make_current_read
(II) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
(II) AIGLX: enabled GLX_SGIX_pbuffer
(II) AIGLX: enabled GLX_ARB_multisample and GLX_SGIS_multisample
(II) 1002 pixel formats reported by wglGetPixelFormatAttribivARB
(II) AIGLX: Set GLX version to 1.4
(II) 825 fbConfigs
(II) ignored pixel formats: 0 not OpenGL, 54 RBGA float, 87 RGBA unsigned float, 0 unknown pixel type, 36 unaccelerated
(II) GLX: Initialized Win32 native WGL GL provider for screen 0
winPointerWarpCursor - Discarding first warp: 800 450
(--) 8 mouse buttons found
(--) Setting autorepeat to delay=500, rate=31
(--) Windows keyboard layout: "00000409" (00000409) "US", type 7
(--) 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
winProcEstablishConnection - winInitClipboard returned.
winClipboardThreadProc - DISPLAY=:0.0
OS maintains clipboard viewer chain: yes
winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display.
winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display.
winClipboardProc - XOpenDisplay () returned and successfully opened the display.
xinit: XFree86_VT property unexpectedly has 0 items instead of 1
xinit: connection to X server lost
waiting for X server to shut down winClipboardProc - winClipboardFlushWindowsMessageQueue trapped WM_QUIT message, exiting main loop.
winClipboardProc - XDestroyWindow succeeded.
winClipboardIOErrorHandler!
winMultiWindowXMsgProcIOErrorHandler!
winInitMultiWindowXMsgProc - Caught IO Error. Exiting.
winDeinitMultiWindowWM - Noting shutdown in progress
(EE) Server terminated successfully (0). Closing log file.
I met the same problem after CygWin upgrade.
xwin works fine for me, and it's clean, without the ugly xterm window.
alias runx="run xwin -multiwindow -noclipboard"
According to Daniel, "-noclipboard" is not a must, Thanks.
I found the answer on Cygwin-X mailing list:
Once I switched to
xinit -- -multiwindow -clipboard &
I was fine.
From http://x.cygwin.com/docs/ug/using.html:##
Note that startxwin no longer exits after ~/.startxwinrc has completed, leaving >X running, but, similar to startx, waits until ~/.startxwinrc exits and then kills X.
If you don't want the X server to exit until explicitly told to do so, end your ~/.startxwinrc with something like exec sleep infinity.
So, put at the end of your ~/.startxwinrc (if the file doesn't exist yet, create it):
exec sleep infinity
I had such a problem, but found that the shortcut for starting xwin had the target
C:\cygwin64\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin.exe
But changing this to
C:\cygwin64\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin
makes it work.

Resources