Sun-Managers:
        Thanks for the overwhelming response.  You can stop whelming me now!
My original question is appended below.
Many people responded to tell me that there was a MacX feature to do what we
wanted to do.  Rodney Campbell (rodney@tansu.com.au) summed it up nicely:
> MacX has an internal variable which has the DISPLAY variable set.
> See the section "Chapter 3: Using Remote Commands - SubSection "Remote
> Command" of the MacX manual (in mine it is page 54). This section tellys
> you that you can use the macro "[RegisteredMark]display" to automatically
> set the display variable from a remote command. The [RegisteredMark] looks
> like a Capital "R" in a Circle and is generated by holding down the Option
> Key and then pressing the "r" key.
> 
> In a Remote Comand you can use this like:
> 
> /usr/bin/X11/xterm -display "[RegisteredMark]display"
> 
> 			    					Rodney...
Others with the same suggestion were:
Dallas N Antley <dna@clas.ufl.edu>
wallen@cogsci.UCSD.EDU (Mark R. Wallen)
John Valdes valdes@geosun.uchicago.edu
Christopher Davis <ckd@loiosh.kei.com>
seanw@usops (Sean Ward)
lbd@mhcnet.att.com (Leslie_B_Dreyer Kalra)
barnum@pluto.crd.ge.com (Maria A. Barnum)
ericb@telecnnct.com (Eric William Burger)
James J Dempsey <jjd@spserv.bbn.com>
leach@oce.orst.edu (Tom Leach)
Some folks sent me other suggestions and scripts, which I will try out when
I have time (probably no time real soon):
swatson@Kodak.COM (Steve Watson)
kumeda@tds.com (Andy Kumeda)
john@oncology.uthscsa.edu (John Justin Hough)
perryh@pluto.rain.com (Perry Hutchison)
David Lawrence Oppenheimer <davido@phoenix.Princeton.EDU>
Tim Pointing tim@ben.dciem.dnd.ca
grevemes@VTC.TACOM.Army.Mil (Steven Grevemeyer)
asargusi@sbrsim.ed.dreo.dnd.ca (Ayrton Sargusingh)
Dan Stromberg - OAC-DCS <strombrg@hydra.acs.uci.edu>
Thanks for all the contributions.  My mailtool runneth over!
John
*******************************************************************************
*  John D. Schneider                Internet: jdschn@nicsn1.monsanto.com      *
*  Research Computing Consortium    Telephone: (314)537-6808                  *
*  Monsanto Company - Mail Zone GG3I _________________________________________*
*  700 Chesterfield Parkway North   | "No sciences are better tested than     *
*  St. Louis, Missouri 63198        |  the religion of the Bible."            *
*                                   |                   - Sir Isaac Newton    *
*******************************************************************************
* Disclaimer:  If you think I am a spokesperson for the Monsanto Company, its *
*              subsidiaries, management, or lackeys, you are sadly mistaken.  *
*******************************************************************************
Original question:
> Sun-Managers,
> 	I asked this question a while back, but from the responses I got I
> apparently didn't explain my problem thoroughly. 	
> 	We have MacX users that access Xwindows apps running on our Sparcs
> (running SunOS 4.1.3 now, but Solaris in the near future).  In order for them
> to launch the Xwindow apps, they need to have the DISPLAY environmental 
> variable set to the Mac they are connecting as.  The way we do it today, the
> users have to code the command:
> 
> setenv DISPLAY mymac:0.0; xapp_name_here
> 
> into their MacX configuration file, so the variable is set properly when the
> user's Mac connects to the Sparc, before the X app is launched.  The problem
> with this approach is that user's Mac addresses change frequently when they
> go from group to group.  Another problem is that some of our Mac users connect
> to our system via MacPPP through a Centrum server that assigns a different
> TCP/IP address based on what port the user happens to get.  This makes them 
> have to change their MacX configuration each time they connect.
> 	We would like to have a program that could be called from the .cshrc 
> that would correctly return the TCP/IP address initiating the connection.
> The last time I asked this question, several people responded and said to just
> issue 'who am i' and parse the result.  I'm sorry, folks, but that doesn't 
> work.  The response from 'who am i' does not contain the node or address field
> when you connect via MacPPP.  At least it doesn't on our systems.  If this
> is something we have configured wrong on our Sparcs please let me know.
> 	Otherwise, does anyone have a program that will issue a system call to
> find out where the connection is coming from?  Surely I am not the first 
> person to want to do this.  Where do I go looking?
> 
> John
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:03 CDT