[319] in RedHat Linux List
Re: howto update HOSTDISPLAY variable once X is started?
daemon@ATHENA.MIT.EDU (Todd A. Wood)
Mon Oct 21 22:24:54 1996
Date: Mon, 21 Oct 1996 21:25:21 -0400
From: "Todd A. Wood" <tawood@earthlink.net>
Reply-To: tawood@earthlink.net
To: redhat-list@redhat.com
Resent-From: redhat-list@redhat.com
Thomas Porter wrote:
>
> Howdy,
>
> I am trying to use rsh to run xterm on a remote site after I have dialed
> into my ISP and gotten a dynamic IP address assigned. I do the dialup from
> within X. My HOSTDISPLAY env variable contains the hostname from my
> /etc/hosts file, vasili.rlf.org.
>
> Assuming I can run a script to get my dynamic IP address. like part of
> ip-up, is there a way to update the HOSTDISPLAY env variable made available
> by X to all processes started under X so that my rsh invocation which makes
> reference to $HOSTDISPLAY will be correct? Is there a way for a script
> running from an xterm, or started by a FVWM menu entry to affect the
> environment variables made available to _all_ processes started under X?
>
> Thanks,
-----
#!/bin/sh
#
# Determine IP Address Dynamically assigned by PPP
#
# Written by Todd A. Wood <tawood@earthlink.net>
# 24 August 1996 original
#
INTERFACE=ppp0
ifconfig $INTERFACE | grep inet | sed s/inet\ addr\:// | cut -dP -f1 |
sed s/\ //g
-----------
Assume the above script is named ppp-address then you could set your
HOSTDISPLAY by:
HOSTDISPLAY=`ppp-address`
export HOSTDISPLAY
in your .xsession or xfm/Xsession etc etc etc
--
Todd A. Wood "The views expressed are of my own free
Greenwood, IN, USA will, at least I think so."
mailto:tawood@earthlink.net
http://home.earthlink.net/~tawood
http://www.posterweb.com/posterweb
--
PLEASE read the Red Hat FAQ, Tips, HOWTO and the MAILING LIST ARCHIVES!
________________________________________________________________________
http://www.redhat.com/RedHat-FAQ http://www.redhat.com/RedHat-HOWTO
http://www.redhat.com/RedHat-Tips http://www.redhat.com/mailing-lists
------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null