DISPLAY environment variable from login(1)
Blair P. Houghton
bph at buengc.BU.EDU
Tue Sep 5 14:07:37 AEST 1989
When opening a new login window (pseudo-terminal in an X window running
a shell enabled to run the login(1) program), as in
xterm -ls -e login &
(xterm(1X) from X11R2) the new window comes up and immediately
does the login(1).
Only, login(1) creates an entirely new set of environment variables,
effectively ignoring the imported environment, and DISPLAY in particular.
One can also no longer determine the DISPLAY variable by using tty(1)
to look at whether one is at ttyv0 or ttyv1 (the display-consoles),
because the terminal is a pty with the name of whichever was the next
available pseudo-terminal, and any pty can get set to either of the two
displays on these two-head GPX workstations.
The question is, although I know the window is on this screen, and the
X server knows the window is on this screen, how can I get the shell
(csh(1)) to know which screen this window is on, in order to set
DISPLAY (in $HOME/.login, for the benefit of this process' children),
other than by prompting for that information from the user?
/etc/gettytab(5) has this information in it so that getty(8) knows
where to send the display-consoles, but it's tied again to knowing that
you're using either ttyv0 or ttyv1, so that route is moot.
Any assistance will be appreciated.
Flame if you must: you know I would. :-)
--Blair
"Shell Script 101 has been cancelled
for the fall semester due to the
fact that the instructor is stumped
on this one."
More information about the Comp.unix.questions
mailing list