[Gllug] export DISPLAY in .bashrc

Richard Jones rich at annexia.org
Thu Jun 17 13:15:39 UTC 2004


On Thu, Jun 17, 2004 at 01:56:22PM +0100, SteveC wrote:
> I've been googling around for how to set the display upon login.
> 
> Basically I have someone who uses $BIZARRE_X_SERVER_FOR_WINDOWS and
> ssh's to a box with putty. I'd like bashrc to set the display to the ip
> address they log in from if they do so remotely and otherwise leave it
> alone.

On my machine at home, ssh sets various SSH_* variables which appear
to contain the client IP address:

$ printenv | grep SSH
SSH_CLIENT=10.0.0.249 58543 22
SSH_TTY=/dev/pts/1
SSH_CONNECTION=10.0.0.249 58543 10.0.0.252 22

In particular, SSH_CONNECTION looks useful.

Rich.

-- 
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
MONOLITH is an advanced framework for writing web applications in C, easier
than using Perl & Java, much faster and smaller, reusable widget-based arch,
database-backed, discussion, chat, calendaring:
http://www.annexia.org/freeware/monolith/
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list