How do you enable verbose debugging on Xorg server?

I have an instrument that is trying to open an X window on my Fedora machine (running X).
I can do this from another Fedora machine on the network …

$ xterm -display

but when I execute the connection on the instrument I get the error …

Xlib: connection to “” refused by server

I have executed xhost + (the static IP of the instrument) to allow connection.
I also disabled the firewall (just in case).
I have limited ability to debug on the instrument side so I would like to get some verbose logging on the Xserver side.

Enabling debug in /etc/gdm/custom.conf doesn’t seem to do anything.

In Fedora 38 how do you tell the Xorg server to log at a more verbose level ?

By default Xorg does not listen for TCP connections you have to change the Xorg command line to listen for connections. Did you change that?
Also are you logged in to a wayland or X11 session?

Also did you tell the firewall to allow connections to port 6000? X11 display 0.

Yes, as I said I disabled the firewall, so that is not blocking.
It is running Xorg (not Wayland).
I did not explicitly tell Xorg to listen for TCP connections. How do I do that with Fedora / gdm config? (If I could find how to pass arguments to Xorg, I could also specify logging options!)
As I also said I could create a window form another computer on the network…
xterm -display
Wouldn’t that tend to indicate that the ports are open and that the server is receiving packets?

In one post you mention opening a display with xterm -display (possibly a router IP if one is using a /24 netmask) and in another you mention xhost +

It would seem there may be some disconnect in your comments.

It has been some time since I last used xterm so I am no longer up to date with the commands.

Possibly one could use the gnome rdp to make the gui connections instead.

Yes, the is the address of the instrument that is attempting to connect to and open a window on the Xorg server ( (you must tell the Xorg server to allow connections from that IP address)
As I said, it is an instrument that is connecting, not a full computer so I don’t have the luxury of selecting my client program.

If you cannot find where to config the Xorg command line you can do a hack of replacing Xorg with a shell script. Rename the orginal Xorg to Xorg.orig.
Use the script to run the real with extra command args.

Actually gdm-x-server seems to call /usr/bin/Xorg which is a shell script that then calls /usr/libexec/Xorg (or /usr/libexec/Xorg.wrap).
I could simply edit this script to add -logverbose 9 and -audit 9, which gave very little information and didn’t help at all :scream_cat:

I asked on the Xorg list and got some good clues and tips on debugging.
I used wireshark and verified that there was a communication path to the Xorg server (which I suspected). I was able to use x11trace (which sits between the client and server, logging the exchange) to capture the conversation at the X protocol level and this gave me the clue I needed.

The x11trace output was …

Got connection from
000:<: am msb-first want 11:0 authorising with '' of length 0
000:>: Failed, version is 11:0 reason is '  Prohibited client endianess, see the Xserver man page '.

So, consulting the Xserver man page I see I needed to add +byteswappedclients to the Xorg command line (in the /usr/lib/X11 script).
It works :tada: :tada:

The client instrument runs VxWorks on a Motorola MC68020 which is big endian whereas the Raspberry Pi running Fedora 38 is, of course, little endian. (actually I think the ARM can do either depending on the setup)


1 Like

Aha! I had only heard of that being needed to talk to IBM s390 systems.
But of course m68k will also need it.

Well, apparently rejecting X clients with different endiness than the server is a very recent change.

This explains why I couldn’t find other people with this problem.

Again, Fedora is the “canary in the coal mine” :smiley_cat: