.profile problem

I’m trying to set up some aliases in my .profile file, but it appears
that my .profile file isn’t being run. I login and try running one of
my aliases (e.g. ll (alias ll='ls -l")), but it doesn’t work. If I then
type “. /home/neville/.profile”, the .profile file is read and then “ll”
works perfectly.

Does anyone know why the .profile file isn’t being automatically read on
startup? Thanks.

Neville

Neville Bonwit <neville@erg.sri.com> wrote:

I’m trying to set up some aliases in my .profile file, but it appears
that my .profile file isn’t being run. I login and try running one of
my aliases (e.g. ll (alias ll='ls -l")), but it doesn’t work. If I then
type “. /home/neville/.profile”, the .profile file is read and then “ll”
works perfectly.

Does anyone know why the .profile file isn’t being automatically read on
startup? Thanks.

…profile is only started by a “login” shell – that is, a shell that is
started with its argv[0][0] == ‘-’, generally its argv[0] will be “-ksh”
or “-sh”.

Whether or not the .profile is processed, the shell will then look for
the ENV environment variable, and process the commands in this file.
Traditionally, this is set to something like .kshrc or .shrc. Normally,
one puts env settings in .profile (since they are inheritted), but puts
aliases, functions declarations, etc in the $ENV file so that subshells
etc will get them.

By default, pterm does NOT start its shells as a login shell – but if
you pass it the “-l” (ell) option, it will do so. Assuming you’re running
from Photon, you’ll probably want to modify your shelf/menu to run
pterm -l. (I’m not familiar enough with Photon 2.0 config to describe
how to do that.)

-David

QNX Training Services
dagibbs@qnx.com