[Techtalk] trying to get xmon to work...
Riccarda Cassini
riccarda.cassini at gmx.de
Fri Nov 5 11:34:23 EST 2004
Thank you very much Almut and Dominik! With your help I got it working.
Well, xmon, at least...
The problem was in fact, that DISPLAY was set to "unix:0.0".
Just for the record, here's a summary of the steps required:
-----
Prerequisite: set up the X server to allow TCP connections (i.e. no
"-nolisten tcp"). xmond doesn't seem to be able to use local unix
sockets to connect to the X server.
Then, in the terminal where you want to have the debug output printed:
$ export DISPLAY=:0
(a proper hostname works too, but *not* "unix:0"...
Alternatively, you could supply a -server option to xmond,
but then the argument needs to be a full <hostname>:0
Interestingly, :0 alone doesn't work in this case)
$ xauth list :0
(retrieve cookie for this display, needed later)
$ xmonui | xmond
In some other terminal:
$ export DISPLAY=<hostname>:1
(tell the X programs that are started from this shell, to connect
to xmond (listening on :1), instead of directly connecting to the
X server (listening on :0) )
$ xauth add <hostname>:1 <cookie from the above "xauth list">
(transfer cookie, to be granted access on :1)
Now, run the program to debug, and get on with the real job... :-)
-----
Well, that's what I did. I spent quite some time analysing the X logs,
and I think I've even found what the problem is (with some more help,
admittedly). Yet, I have no idea how to fix it, or whether it can be
fixed at all...
Thing is, the program wants to call the function XScreenSaverQueryInfo
(that's what I know from looking at the source). I figure, this is to
determine the idle time, i.e. how long the user hasn't been supplying
any input (which makes sense in the context of what the program does).
XScreenSaverQueryInfo seems to require the X extension "screen-saver",
at least it doesn't belong to the set of regular X library functions.
Although this (or some similar?) extension is availble on both systems,
Linux and AIX apparently disagree on its precise name - this is what I
conclude from the following fragments of the xmon logs:
AIX client -> Linux server:
............REQUEST: QueryExtension
sequence number: 0009
request length: 0005
length of name: 000c
name: "SCREEN-SAVER"
..............REPLY: QueryExtension
sequence number: 0009
reply length: 00000000
present: False
major-opcode: 00
first-event: 00
first-error: 00
Linux client -> Linux server:
............REQUEST: QueryExtension
sequence number: 0009
request length: 0006
length of name: 0010
name: "MIT-SCREEN-SAVER"
..............REPLY: QueryExtension
sequence number: 0009
reply length: 00000000
present: True
major-opcode: 85
first-event: 43
first-error: 00
On Linux, the extension is obviously called "MIT-SCREEN-SAVER" (that's
also what xdpyinfo lists). So, everything is fine, if that name is
requested. OTOH, when AIX asks for "SCREEN-SAVER", Linux just responds
with "sorry, haven't got that"...
I guess, I'd have to patch either the AIX X libraries (at least in
theory), or the X server code on the Linux side, to make them agree on
the name.
But that's just slightly more than what I originally set out to do ;-)
(The main reason I'd like to get this working simply is: I need to make
some changes to this program, and I'd like to be able to test it from
my Linux box (with X redirected via ssh) - rather than always walk over
to the other building, where we have an AIX machine. Unfortunately,
the program needs to run in the remote client's environment to do any
useful testing, and those are AIX machines...)
Well, it was a nice try... At least, it did add another neat tool to
my collection, and I've learned a couple of other things along the way.
Thanks again,
Riccarda
More information about the Techtalk
mailing list