Operating System - HP-UX
1826489 Members
3859 Online
109692 Solutions
New Discussion

Reg:Changes to .profile file

 
Chandrasekar_2
Occasional Advisor

Reg:Changes to .profile file

Hi everyone
Iam newbie to HP-UX. Ihave HP-UX 10.2 installed in my system with CDE. I was trying to change the path in my .profile. The changes doesnt show up .Iam not sure why this happens.
Is it different for CDE environment. Please let me know. Thanks
regards
chandrasekar
7 REPLIES 7
Rita C Workman
Honored Contributor

Re: Reg:Changes to .profile file

Here's a couple quick thoughts..

First did you 'save' the file.
wq!

Second if your logged in already and change your .profile did you remember to either recyle your profile -OR- log out and log back in; so you now 'see' the changes have taken effect.

Just a quick thought,
Rita
harry d brown jr
Honored Contributor

Re: Reg:Changes to .profile file


Finally, personal environment variables can be set on a per-user basis in the script file $HOME/.dtprofile.

from the "man dtlogin"


live free or die
harry
Live Free or Die
Sanjay_6
Honored Contributor

Re: Reg:Changes to .profile file

Hi,

CDE uses $HOME/.dtprofile to set up the environment for CDE.

Hope this helps.

Regds


Sanjay_6
Honored Contributor

Re: Reg:Changes to .profile file

Hi,

I think you already know this, but let me just remond you that any modification to .profile is sourced if you login again. You have to logout and login to see the .profile changes.

Here is a link fron itrc on how you can source yopur .profile when using CDE,

http://us-support3.external.hp.com/cki/bin/doc.pl/sid=7f577eb00994cf1811/screen=ckiDisplayDocument?docId=200000057991582

Hope this helps.

Regds
A. Clay Stephenson
Acclaimed Contributor

Re: Reg:Changes to .profile file

Hi:

You need to edit .dtprofile in your home directory and set DTSOURCEPROFILE=true. Dtlogin will then source your .dtprofile first and then source your .profile.
If it ain't broke, I can fix that.
Steve Steel
Honored Contributor

Re: Reg:Changes to .profile file

Hi

You can do it another way by either

a)System-wide basis, by creating sys.resources (chmod 644) in /etc/dt/config/C/ containing: *loginShell: True

b)Per-user basis, create a $HOME/.Xdefaults containing:
*loginShell: True

Changes will take effect at the next login to CDE.


c)If the same environment is needed for any terminal window run on the system (even those started outside a CDE session) then this resource line:
*loginShell: True
can be added to the app-defaults files for the terminal window applications. Located in:
/usr/lib/X11/app-defaults/HPterm
(create it if it does not exist)
/usr/lib/X11/app-defaults/xterm
/etc/dt/app-defaults/$LANG/Dtterm
(where $LANG=C if US-English is the default system language, the app-defaults/C directory may not exist by default on the system.

Create them and copy the Dtterm file from /usr/dt/app-defaults/C if that is the case).

The "*loginShell" resource will configure the terminal emulators (dtterm, hpterm, xterm) to behave in the same way as telnet or rlogin to the system.
Thus the default sequence of reading /etc/profile,.profile etc. will occur each time a terminal window is opened. The environment in the shell window will thus NOT be the same as that of the CDE session (dtsession).


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Peter Kloetgen
Esteemed Contributor

Re: Reg:Changes to .profile file

Hi,

when you are logging in with CDE, several configuration files are read:

/etc/profile
/$HOME/.dtprofile
/$HOME/.profile
/$HOME/.shrc (if you use korn- or POSIX-shell)

Remember one thing:

Your .profile is only read, if you uncomment the last line in your .dtprofile!

#DTSOURCEPROFILE=true

remove the #, this will do it for you!

Remember also, that .profile and .dtprofile are only read when logging in, .shrc is read every time you open a new shell.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping