Beginner: Where to configure shell?

Hi!

Just wondering how I could configure my shell (adding some aliases, changing the prompt, …)

$HOME/.profile seems not to be processed when opening a new term.

Regards,
Markus

Markus Poellmann <poellman@talknet.de> wrote:
: Hi!

: Just wondering how I could configure my shell (adding some aliases, changing the prompt, …)

: $HOME/.profile seems not to be processed when opening a new term.

If you’re using ksh, put the aliases in ~/.kshrc.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Steve Reid <stever@qnx.com> wrote:

Markus Poellmann <> poellman@talknet.de> > wrote:
: Hi!

: Just wondering how I could configure my shell (adding some aliases, changing the prompt, …)

: $HOME/.profile seems not to be processed when opening a new term.

If you’re using ksh, put the aliases in ~/.kshrc.

Actually, this isn’t quite correct.

The .kshrc is a common place to put the aliases – but it isn’t actually
what is looked for.

On startup:

– the shell checks to see if it is a login shell (does argv[0] start with
a ‘-’ character)
if so
it will look for /etc/profile and run that
then it will look for $HOME/.profile
(endif)
then it checks the ENV environment variable, if this is set
it will look for the file it points to, and run that.
Traditionally ENV is set to $HOME/<name_of_shell>rc, ie $HOME/.kshrc
(Where $HOME is your home directory, eg. /home/dagibbs)

So, you want to export the ENV environment variable in your .profile and
have it point to a file where all of your aliases and shell functions will
be defined.

-David

QNX Training Services
dagibbs@qnx.com

I have found that a telnet login doesn’t carry all the environment variables, especially if telnet
support was started early in the sysinit. If your .profile or /etc/profile is looking at some
environment variables, then a console login may behave differently than a telnet of other login.
What I did was move the required definitions into a separate script in /etc/config/env_settings
and I call that script as appropriate from either/both of /etc/config/sysinit and the /etc/profile
using
a dot-space prefix so that it affects the current environment:
. /etc/config/env_settings
Just a possibility, Good luck
-Paul

Steve Reid <stever@qnx.com> wrote in message news:944pft$1cf$1@nntp.qnx.com

Markus Poellmann <> poellman@talknet.de> > wrote:
: Hi!

: Just wondering how I could configure my shell (adding some aliases, changing the prompt, …)

: $HOME/.profile seems not to be processed when opening a new term.

If you’re using ksh, put the aliases in ~/.kshrc.


Steve Reid > stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems