I am running vnc-3.3.3r1-2 on AIX V5.2 ML02. The default $HOME/.vnc/xstartup file starts an xterm window on the VNC X desktop. When I try to use xhost in the xterm window, I see:
$ xhost + surveyor
surveyor being added to access control list
1346-203 xhost: must be on local machine to add or remove hosts.
$
and when an X-windows client on host surveyor attempts to use the VNC desktop, the client fails:
$ export DISPLAY=dodgers:1
$ aixterm
Xlib: connection to "dodgers:1.0" refused by server
Xlib: Client is not authorized to connect to Server
1363-008 aixterm: Cannot make a connection to X server dodgers:1.
If the X server is not running, run the xinit command.
If the X server is running, check the specified display number.
I used the xauth command in the xterm window to discover a circumvention of the problem:
$ echo $DISPLAY
dodgers:1.0
$ xauth
Using authority file /home/pittman/.Xauthority
xauth> list
dodgers.usca.ibm.com:1 MIT-MAGIC-COOKIE-1 a88554a6ea9a9b304cc961745d77a356
dodgers/unix:1 MIT-MAGIC-COOKIE-1 a88554a6ea9a9b304cc961745d77a356
xauth> quit
$
The xhost failure can be corrected by changing $DISPLAY to the second specification displayed by xauth above:
$ DISPLAY=dodgers/unix:1
$ xhost + surveyor
surveyor being added to access control list
$
Clients on host surveyor can now use the VNC X desktop.
Why does xhost fail with DISPLAY=dodgers:1.0 or DISPLAY=dodgers.usca.ibm.com:1.0 or DISPLAY=dodgers:1 or DISPLAY=dodgers.usca.ibm.com:1, but succeed with DISPLAY=dodgers/unix:1?
I sent you email on this, but I ought to post my findings
here since I looked into it a bit. It's not much, really.
I don't know much about vnc.
The problem seems to exist in vnc whether you use the Toolbox copy or build your own, so it's not specific to the
Toolbox. More expertise can be found on the vnc mailing lists. I went to the realvnc.com website and did a search
on their mailing lists, and found that others ran into the same issue, though it isn't clear whether it is a limitation or if perhaps it has been taken care of in a newer version of vnc.
A couple of examples that I cited in my email are:
http://www.realvnc.com/pipermail/vnc-list/2001-August/024157.html and http://www.realvnc.com/pipermail/vnc-list/2001-June/023347.html.
A couple postings seemed to indicate that using just the
hostname:1 meant using TCP while using hostname/unix:1 would be UDP, so the two formats don't mean the same thing.
Logged In: YES
user_id=1641787
Originator: NO
This problem occurs with VNC at the 3.3.3r1 level and the AIX X11.apps.config fileset at the 5.2.0.0 level. The problem does not occur with VNC at the 3.3.3r2 level and the AIX X11.apps.config fileset at the 5.3.0.50 level.