PI Problems

Bernard J. Duffy bernie at umbc3.UMBC.EDU
Tue Feb 27 07:28:23 AEST 1990


In article <51649 at sgi.sgi.com> brendan at illyria.wpd.sgi.com (Brendan Eich) writes:
>In article <9002220905.aa28986 at VAT.BRL.MIL>, jra at BRL.MIL ("John R. Anderson", VLD/ASB) writes:
>> 	1. The other day, I changed the net addresses on our PI's, and
>> at the same time I happened to place a notice to the user's in /etc/motd.
>> ... some of this deleted .... 
>
>The BSD rcp protocol is fragile: as the friendly manual page says in its
>BUGS section:
>
>     [Rcp is] confused by any output generated by commands in a .login,
>     .profile, or .cshrc file on the remote host.
>
>The problem is not having a non-empty /etc/motd on the remote host, but
>the fact that the remote user's .profile or .cshrc file cats /etc/motd
>(the above-quoted warning about .login is erroneous -- the remote half of
>rcp uses does not involve a login shell, so .login is not sourced).
>
>Csh users can cat motd-like files from their .login files.  But users of
>any shell shouldn't need to cat /etc/motd, as /etc/profile and /etc/cshrc
>do so for all login shells upon startup.

But what about X-term users.  I noticed that xterminal sessions (logins) into
the SGI machines don't have the benifit of /etc/cshrc (don't know about
/etc/profile for sh users.. don't have any).  And not only does that not
get executed, neither does the .login !  So, the only way to get /etc/motd
is to do it in the ~.cshrc  as I've done below to get once :

if ($?prompt) then
#    Prompt was set... for interactive session/ not process command
   if !($?BJD_ETC_CSHRC) then
       if ($?DISPLAY) then
           source /etc/cshrc
       endif
       setenv BJD_ETC_CSHRC 1
   endif
#...
endif
>
>Brendan Eich
>Silicon Graphics, Inc.
>brendan at sgi.com

This isn't an SGI-only problem, I've noticed this with DEC's Ultrix as well,
but had an easier time working the .cshrc since SGI's setup of the DISPLAY
is a bit sloppy (sets DISPLAY even thought there's no Xterm... convience
for the "console" user to run x programs while in wsh).

There may be a solution to this, but I haven't accidently run acrossed it
yet.
          Bernie Duffy.  

-- 
Bernie Duffy   Systems Programmer II | Bitnet    :  BERNIE at UMBC2
Academic Computing - L005e           | Internet  :  BERNIE at UMBC2.UMBC.EDU
Univ. of Maryland Baltimore County   | UUCP      :  ...!uunet!umbc3!bernie
Baltimore, MD  21228   (U.S.A.)      | W: (301) 455-3231  H: (301) 744-2954 



More information about the Comp.sys.sgi mailing list