Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

xclock fail with "Error: Can't open display" on "ssh -X"

921 views
Skip to first unread message

TsanChung

unread,
Jan 5, 2009, 8:34:57 PM1/5/09
to
I can ssh -X to a RHEL4 linux and a HP-UX B.11.23 U ia64 computer
from a FC6 linux computer.
I can run
xclock or xterm
on the RHEL4 linux computer.
However, running
xclock or xterm
on the HP-UX B.11.23 U ia64 computer has these errors:
bash-3.2# xclock
Error: Can't open display:
Error: Couldn't find per display information

bash-3.2# xterm
xterm Xt error: Can't open display: %s

bash-3.2# sshd -version
sshd: illegal option -- v
OpenSSH_4.5p1+sftpfilecontrol-v1.1-hpn12v14, OpenSSL 0.9.7l 28 Sep
2006
HP-UX Secure Shell-A.04.50.021, HP-UX Secure Shell version

Using "ssh -Y" to login to the RHEL4 and HPUX computer get the same
result.

Please help so that I can run xclock or xterm on the HPUX computer.

Bit Twister

unread,
Jan 5, 2009, 9:01:10 PM1/5/09
to
On Mon, 5 Jan 2009 17:34:57 -0800 (PST), TsanChung wrote:
> I can ssh -X to a RHEL4 linux and a HP-UX B.11.23 U ia64 computer
> from a FC6 linux computer.
> I can run
> xclock or xterm
> on the RHEL4 linux computer.
> However, running
> xclock or xterm
> on the HP-UX B.11.23 U ia64 computer has these errors:

might try
xhost +localhost
ssh RHEL4.ip.here

You may want to verify your hupx login script(s) does not hard code $DISPLAY

TsanChung

unread,
Jan 6, 2009, 9:58:10 AM1/6/09
to

I try on the FC6 linux computer
xhost +localhost

I do
bash-3.2# ps -ef |grep sshd
root 20369 1 0 09:51:35 ? 0:00 /opt/ssh/sbin/sshd
...

Then
bash-3.2# kill -HUP 20369
to restart sshd

I ssh to the hpux computer but still get the same error.

Andrew Gideon

unread,
Jan 6, 2009, 1:18:39 PM1/6/09
to
On Mon, 05 Jan 2009 17:34:57 -0800, TsanChung wrote:

> Error: Can't open display:

Try:

echo $DISPLAY

It appears as if the server has X forwarding disabled (since you
explicitly requested X forwarding of the client), but this echo would
help determine if this was so.

- Andrew

TsanChung

unread,
Jan 8, 2009, 5:12:36 PM1/8/09
to

# echo $DISPLAY
sh: DISPLAY: Parameter not set.
# export DISPLAY=localhost:10.0
# xclock
X connection to localhost:10.0 broken (explicit kill or server
shutdown).

Andrew Gideon

unread,
Jan 9, 2009, 9:34:21 PM1/9/09
to
On Thu, 08 Jan 2009 14:12:36 -0800, TsanChung wrote:

> # echo $DISPLAY
> sh: DISPLAY: Parameter not set.

Right. Something is preventing the forwarding. Best guess: server
configuration.

> # export DISPLAY=localhost:10.0

That won't work if SSH isn't already listening for the packets to forward.

> # xclock
> X connection to localhost:10.0 broken (explicit kill or server
> shutdown).

- Andrew

0 new messages