How to set up remote X Windows on AIX ?

Hi,

I want to display a program on my local workstation, that is running on a remote AIX, and I have done the following:

  1. install an X server (Xming) on my windows machine
  2. enable X11 forwarding in Putty
  3. enable X11 forwarding for the SSH daemon
  4. restart SSH daemon
  5. text X session using xclock

but it displayed this :

>xclock &
[1]     1769700
Error: Can't open display: 10.0.0.9:0
[1] +  Done(1)                 xclock &

could you help me with this
Rgards

This is basically meaning that the X server on your Windows system is refusing to accept the X client as one of its clients. The X protocol has its own authorisation devices, which are based on the hostnames of the systems X-clients are allowed to connect from.

For a simple try if this is the case issue a

xhost +

on the command line of your client, which will disable authentication completely. Then start the X client on the remote system again.

In the long run you will probably not want to disable authentication completely but only accept X connections from a few select remote systems. Depending on the X-Server you use there should be a configuration where you can enter one (or several) hostnames from which X clients will be accepted.

I hope this helps.

bakunin

Hi Bakunin,
I tried this command on the client (AIX) and it displayed this :

>xhost +
1356-200 xhost unable to open display "10.0.0.9:0"

any ideas ?

I thought that i made it quite clear above that you have to configure the access control ON THE X-SERVER!

If you are unsure about how X-Windows works in general or what an "X-server" or an "X-client" is i suggest you read this thread.

In addition, from the error message i can see that your DISPLAY-variable is set incorrectly. It should be:

DISPLAY=<your client IP or DNSname>:0.0

In this case "client" means the system - the one with the X-server running.

I hope this helps.

bakunin

don't know if you solved this already but here's my input:
in putty under ssh, go to x11. click enable x11 forwarding.
enter this info:

x display location: localhost:0 

next, launch the xming app.
go back to the putty window and enter your server info.
(ensure you're using SSH, unless default is changed, putty's default is telnet)
when terminal is open type these commands to confirm everything is working:

xauth list    -  This output should show something like MIT-MAGIC-COOKIE *****
echo $DISPLAY    -   This should display localhost:10.0
(if display does not show the localhost, then something is wrong) 

Thank you techy1 for your reply

it displays the following:

1356-364 xauth:  creating new authority file

apparently it's still not working

---------- Post updated at 04:49 AM ---------- Previous update was at 04:31 AM ----------

Hi Bakunin, thanks that thread helped me to understand more clearly the different concepts

I Tried to change DISPLAY to my IP:0.0 (my IP= windows IP)
I have added AIX to access control list of windows
but still have the same error

---------- Post updated at 04:54 AM ---------- Previous update was at 04:49 AM ----------

reading other similar problem, I found out that it can be caused by TCP (port 6000) was being blocked, how can I handle this in AIX ?
Moreover I tried :

>telnet My_Windows_IP
Trying...
telnet: connect: Connection timed out

Please post the EXACT description of this. What does "xauth list" say when executed on the Windows machine? Where did you set the "DISPLAY"-variable? Windows-machine? AIX-machine? What exactly did you do to "add AIX to access control list"? Where did you do that? ....

This may sound petty, but fact is: i have seen many many problems where some "small, insignificant" omissions made all the difference between "not working" and "working".

Ports 6000-6063/udp and 6000-6063/tcp, to be precise. A problem with blocked ports arises only if there are firewalls between the client and the server. Yes, these ports need to be allowed, because the common default firewall rule is to block everything until explicitly allowed. (Otherwise you wouldn't need a firewall at all.)

It is possible to run a firewall and/or packet filter on AIX (IPSec, IPtables, ...), but this is unlikely. Most probably the firewall (if there is one) is a separate machine and you need the firewall admin to configure the rule that the relevant ports are unobstructed.

This can have possible reasons: firewall, as above; telnet daemon not running on Windows (more likely), misconfigured routing table (less likely, but possible) and probably some more. Without more information it is anybodies guess.

I hope this helps.

bakunin

C:\Windows\system32>xauth list
'xauth'not recognized as an internal or external command,
operable program or batch file.

in Aix machine , I did :

export DISPLAY=windows_IP:0.0

Control panel > Windows Firewall > Advanced Settings (in the left side panel).
In the left panel, choose Inbound or Outbound rules.
Right panel, click New rule.
In the dialog, choose "custom".
In the left again, go to "Scope." and I added my_Aix_IP

any ideas ?

Hi,

sorry few questions.

Does it just say:

1356-364 xauth:  creating new authority file

anything else?

it should have created a file called: .Xauthority in your home directory.

if you close putty and re-open using the x11 settings mentioned you should see something like this:

<server>/unix:11  MIT-MAGIC-COOKIE-1  8f038f0e4185f5719f7d418b92e7aee5

can you try it again? also using the settings in x11 in putty if you get that message can you execute this command on the client?

echo $DISPLAY
mine shows this: localhost:11.0

I agree with bakunin, this could possibly be a firewall issue, but I'm also suspecting a putty configuration issue.

under x11 ensure x11 forwarding is enabled. display location is : localhost:0

Authentication protocol: MIT-Magic-cookie-1

I found this link you may want to try it.

http://www.geo.mtu.edu/geoschem/docs/putty_install.html

OK, this clears some points:

It seems that "xauth" is not installed or not in the path. Maybe in the XMing server you said you are using the tool is named differently or there is some dialog, ... I have no idea, because i have not used XMing. You will have to be creative or ask a Windows expert (i am glad to say i do not have to work with this OS). The "xauth" tool allows/disallows the X-clients (XTerm, XClock, ...) from certain hosts to use the resources of the local X-server (i.e. display their window on the screen provided and managed by the X-server). Search for something like "authentication" or so and probably you will find it.

Good. This tells the starting X-client which server it should (try to) utilise. techy1 has a point here, it might be that with firewall redirections, etc., you need to use "localhost" instead of your IP address, because the traffic is tunnelled and the tunnel comes out at 127.0.0.1.

This is definitely the wrong place to do it. X-server authentication has nothing to do with firewall rules. It is part of the configuration of the application. See above, you should check the programs installed with this XMing product you mentioned. It should be configured there.

I hope this helps.

bakunin