unable to do remote x-window, localhost=CentOS4, Remotehost=AIX

General support questions including new installations
Post Reply
jizwang
Posts: 3
Joined: 2005/03/03 17:39:55

unable to do remote x-window, localhost=CentOS4, Remotehost=

Post by jizwang » 2005/03/11 14:13:01

just got CentOS4 installed refresh, loved it. however, I got a unusual problem with remote x-window, could someone help. Thanks

localhost= CentOS4, trex
remotehost= AIX 5L, zhoem01p

[wangj@trex ~]$ xhost +
access control disabled, clients can connect from any host
[wangj@trex ~]$ ssh zhoem01p
wangj@zhoem01p's password:

zhoem01p(wangj): export DISPLAY=trex:0.0
zhoem01p(wangj): xclock
Error: Can't open display: trex:0.0
zhoem01p(wangj):

Notes:
1. both trex and zhoem01p are on DNS and can see each other.
2. I can use ohter AIX box to remote connect to zhoem01p without any problems (remote x session)
3. it worked fine with Whitebox Enterprise Linux 3 as localhost
4. SecLinux has been disabled during installation

denethor_iti
Posts: 5
Joined: 2005/03/11 01:40:33

Re: unable to do remote x-window, localhost=CentOS4, Remotehost=AIX

Post by denethor_iti » 2005/03/11 15:46:57

You don't need to muck with xhost or DISPLAY at all when tunnelling via ssh.

You should be able to use -X (capital "X") with ssh, e.g.:

[you@localhost ~]$ ssh -X remotehost
you@remotehost's password:
[you@remotehost ~]$ xeyes

And the xeyes toy program should display on your machine. The -X option will handle setting the DISPLAY environment variable on the remote machine, tunnel the X traffic over the secure connection, and pass the X traffic to the local X server.

See "man ssh" for more details than you'll probably need. :)

jizwang
Posts: 3
Joined: 2005/03/03 17:39:55

Re: unable to do remote x-window, localhost=CentOS4, Remotehost=AIX

Post by jizwang » 2005/03/11 17:45:58

this works only if the ID you are using have "remote login" privilege in AIX, which allow direct remote login. If I have to "su - " to other ID on the AIX, then I have to use DISPLAY (or haven''t I?), which still not working

as followings

[wangj@rex] ssh -X remotehost
[wangj@remotehost] xclock # -- WORKING
[wangj@remotehost] su - oracle
[oracle@remotehost] export DISPLAY=trex:0.0
[oracle@remotehost] xclock # - Failed with the same error


[quote]
denethor_iti wrote:
You don't need to muck with xhost or DISPLAY at all when tunnelling via ssh.

You should be able to use -X (capital "X") with ssh, e.g.:

[you@localhost ~]$ ssh -X remotehost
you@remotehost's password:
[you@remotehost ~]$ xeyes

And the xeyes toy program should display on your machine. The -X option will handle setting the DISPLAY environment variable on the remote machine, tunnel the X traffic over the secure connection, and pass the X traffic to the local X server.

See "man ssh" for more details than you'll probably need. :)[/quote]

jizwang
Posts: 3
Joined: 2005/03/03 17:39:55

Re: unable to do remote x-window, localhost=CentOS4, Remotehost=AIX

Post by jizwang » 2005/03/11 18:30:11

OK, I got it fixed.

It is defualt security setting on gdm/x-server, which doesn't allow remote connection to x-server. even though "xhost +" does not return any messages/errors

all you need to do:

1. vi /etc/X11/gdm/gdm.conf

2. change

DisallowTCP=true
to
DisallowTCP=false

3. restart x-server

denethor_iti
Posts: 5
Joined: 2005/03/11 01:40:33

Re: unable to do remote x-window, localhost=CentOS4, Remotehost=AIX

Post by denethor_iti » 2005/03/11 18:52:46

[quote]defualt security setting on gdm/x-server,[/quote]
Do be aware that this is INSECURE. Don't do it over an untrusted network. Everything is sent in plain text.

denethor_iti
Posts: 5
Joined: 2005/03/11 01:40:33

Re: unable to do remote x-window, localhost=CentOS4, Remotehost=AIX

Post by denethor_iti » 2005/03/11 19:10:21

[quote]this works only if the ID you are using have "remote login" privilege[/quote]
You can look at pam_xauth, or use a script to extract the authentication cookie from xauth.

There's lots of info via Google, e.g. http://www.google.com/search?q=ssh+X+display+su

Post Reply

Return to “CentOS 4 - General Support”