Path: utzoo!attcan!uunet!aplcen!samsung!cs.utexas.edu!tut.cis.ohio-state.edu!uc!cs.umn.edu!brsmith From: brsmith@cs.umn.edu (Brian R. Smith) Newsgroups: comp.windows.x Subject: Re: Should login xterms show /etc/motd? Message-ID: <1990Jul20.180959.21846@cs.umn.edu> Date: 20 Jul 90 18:09:59 GMT References: <1990Jul18.200754.13129@cs.umn.edu> <678@venice.SEDD.TRW.COM> Organization: University of Minnesota, Minneapolis, CSci dept. Lines: 59 baur@venice.SEDD.TRW.COM (Steven L. Baur) writes: >From article <1990Jul18.200754.13129@cs.umn.edu>, by brsmith@umn-cs.cs.umn.edu (Brian R. Smith): >> So, would it be reasonable to augment xterm (yet again) to dump >> /etc/motd (among other things) into its window before starting a login >> shell? >Absolutely not. There is a perfectly good place to put this, and that is >in the Xsession file run by xdm prior to login. What about when user "george" does and "rcmd [or xrsh] foo xterm -ls". He's now logged into foo, but he has NOT seen /etc/motd. xterm has half of /bin/login in it already - it can update /etc/utmp and /usr/adm/wtmp, chown the pty, etc. Why not throw the rest in? It would make things much less confusing for our novice users - xterm logins would appear nearly identical to normal terminal logins. >> I've got a crude hack set up in /etc/.login (sourced before ~/.cshrc >> and ~/.login) right now - if "WINDOWID" is set it cats /etc/motd. > That works only if your users don't use more modern shells :-). Ah, but *I* am the one to install the more modern shells, so I can hack them as I please... (evil laughter) >What I'd like to see is a program that can take a text file >(determine a minimum amount of screen space) and just display it with >a button to click on when the user is done reading it. That would be a nice solution, for xdm logins, at least. But it still wouldn't take care of those people using xterm to login, rather than rlogin or telnet. Probably the *BEST* solution came from Edward Wang (edward@ucbarpa.berkeley.edu) - have xterm run /bin/login itself, and not even try to update /etc/utmp and /usr/adm/wtmp. This is essentially what rlogind and telnetd do, so there's even precedent. Unfortunately, this means that you must have an xterm and /bin/login that can agree with each other. If your login supports "-f" (which SunOS doesn't), you can just do: xterm +ls -e /bin/login -fp $USER On our Sequent (Dynix 3.0.17) this works just great - it is *identical* to an rlogin. But no go for suns. BUT: the 4.3bsd /bin/login supports "-f", and it IS publicly available, so it is a workable solution. Now the question is: Would it be reasonable to change xterm to run "/bin/login -fp ..." for login shells? (If you'll excuse me, I'll go bash on the xterm source for a while... :-)) Brian brsmith@cs.umn.edu