Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbfsb!cbnewsc!dalka From: dalka@cbnewsc.att.com (kenneth.j.dalka) Newsgroups: comp.windows.x Subject: How do you get the IP addr for the DISPLAY var? Message-ID: <1991Apr3.144934.13473@cbnewsc.att.com> Date: 3 Apr 91 14:49:34 GMT Distribution: usa Organization: AT&T Bell Laboratories Lines: 17 I'm using an X windowing terminal with a UNIX system V machine and I'd like to set the DISPLAY variable automatically from a shell script (or C program). The problem is that I'd like to make it terminal independent. Rather that setting some pre determined IP address in my .profile, I'd like to be able to walk down the hall and log on with some other terminal if need be. The only way I can see that this would work is if I could somehow ask UNIX what my IP address is. It must know because I can login and talk to unix before I get to X. If UNIX can send characters back to me, then it knows where I am. But I can't find any place in UNIX where the info is stored. PS. I don't want some dumb shell to ask me to type in my IP as I login. -- Ken Dalka (Bell Labs) att!ihlpf!dalka IHC 1U-228 (708) 305-4449