I have just switched my user from using /bin/sh to using bash. However,
there seems to be a problem. It seems to ignore .login. I set a
variable in .login but it is not set when I start a terminal in Photon.
Am I not really logging into bash when I log into Photon?
I am using Photon QNX 6.2.0.
…Stephen
Stephen Rasku <spr@shaw.ca> wrote:
I have just switched my user from using /bin/sh to using bash. However,
there seems to be a problem. It seems to ignore .login. I set a
variable in .login but it is not set when I start a terminal in Photon.
Am I not really logging into bash when I log into Photon?
I am using Photon QNX 6.2.0.
http://www.openqnx.com/PNphpBB2-viewtopic-t1845-.html
In article <c0r6l9$8pt$1@inn.qnx.com>, Frank Liu wrote:
Stephen Rasku <> spr@shaw.ca> > wrote:
I have just switched my user from using /bin/sh to using bash. However,
there seems to be a problem. It seems to ignore .login. I set a
variable in .login but it is not set when I start a terminal in Photon.
Am I not really logging into bash when I log into Photon?
I am using Photon QNX 6.2.0.
http://www.openqnx.com/PNphpBB2-viewtopic-t1845-.html
Unfortunately, .ph/phapps doesn’t seem to work. Any variables that I
set in this script are not exported to the calling environment. This
might be particular to bash because I have the same problem when I call
phapps from the command line. This is of little consolation however
since I want to use bash.
Any other ideas?
…Stephen
pterm -l
–
Marty Doane
Siemens Dematic
“Stephen Rasku” <spr@shaw.ca> wrote in message
news:slrnc327bl.gek.spr@samantha.armispiansystems.ca…
I have just switched my user from using /bin/sh to using bash. However,
there seems to be a problem. It seems to ignore .login. I set a
variable in .login but it is not set when I start a terminal in Photon.
Am I not really logging into bash when I log into Photon?
I am using Photon QNX 6.2.0.
…Stephen
In article <c0thnr$99q$1@inn.qnx.com>, Marty Doane wrote:
pterm -l
–
Marty Doane
Siemens Dematic
The reason I want to do this is so I can use ssh-agent. I am used to using
X on Unix/Linux. In this case, I call ssh-agent from .login and all xterms
have access to the single ssh-agent so I can login any number of times
from different windows. I just have to ssh-add my passphrase just once.
If I use “pterm -l”, I will get a different ssh-agent version for every
window I start. Is it possible to have a global environment set by
…login (or some other method) using bash on QNX?
…Stephen
Stephen Rasku <spr@shaw.ca> wrote:
In article <c0thnr$99q$> 1@inn.qnx.com> >, Marty Doane wrote:
pterm -l
–
Marty Doane
Siemens Dematic
The reason I want to do this is so I can use ssh-agent. I am used to using
X on Unix/Linux. In this case, I call ssh-agent from .login and all xterms
have access to the single ssh-agent so I can login any number of times
from different windows. I just have to ssh-add my passphrase just once.
If I use “pterm -l”, I will get a different ssh-agent version for every
window I start. Is it possible to have a global environment set by
.login (or some other method) using bash on QNX?
Here is my trick (.bash_profile). Hope it works for you. You can do
a check for $BASHPROFILE in .bashrc and source .bash_profile if it
hasn’t been set yet.
#################################################################
cdm’s custom .bash_profile
#################################################################
Set BASHPROFILE so .bashrc can run us if we have never been run.
export BASHPROFILE=1
export PATH=$PATH:/opt/bin:/opt/sbin:/sbin:/usr/sbin
export PATH=$HOME/bin:$PATH
Check for ssh-agent, start him if not found…
MYUID=id -u
AGENT=pidin -p ssh-agent user | grep $MYUID | awk '{print $1}'
if [ “x$AGENT” = “x” ]
then
eval ssh-agent
echo $SSH_AUTH_SOCK
else
export SSH_AUTH_SOCK=find /tmp -user $LOGNAME -iname "agent.*"
export SSH_AGENTPID=$AGENT
echo Existing Agent pid $AGENT
fi
Export any other env. variables we want exported.
export CVS_RSH=ssh
export PS1="\u@hostname
> "
Setup any aliases here…
alias ls=“ls -CF”
Bring in our .bashrc settings if they exist.
ENV=$HOME/.bashrc
if [ -e $ENV ]
then
source $ENV
fi
Thanks to everyone who replied. For some unknown reason, bash is now
reading the .login script properly.
…Stephen
I wrote:
Thanks to everyone who replied. For some unknown reason, bash is now
reading the .login script properly.
It turns out that the “unknown reason” is because I changed the shell
back to /bin/sh from /usr/bin/bash.
…Stephen
Stephen Rasku wrote:
I have just switched my user from using /bin/sh to using bash. However,
there seems to be a problem. It seems to ignore .login. I set a
variable in .login but it is not set when I start a terminal in Photon.
Am I not really logging into bash when I log into Photon?
I am using Photon QNX 6.2.0.
Having recently run into a similiar problem, I found it worked if I
logged in with text mode, then ran ph. If this is also true for you,
you can create ~/.ph/login/shells/bash and put a single line in it, like
this:
bash --login
I don’t know when they added this - you could check your docs for
phlogin and see if it is mentioned. If not, the later versions will
support this.
Rick…
–
Rick Duff Internet: rick@astranetwork.com
Astra Network URL: http://www.astranetwork.com
QNX Consulting and Custom Programming Phone: +1 (204) 997-NETW (6389)