On Monday, September 23, 2002, at 04:49 PM, K Montgomery wrote:

> 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.

Useful.  =)  I've added this to the user contributed notes section of 
the openssh article on MandrakeSecure.

--
MandrakeSoft Security; http://www.mandrakesecure.net/
"lynx - source http://linsec.ca/vdanen.asc | gpg --import"
{FE6F2AFD: 88D8 0D23 8D4B 3407 5BD7 66F9 2043 D0E5 FE6F 2AFD}

Attachment: PGP.sig
Description: PGP signature

Reply via email to