On Thu, Mar 05, 2009 at 10:36:39AM -0800, Bryan wrote:
> On Thu, Mar 5, 2009 at 9:54 AM, Darrin Chandler
> <dwchand...@stilyagin.com> wrote:
> >
> > Making a non-login shell act as a login shell isn't the best way,
> > whether you're in an xterm or at console. There are nicer ways to do
> > what you're after. Ksh, for instance, will process a file given in the
> > ENV environment variable for *every* shell:
> >
> > $ grep ENV ~/.profile
> > export ENV=$HOME/.kshrc
> > $ grep PS1 ~/.kshrc
> > export PS1="\...@\h \w \$ "
> >
> > Check the man page for your shell for details about how and when
> > .profile, ENV, et al are processed. It may take you a few goes to get
> > things working how you want, but then everything will work right
> > everywhere without special incantations.
> >
> okay, new question:  Why do I have to put PS1 in ~/.kshrc, when I've
> already put it in .profile?  I have to call another file from
> .profile, which will then read PS1 from .kshrc?  Is that desired
> operation?  Seems like redundancy...
>
> I've no problem doing it that way.  The UNIX gods are mysterious in some
ways...

No, you are right. Exporting ENV is no different from exporting PS1 in
the first place.

So the question is back to why PS1 isn't there. Are you using xdm, or
are you logging in at console and running startx? If you log in at
console then your PS1 should be there in your xterm shells without
making them login shells. If you're using xdm (or kdm, ...) you will not
have a login shell to begin with, and will need to deal with it in
~/.xsession (you could source your .profile there).

--
Darrin Chandler            |  Phoenix BSD User Group  |  MetaBUG
dwchand...@stilyagin.com   |  http://phxbug.org/      |  http://metabug.org/
http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG
Federation

[demime 1.01d removed an attachment of type application/pgp-signature]

Reply via email to