On Thu, Mar 05, 2009 at 04:57:47AM +0000, Bryan wrote:
> Greetings,
>
> In my .profile I have the following:
>
> PS1="\...@\h \w \$ "
> export PS1
>
> On the console, I see:
>
> u...@host "pwd" $
>
> I was looking at the man page for xterm(1), and I saw that by invoking
> "xterm -ls", the terminal should read .profile, and set the prompt.
> In an xterm, I was able to run "xterm -ls" and have just this exact
> thing happen.
>
> Then I installed scrotwm, and went into /etc/scrotwm.conf and set the
> "spawn_term" to "xterm -ls", thinking this would do the same, but it
> does not.
>
> What am I doing wrong?  I am using the default shell.  Does scrotwm do
> something special to call "xterm"?

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.

--
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