Re: *term -ls, a summary
Isaac> Consider pdmenu. If one runs a program in X using pdmenu, X
Isaac> has already created the login environment, so there is no need
Isaac> to re-initialize things.
No, not in general. It depends on your .xsession file, just like the
ssh case depends on your .ssh/environment file.
Isaac> Note that what this bug report aims for is a *lack of* special
Isaac> case. Whenever I run a program as user, I want to be sure that
Isaac> I've inherited some login environment from some program that
Isaac> I've executed before, and that I've established that
Isaac> environment only once from the path that where the "init"
Isaac> program starts.
But what if I _don't_ want to run "as a user"? What if my .profile
contains interactive bits, for example, as is quite common? Even
Norbert mentions that case ...
Ian> Yes. IMO login => interactive.
Isaac> This does not work well in practice, since then nothing else
Isaac> will be able to make sure that your environment is properly
Nothing? That must be hyperbole, as your message makes it clear that
you know about the environment file.
Ian> Why couldn't you have a "ssh -c command" in .xsession, for
Ian> example? I can imagine some quite practical uses for that.
Isaac> Hm... in ssh, -c means choose a cipher. Perhaps you mean "ssh
Isaac> host command" instead.
Right, sorry for that.
Isaac> And I think this is the core problem: the "command" is not
Isaac> executed in a pre-defined, user-controllable environment.
Isaac> Indeed, there is no flag in the ssh client that asks the server
Isaac> to create such an environment. This is completely determined
Isaac> by the existence or absence of the "command" argument. Which
Isaac> is completely broken.
Same answer as above: you _can_ do what you want. It is merely a
matter of (in)convenience, editing another dotfile. Is that really
worth breaking the non-interactive case?
Ian> Why do we have .bashrc and .bash_profile then? Have you filed a
Ian> bug against bash already?
Isaac> No. You can type "bash" to execute a new shell, and in this
Isaac> case the whole login environment is inherited from your
Isaac> previous login shell.
But that is not the only situation. Another is su. cron and at yet
Isaac> Where is the easy ssh way to say "I want
Isaac> you to establish a complete session in the server"?
Okay, here you may be right. Perhaps there should be a flag to
distinguish the two cases. But _don't force me_ to execute my
.profile when I want to execute a single noninteractive command.
Isaac> If you find another program which has similar behaviour (ftp is
Isaac> perhaps a good choice in case it runs a program, but nobody use
Isaac> that so there is really no problem there), that is broken, too.
And I am _not_ going to argue over the brokenness of cron.
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.