1832649 Members
3002 Online
110043 Solutions
New Discussion

Re: always read .profile

 
SOLVED
Go to solution
Phillip Popp
Regular Advisor

always read .profile

Hi,
I a running hp 10.2. My .profile will not seem to update. i can make a simple change, log out and log back in, but the change does not take effect. I know I am still missing something. What file do I need to have my profile read everytime I log in?

New to HP and could sure use the help.

Thanks,

Phil
12 REPLIES 12
Pete Randall
Outstanding Contributor

Re: always read .profile

Phil,

How are you logging in and what are you logging in to? By that, I mean are you logging into CDE? If so, your .profile may, indeed, not be read, but that is easily fixed.


Pete

Pete
Chan 007
Honored Contributor

Re: always read .profile

Phil,

Check you permissions for .profile.

If you have problem, then after login, try this

#/home/phil/. /.profile

oNly temp messure

If you are doing a global change for all then you have to change it in /etc/profile

Chan
Phillip Popp
Regular Advisor

Re: always read .profile

Either if I log into a cde enviroment or if I just telnet into the hp location, neither way reads my profile.

Thanks,

Phil
baiju_3
Esteemed Contributor

Re: always read .profile

Hi Phil ,

Please tell which shell you are using .

can you post

grep uername /etc/passwd

o/p to ITRC .


Thanks ,
bl .


Good things Just Got better (Plz,not stolen from advertisement -:) )
Phillip Popp
Regular Advisor

Re: always read .profile

bin/sh so I guess the bourne shell
Pete Randall
Outstanding Contributor

Re: always read .profile

No, that's the Posix shell.

When logging into CDE, it reads .dtprofile. Take a look at it - there are instructions inside that tell you how to make it read .profile.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: always read .profile

Hi Phil:

Perchance did you declare a new variable in your profile; assign a value to it; but forget to export it so scripts you spawn don't see the variable?

Regards!

...JRF...
Phillip Popp
Regular Advisor

Re: always read .profile

Yes the DTSOURCEPROFILE is commented out and is set to true. It should read the .profile. I am checking to see if it read the profile, by putting an alias in. I had this problem before, and it was a small fix, I just can't remember it.
Bharat Katkar
Honored Contributor

Re: always read .profile

Hi phil,
When any user logs in to the system two profile files are read.
1. /etc/profile "System wide profile"
2. $HOME/.profile "User specific profile"

As already suggest you can check the permission of the profile files, their Owner and Group.

Regards,

You need to know a lot to actually know how little you know
Phillip Popp
Regular Advisor

Re: always read .profile

Hi,
I called the guy who made the change for me origionally. He added a file Xdefaults.
one line *LoginShell: True

That worked, but I am not sure why. now whenever I login to the system, it see's my profile changes.

Does this make sense to anyone?

Thanks,

Phil
Bill Hassell
Honored Contributor
Solution

Re: always read .profile

Absolutely normal (but not intuiotive at all). Xwindows, specifically, CDE and the tools it uses like xterm, hpterm and dtterm default to *NOT* login normally but bypass /etc/profile and .profile completely. I consider the steps to be mandatory for any login that starts a shell. After all, /etc/profile is managed by the sysadmin and is expected to set a 'normal' environment.

Anyways, the .Xdefaults file tells the remote system (remember, your PC isn't doing anything but acting as a display device) to set these Xwindow environment values. In this case, xterm would be told to perform a *normal* login if the resource was "Xterm^loginShell=true", but if you leave off the xterm part, "*loginShell=true" now applies to all Xwindow processes started by this user (meaning hpterm, xterm and dtterm).

So there is a huge difference between typing telnet in a DOS/command window on your PC and clicking on a CDE icon. The PC's plain old telnet will login normally while the CDE icons and Xwindow programs have very different characteristics. Not that they can't be changed -- it's just unexpected.


Bill Hassell, sysadmin
Muthukumar_5
Honored Contributor

Re: always read .profile

when you do telnet login it will automatically go through like,

1) login process
2) /etc/profile
3) $HOME/.profile

to login shell.

When you do CDE login you must have a setting to read .profile file from the setting of *LoginShell: true.

To lookup .profile with dtlogin then DTSOURCEPROFILE=1 has to be set.

--
Muthu

Easy to suggest when don't know about the problem!