Operating System - HP-UX
1832903 Members
3017 Online
110048 Solutions
New Discussion

where to change the default prompt when logging in with CDE

 
Lane Frazier_1
Occasional Contributor

where to change the default prompt when logging in with CDE

Hello everyone,

I'm running HP-UX 11.0 with CDE. Every user on my system is using the Bourne
shell ($ prompt).

I would like to know where to place the PS1=
parameter so that a user can see who he is logged in as and what directory they
are in.

My main concern is with CDE...I do not know where to place the PS1 parameter..
Currently, it is not in .dtprofile ( I have DTSOURCEPROFILE=TRUE uncommented)
and it is not in etc/profile

Pardon the simple question...I've found this whole CDE issue very hard to
understand and I'm afraid of messing up my CDE login. I'd hate to make a
"simple coesmetic change" and not be able to log back in.

Thanks in advance for your help
7 REPLIES 7
David Rodman_2
Occasional Advisor

Re: where to change the default prompt when logging in with CDE

read the man page - sh-bourne
There is a section on invocation and the /etc/profile.
Sriram Nadiminti
Occasional Advisor

Re: where to change the default prompt when logging in with CDE

You can put these two lines in your .profile

NODE="uname -n"
export PS1='$NODE $PWD ##'

The ## is my favourite.. You can put any character.

Good luck
Alex Glennie
Honored Contributor

Re: where to change the default prompt when logging in with CDE

Just one point, although the .profile is the correct place to put the PS entries : I suspect the various clients such as hp,x and dt terms will only pick these up if you set up the resource *loginShell = True, see man page or run -ls command line option to check.

To set on a per user basis : cd $HOME, vi .Xdefaults
HPterm*loginShell, exit and out CDE and then login back into to review the changes.
FAZULY MUSTAFFA
New Member

Re: where to change the default prompt when logging in with CDE

What u can try is to place the PS1 parameter into the .kshrc file. VI the .profile to put the ENV=.kshrc and export the ENV

Try it and see.
Gavin Hale
New Member

Re: where to change the default prompt when logging in with CDE

$HOME/.dtprofile is the file which can be used to export environment variables to all CDE subprocesses.
P V Patel
Advisor

Re: where to change the default prompt when logging in with CDE

Hi,
You will add followind line in .profile file in home directory of user.
export PS1="`uname -n`:`pwd`>"
Regards.
Punjabhai V Patel
Punjabhai
Insu Kim
Honored Contributor

Re: where to change the default prompt when logging in with CDE

Please put those thing in $HOME/.dtprofile.

In the case that you can't find that file in users home directory, just copy /.dtprofile to users directories and modify it.
Never say "no" first.