[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: *term -ls, a summary

Adrian> I think the concepts say "yes".  E.g., if you type "ssh <host>
Adrian> <mycommand>", the shell really should be a login shell, even
Adrian> though the shell is not used to interact with the user.
Adrian> However, in practice, this does not happen.  This is one of
Adrian> the position where I think the system is broken: without
Adrian> running .profile, the environment is "halfly configured".
Adrian> I.e., my programs run with PATH (and other environment
Adrian> variables) set to a value different from what I usually use,
Adrian> its umask does not match my own policy, or user limits not
Adrian> set, etc.  It is like using an auto variable uninitialized
Adrian> from main(): it will have initial value, it will be the same
Adrian> everytime you run the program (because the kernel clear the
Adrian> memory), but it will not be easy to know what value it is set
Adrian> to, and it can change everytime you upgrade your compiler.  In
Adrian> fact, when I actually use "ssh" in any serious way, I always
Adrian> have to do something like "ssh <host> '. .profile;
Adrian> <mycommand>'" instead of the simple command shown above.  I
Adrian> see this a rather stupid way to follow the broken behaviour of
Adrian> rsh.

Norbert> FYI, I filed a bug on ssh, as I think it clearly is a bug.
Norbert> If rsh does this too, then someone who uses is may want to
Norbert> file a bug on it as well..

I disagree.  This is what ~/.ssh/environment and/or ~/.ssh/rc are for.

How is this case different from, say, executing a program off a menu
in X?  Last time I checked, you also don't get your .profile files
read, _unless_ you source them from your ~/.xsession (which is
precisely what that file is for).

The concept of a "login shell" should continue to refer to its
common-sense meaning, rather then inventing a new meaning for it just
for implementation convenience.

Ian Zimmerman, Oakland, California, U.S.A.
GPG: 433BA087  9C0F 194F 203A 63F7 B1B8  6E5A 8CA3 27DB 433B A087
EngSoc adopts market economy: cheap is wasteful, efficient is expensive.

Reply to: