Connecting to a modern Xserver with an old client

2023-07-21 Thread Michael K
I'm trying to connect an old HP logic analyzer (circa 1998) to a modern Xorg 
server.
The error message I get is ...

Xlib: connection to "192.168.1.1:1.0" refused by server
Unable to open window on "192.168.1.1:1.0"

I have executed "xhost +" to allow access by any client and I am able to 
generate an xterm window from another modern computer on the network "xterm 
-display 192.168.1.1:1.0".
I have no way to know what the logic analyzer is actually trying to do or what 
it doesn't like.

On the X server side, it's started by gdm & I can't find out how to change the 
log level of Xorg (I think there is some gdm code that starts Xorg) ... 
/usr/libexec/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -listen 
tcp -background none -noreset -keeptty -novtswitch -verbose 7 -core

What might be the issue with this old X client authenticating with a modern X 
server?


Re: Connecting to a modern Xserver with an old client

2023-07-22 Thread Michael K


To answer Grant's question. Yes, I had added the X ports but I've now turned 
off the firewall just to be sure.
Here is the wireshark conversation.  I'm not knowledgeable enough to recognize 
the issue..

10.0192.168.1.16192.168.1.1TCP606915 → 6001 
[SYN] Seq=0 Win=0 Len=0 MSS=1416
20.000165997192.168.1.1192.168.1.16TCP586001 → 6915 
[SYN, ACK] Seq=0 Ack=1 Win=64240 Len=0 MSS=1460
30.005196101192.168.1.16192.168.1.1TCP606915 → 6001 
[ACK] Seq=1 Ack=1 Win=1416 Len=0
40.008854195192.168.1.16192.168.1.1X1166Initial 
connection request
50.008914324192.168.1.1192.168.1.16TCP546001 → 6915 
[ACK] Seq=1 Ack=13 Win=64228 Len=0
60.009029932192.168.1.1192.168.1.16TCP626001 → 6915 
[PSH, ACK] Seq=1 Ack=13 Win=64228 Len=8 [TCP segment of a reassembled PDU]
70.009086172192.168.1.1192.168.1.16X11110Initial 
connection reply
80.009149782192.168.1.1192.168.1.16TCP546001 → 6915 
[FIN, ACK] Seq=65 Ack=13 Win=64228 Len=0
90.017057921192.168.1.16192.168.1.1TCP60[TCP 
ZeroWindow] 6915 → 6001 [ACK] Seq=13 Ack=66 Win=0 Len=0
100.019632130192.168.1.16192.168.1.1TCP60[TCP 
ZeroWindow] 6915 → 6001 [ACK] Seq=13 Ack=66 Win=0 Len=0
110.023341315192.168.1.16192.168.1.1TCP60[TCP 
ZeroWindow] 6915 → 6001 [ACK] Seq=13 Ack=66 Win=0 Len=0
120.083569102192.168.1.16192.168.1.1TCP606915 → 6001 
[FIN, PSH, ACK] Seq=13 Ack=66 Win=0 Len=0
130.083647415192.168.1.1192.168.1.16TCP546001 → 6915 
[ACK] Seq=66 Ack=14 Win=64228 Len=0

Also, yes the X display is 1 on this server.


Re: Connecting to a modern Xserver with an old client

2023-07-23 Thread Michael K
Yes, xtrace looks just like what I need but I cant't get it to work on remote 
connections.

If I run "xterm -display :9.0" from the machine where X server and xtrace 
(x11trace on Fedora) runs it works (and I see X11 conversations) but If I try 
from another machine on the network (xterm -display 192.168.1.1:9.0), I cannot 
connect.
Is there some switch I need so that remote connections are responded to. From 
what I read, xtrace should pick up the current auth settings (xhost +), so this 
should not be the issue I think.

Michael





On Sunday, July 23, 2023 at 05:58:30 AM EDT, Carsten Haitzler 
 wrote: 





On Sat, 22 Jul 2023 20:47:03 +0000 (UTC) Michael K  said:


> 
> To answer Grant's question. Yes, I had added the X ports but I've now turned
> off the firewall just to be sure. Here is the wireshark conversation.  I'm
> not knowledgeable enough to recognize the issue..
> 
> 10.0192.168.1.16192.168.1.1TCP606915 → 6001
> [SYN] Seq=0 Win=0 Len=0 MSS=1416
> 20.000165997192.168.1.1192.168.1.16TCP586001 → 6915
> [SYN, ACK] Seq=0 Ack=1 Win=64240 Len=0 MSS=1460
> 30.005196101192.168.1.16192.168.1.1TCP606915 → 6001
> [ACK] Seq=1 Ack=1 Win=1416 Len=0
> 40.008854195192.168.1.16192.168.1.1X1166Initial
> connection request
> 50.008914324192.168.1.1192.168.1.16TCP546001 → 6915
> [ACK] Seq=1 Ack=13 Win=64228 Len=0
> 60.009029932192.168.1.1192.168.1.16TCP626001 → 6915
> [PSH, ACK] Seq=1 Ack=13 Win=64228 Len=8 [TCP segment of a reassembled PDU]
> 70.009086172192.168.1.1192.168.1.16X11110Initial
> connection reply
> 80.009149782192.168.1.1192.168.1.16TCP546001 → 6915
> [FIN, ACK] Seq=65 Ack=13 Win=64228 Len=0
> 90.017057921192.168.1.16192.168.1.1TCP60[TCP
> ZeroWindow] 6915 → 6001 [ACK] Seq=13 Ack=66 Win=0 Len=0
> 100.019632130192.168.1.16192.168.1.1TCP60[TCP
> ZeroWindow] 6915 → 6001 [ACK] Seq=13 Ack=66 Win=0 Len=0
> 110.023341315192.168.1.16192.168.1.1TCP60[TCP
> ZeroWindow] 6915 → 6001 [ACK] Seq=13 Ack=66 Win=0 Len=0
> 120.083569102192.168.1.16192.168.1.1TCP606915 → 6001
> [FIN, PSH, ACK] Seq=13 Ack=66 Win=0 Len=0
> 130.083647415192.168.1.1192.168.1.16TCP546001 → 6915
> [ACK] Seq=66 Ack=14 Win=64228 Len=0
> 
> Also, yes the X display is 1 on this server.


OK - looks like it's connecting and actually talking, so your next port of call
might be some x11 protocol analysis. xtrace. xscope are some of these.

I'm wondering if it's trying to create a colormapped window with a private
colormap assuming a pseudocolor display (or using a pseudocolor visual). given
an old enough app it may never have worked on truecolor displays.


-- 
- Codito, ergo sum - "I code, therefore I am" --
Carsten Haitzler - ras...@rasterman.com




Re: Connecting to a modern Xserver with an old client

2023-07-23 Thread Michael K
OK, I got xtrace to work ("$ x11trace -n -D 192.168.1.1:10.0" & have the 
instrument connect to display 10.0) and it was more instructive...

Got connection from 192.168.1.16:6144
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 as per the man page I added +byteswappedclients to the Xorg command line and 
it works!

The HP instrument runs a Motorola MC68020 (big endian) & my RPI ARM is set up 
as little endian. Back in the day I think most machines were big endian (before 
*nix on Intel processors became a thing)

Thanks Carsten & Grant for the clues and debugging advice 8-)

Michael