I have a handy piece of script that I put in the .bash_profile of my
Solaris account so that whenever I log in using SSH, my DISPLAY variable
is automatically set to the IP I'm SSH-ing from:

if [ "$SSH_CLIENT" != "" ]; then
        export DISPLAY=`echo $SSH_CLIENT | cut -d " " -f1`:0
fi

This code is for bash, but I'm sure it can easily be adapted to any
shell.  But that's a programming matter. :)  Of course, if you just set
the DISPLAY variable manually every time, that will work, too.

It's been my experience that the DISPLAY just doesn't get set
automatically when logging into Solaris; whether it's really supposed
to, I don't know.

- Kathy

On Tue, 2002-09-17 at 02:07, Paul Richardson wrote:
> Greetings, I am running under Mandrake 8.2 with the default installed 
> ssh. I am trying
> to ssh into a solaris box. It turns out that I can ssh into the solaris 
> machine ok, but when I
> log in I notice that there is no DISPLAY env variable set and therefore 
> any x clients
> will not work.
> 
> The sshd_config file on the machine I log into has the X11Forwarding 
> variable set
> to yes. When I invoke ssh from end I type "ssh -X -l myUsername etc....
> 
> I suspect that it is the solaris machine with the problem because I have 
> used this
> box in the past to do x client stuff.I don't think this is a bug, more a 
> configuration
> problem
> 
> Any help would be appreciated



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to