On Thursday, June 5, 2003 6:47 am, Zippo wrote:
> I am haveing a problem with my Xterm promts. It is sh-05a$. it makes life
> in terminial rather hard. However if i type exec /bin/bash --login i
> corrects the problem. But i have todo that for every Xterm and is a pain.
> And if i am in a non-xterm terminal it is correct also. I am clueless some
> help would be much thanks. zippo
/me cracks open the man pages...
xterm(1):
-ls This option indicates that the shell that is
started in the xterm window will be a login shell
(i.e., the first character of argv[0] will be a
dash, indicating to the shell that it should read
the user's .login or .profile).
Note that this is incompatible with -e, since the
login program does not provide a way to specify
the command to run in the new shell. If you spec�
ify both, xterm uses -ls.
loginShell (class LoginShell)
Specifies whether or not the shell to be run in
the window should be started as a login shell.
The default is ``false.''
bash(1):
When bash is invoked as an interactive login shell, or as
a non-interactive shell with the --login option, it first
reads and executes commands from the file /etc/profile, if
that file exists. After reading that file, it looks for
~/.bash_profile, ~/.bash_login, and ~/.profile, in that
order, and reads and executes commands from the first one
that exists and is readable. The --noprofile option may
be used when the shell is started to inhibit this behav�
ior.
When a login shell exits, bash reads and executes commands
from the file ~/.bash_logout, if it exists.
When an interactive shell that is not a login shell is
started, bash reads and executes commands from ~/.bashrc,
if that file exists. This may be inhibited by using the
--norc option. The --rcfile file option will force bash
to read and execute commands from file instead of
~/.bashrc.
So either edit your X resources to use login shell mode by default in xterm,
or edit your .bashrc to set your prompt even when bash isn't run as a login
shell. I did the latter.
--
Andy Goth | [EMAIL PROTECTED] | http://ioioio.net/
End communication.
_______________________________________________
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86