rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* Re: login shells
@ 1991-08-06 16:10 Donn Cave
  0 siblings, 0 replies; 7+ messages in thread
From: Donn Cave @ 1991-08-06 16:10 UTC (permalink / raw)


> I think rshd is broken.

How should it work?  Would it be OK with you, if rshd exec'd commands
with "-" prefixed to the shell name in argv[0], thus causing them to
be "logins"?  That will force people who exec stty etc. in .rcrc to
bracket that stuff with an interactivity test, but it's fairly
straightforward.

	Donn Cave, University Computing Services, University of Washington
	donn@cac.washington.edu


--
``The use of history as therapy means the corruption of history as history.''
	-- Arthur Schlesinger

Chet Ramey, Case Western Reserve University	Internet: chet@po.CWRU.Edu


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: login shells
@ 1991-08-07 15:35 Donn Cave
  0 siblings, 0 replies; 7+ messages in thread
From: Donn Cave @ 1991-08-07 15:35 UTC (permalink / raw)
  To: rc

|              "who am i" in its long format tells you from where you have
| logged onto a machine.

But not with rsh, which is where it's really needed.  There's no utmp entry.

| $ rsh wherever who am i
| donn     tty??   Aug  7 08:30

	Donn Cave, University Computing Services, University of Washington
	donn@cac.washington.edu


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: login shells
@ 1991-08-07  9:38 malte
  0 siblings, 0 replies; 7+ messages in thread
From: malte @ 1991-08-07  9:38 UTC (permalink / raw)
  To: rc

In current UNIX there is a mechanism like in 10th edition UNIX, although
it's hidden. "who am i" in its long format tells you from where you have
logged onto a machine.

I use this feature to set the DISPLAY env. variable in my X11 environment.
It works on SunOS 4.*, Ultrix 4*, AIX 3.1*, and A/UX 2.* and maybe others
I don't have access to.

One could easily include a few lines which check for that
(hostname != "entry_in_etc_utmp").

Malte		(malte@techfak.uni-bielefeld.de)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: login shells
@ 1991-08-06 21:17 Donn Cave
  0 siblings, 0 replies; 7+ messages in thread
From: Donn Cave @ 1991-08-06 21:17 UTC (permalink / raw)
  To: rc

| I like the 10th Edition method of putting a special variable in the
| environment of the invoked shell (REMOTE= or REMOTEHOST=otherhost or
| something like that).

That seems like a good idea, regardless.

But in order to use it, the shell has to be prepared to source some file
when it sees this variable (and then presumably delete the variable).
For rc, that would be .rcrc? so the effect would be similar to forcing
a "login" shell?

	Donn Cave, University Computing Services, University of Washington
	donn@cac.washington.edu


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: login shells
@ 1991-08-06 20:54 Chet Ramey
  0 siblings, 0 replies; 7+ messages in thread
From: Chet Ramey @ 1991-08-06 20:54 UTC (permalink / raw)
  To: donn; +Cc: rc, chet

> > I think rshd is broken.
> 
> How should it work?  Would it be OK with you, if rshd exec'd commands
> with "-" prefixed to the shell name in argv[0], thus causing them to
> be "logins"?  That will force people who exec stty etc. in .rcrc to
> bracket that stuff with an interactivity test, but it's fairly
> straightforward.

I like the 10th Edition method of putting a special variable in the
environment of the invoked shell (REMOTE= or REMOTEHOST=otherhost or
something like that).

Chet

--
``Someday soon, I'm gonna tell the world about the crying game...''

Chet Ramey			  Internet: chet@po.CWRU.Edu
Case Western Reserve University	  NeXT Mail: chet@macbeth.INS.CWRU.Edu


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: login shells
  1991-08-02 15:26 Donn Cave
@ 1991-08-06 12:16 ` Boyd Roberts
  0 siblings, 0 replies; 7+ messages in thread
From: Boyd Roberts @ 1991-08-06 12:16 UTC (permalink / raw)
  To: rc

I think rshd is broken.

One of the things I like about rc is the absence of superfluous command
line options, no weird ${foo+_)()*&^$%&%=blah} and no obscure semantics.

I'd hate to see:

    $home/.rcrc is sourced it the first character in argv[0] is '-'
    or the -l' options is used, or fd 5 is a named pipe (on Wednesdays),
    or TIOCAREYOUANXTERM works and your window manager supports a predictive
    keyboard focus algorithm (with XAnothorFoulLibraryCall(3))...


^ permalink raw reply	[flat|nested] 7+ messages in thread

* login shells
@ 1991-08-02 15:26 Donn Cave
  1991-08-06 12:16 ` Boyd Roberts
  0 siblings, 1 reply; 7+ messages in thread
From: Donn Cave @ 1991-08-02 15:26 UTC (permalink / raw)
  To: rc

Speaking of login shells, have we discussed .rcrc vs. rsh yet?  I haven't
tried this with the latest version, but I believe that rc invoked by rshd
doesn't read its startup.  That means that if a program isn't in the machine's
standard execution path, it can't be invoked by name via rsh, without the
assistance of a wrapper script that sets path.  For example.

I'm not saying that it's impossible to cope with, or even hard for an
intermediate shell hacker.  Bash gets it right, that's all.

	Donn Cave, University Computing Services, University of Washington
	donn@cac.washington.edu


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1993-03-01 20:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-08-06 16:10 login shells Donn Cave
  -- strict thread matches above, loose matches on Subject: below --
1991-08-07 15:35 Donn Cave
1991-08-07  9:38 malte
1991-08-06 21:17 Donn Cave
1991-08-06 20:54 Chet Ramey
1991-08-02 15:26 Donn Cave
1991-08-06 12:16 ` Boyd Roberts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).