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

X11 and Solaris-5.9?

59 views
Skip to first unread message

rat...@cps.cmich.edu

unread,
Jun 1, 2005, 7:42:08 PM6/1/05
to
I am having problems exporting display to a Linux box from
A Solaris-5.9 box (SunBlade-100). Steps followed:

xhost + Solaris-host on Linux
ssh login to Solaris-host from Linux
export DISPLAY=Linux-host:0 (on Solaris-host)
xterm

error: can not open DISPLAY..

/etc/ssh/sshd_config (on Solaris-host) has the line
AllowTcpForwarding no
X11Forwarding yes
X11DisplayOffset 10

Also tried:

1. ssh -X user@Solaris-host but to no avail
2. export DISPLAY=Linux-host:10 sam error

Any ideas?
-ishwar

Tony Curtis

unread,
Jun 1, 2005, 7:47:35 PM6/1/05
to
>> On 1 Jun 2005 16:42:08 -0700,
>> rat...@cps.cmich.edu said:

> I am having problems exporting display to a Linux box from A
> Solaris-5.9 box (SunBlade-100). Steps followed:

> xhost + Solaris-host on Linux ssh login to Solaris-host from
> Linux export DISPLAY=Linux-host:0 (on Solaris-host) xterm

Shouldn't be doing that. X gets tunneled over the ssh
connection. DISPLAY should end up as something like
localhost:12.0 (to use an example currently from my linux
desktop to a remote Solaris box).

Make sure the ssh_config on the display machine allows X
forwarding, and the sshd_config on the remote machine does
too.

hth
t

Dave Uhring

unread,
Jun 1, 2005, 7:55:03 PM6/1/05
to
On Wed, 01 Jun 2005 16:42:08 -0700, ratta wrote:

> xhost + Solaris-host on Linux

There should be no space between "+" and "Solaris-host", if you insist on
doing it this way.

Alan Coopersmith

unread,
Jun 1, 2005, 10:49:20 PM6/1/05
to
rat...@cps.cmich.edu writes in comp.unix.solaris:

|I am having problems exporting display to a Linux box from
|A Solaris-5.9 box (SunBlade-100). Steps followed:
|
|xhost + Solaris-host on Linux

Not needed if you're using ssh X forwarding. Won't work if you're using
one of the Linux distros that ships with -nolisten tcp turned on by
default to block X connections over the network.

|ssh login to Solaris-host from Linux
|export DISPLAY=Linux-host:0 (on Solaris-host)

The export DISPLAY tells the system to ignore ssh X forwarding
and go back to the old-fashioned X protocol (which again won't work
with the default config on most Linuxes).

To use ssh X forwarding, you only do:
ssh -X user@host

No xhost. No export DISPLAY.

--
________________________________________________________________________
Alan Coopersmith * al...@alum.calberkeley.org * Alan.Coo...@Sun.COM
http://www.csua.berkeley.edu/~alanc/ * http://blogs.sun.com/alanc/
Working for, but definitely not speaking for, Sun Microsystems, Inc.

Oscar del Rio

unread,
Jun 2, 2005, 7:52:28 AM6/2/05
to
rat...@cps.cmich.edu wrote:

> /etc/ssh/sshd_config (on Solaris-host) has the line
> AllowTcpForwarding no
> X11Forwarding yes
> X11DisplayOffset 10

IIRC, the default on Solaris 9 was "X11Forwarding no".
Did you restart or HUP'd the sshd daemon after editing sshd_config?

ssh -X should work without doing any xhost or export DISPLAY.
Check also that you don't have any dot script (.profile, .cshrc, etc)
resetting the DISPLAY variable.

rat...@cps.cmich.edu

unread,
Jun 2, 2005, 9:13:38 AM6/2/05
to
I did restart sshd
ssh -X user@host
followed by
xterm
produces the error
xterm xt error: can't open diaplay:
(if display is not set to locat host before xterm)
is display is set on host to local host then
xterm
produces error
xterm xt error: can't open display: localhost:0

I am stumped.

-ishwar

D

unread,
Jun 2, 2005, 9:42:05 AM6/2/05
to

ssh -Y user@host

does that work?

Rob Shepherd

unread,
Jun 2, 2005, 9:45:13 AM6/2/05
to

Use a few "-v"s as options for your ssh command will show whether the X is being
forwarded or not.

`man ssh` for details

Rob

--
Rap it up for the common good
Let us enlist the neighbourhood
It's OK, I've overstood
This is a wordy rappinghood. OK, bye.

Tomtomclub, 1980.

Darren Dunham

unread,
Jun 2, 2005, 1:25:03 PM6/2/05
to
rat...@cps.cmich.edu wrote:
> ssh -X user@host
> followed by
> xterm
> produces the error
> xterm xt error: can't open diaplay:
> (if display is not set to locat host before xterm)
> is display is set on host to local host then
> xterm
> produces error
> xterm xt error: can't open display: localhost:0

It is possible for some .profile or .login scripts to override the
DISPLAY that is set by sshd. If that happens, then the X forwarding
won't work.

--
Darren Dunham ddu...@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >

rat...@cps.cmich.edu

unread,
Jun 2, 2005, 6:22:33 PM6/2/05
to
This is waht worked..

ssh -X user@solaris-host
export DISPLAY=localhost:10
xterm

works..
-ishwar

Tony Curtis

unread,
Jun 2, 2005, 7:22:10 PM6/2/05
to
>> On 2 Jun 2005 15:22:33 -0700,
>> rat...@cps.cmich.edu said:

> This is waht worked.. ssh -X user@solaris-host export
> DISPLAY=localhost:10 xterm

You don't need to export the DISPLAY. ssh should do this for
you.

Logan Shaw

unread,
Jun 2, 2005, 7:39:35 PM6/2/05
to
rat...@cps.cmich.edu wrote:
> This is waht worked..
>
> ssh -X user@solaris-host
> export DISPLAY=localhost:10
> xterm

In that case, you probably have a .profile or a .bashrc or a .cshrc
or a .login or /etc/profile or something that is screwing up the
proper setting of DISPLAY that sshd is giving you.

I recommend doing a

grep -w DISPLAY "$HOME"/.[^.]*

to see if any of those files is clobbering the variable.

If you really need the DISPLAY-setting logic, perhaps you can
modify it to do something like this:

if [ -z "$DISPLAY" ]
then
DISPLAY=whatever
fi

That is, only set DISPLAY if it isn't already set (on the assumption
that if it's set, it's probably valid).

- Logan

0 new messages