- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Korn shell
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 02:57 AM
09-15-2003 02:57 AM
I wanted to change the korn shell prompt but nothing happens when i changed the variable ps1 in the file /etc/profile !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:02 AM
09-15-2003 03:02 AM
SolutionIf you're running CDE, this is what we do to force the sourcing of profiles: in ~/.dtprofile:
DTSOURCEPROFILE=true
. /etc/profile;
. $HOME/.profile;
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:03 AM
09-15-2003 03:03 AM
Re: Korn shell
Check permissions on /etc/profile. ownership should be bin:bin with read access to all.
Put PS1='You stuff Here' and it will work.
/etc/profile is for ksh, sh
for csh /etc/csh.login is executed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:04 AM
09-15-2003 03:04 AM
Re: Korn shell
PS1='boo> '
But it may be overridden by a users .profile in their home directory as /etc/profile is run before $HOME/.profile - so normally PS1 is set in $HOME/.profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:04 AM
09-15-2003 03:04 AM
Re: Korn shell
Are you should you are changing "PS1" and not "ps1".
Also, you need to make sure you export it. As an example, try
export PS1="[ $(whoami)@$(hostname) \$PWD ] \$SIGN "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:05 AM
09-15-2003 03:05 AM
Re: Korn shell
Its a normal practice to set PS1 in users profile.
If you are connecting through an X-emulator uncomment DTSOURCEPROFILE at the end of the .dtprofile.
can you post your PS1?
HTH,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:05 AM
09-15-2003 03:05 AM
Re: Korn shell
2) Try giving . ./.profile in the /etc dir
cd /etc
dot space dot/dot profie
are you seeing any error message there?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:08 AM
09-15-2003 03:08 AM
Re: Korn shell
HOST=$(uname -n)
export HOST
PS1='$HOST:$PWD $ '
These are the entries in /etc/profile !
I want to change the prompt for everyone, so I added it in /etc/profile !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:11 AM
09-15-2003 03:11 AM
Re: Korn shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:12 AM
09-15-2003 03:12 AM
Re: Korn shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:13 AM
09-15-2003 03:13 AM
Re: Korn shell
It should work. It works for me. Mark has got it. Did you export PS1?
HTH,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:13 AM
09-15-2003 03:13 AM
Re: Korn shell
Error myself !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:19 AM
09-15-2003 03:19 AM
Re: Korn shell
I added the export ps1, but nothing happened !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:21 AM
09-15-2003 03:21 AM
Re: Korn shell
export PS1
not
export ps1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:22 AM
09-15-2003 03:22 AM
Re: Korn shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 03:31 AM
09-15-2003 03:31 AM
Re: Korn shell
Could you just confirm that with your exported PS1 in /etc/profile and after logging out and logging in again, it still doesn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 04:58 AM
09-15-2003 04:58 AM
Re: Korn shell
When I execute the script /etc/profile manually the last line entry is "logout" ?
I don??t know why ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 04:58 AM
09-15-2003 04:58 AM
Re: Korn shell
When I execute the script /etc/profile manually the last line entry is "logout" ?
I don??t know why ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 05:02 AM
09-15-2003 05:02 AM
Re: Korn shell
If you do "su" then it also will not be run (you need to do su -). Having "logout" as the last line of /etc/profile is weird but not completely idiotic if, for example, you want all your users to run a specific application and then logout when they have finished (you'd need to stop root having the same problem though of course).
I think you are going to have to explain a little more about how you are logging in and perhaps post your
/etc/profile and .profile files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 05:11 AM
09-15-2003 05:11 AM
Re: Korn shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 05:17 AM
09-15-2003 05:17 AM
Re: Korn shell
Alternatively, just to check everything is OK, run
"xterm -ls" to get a log in shell that does source the two files, or even simpler, just run su - yourlogin. But, you will need to edit .dtprofile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 05:21 AM
09-15-2003 05:21 AM
Re: Korn shell
I'll repeat:
If you're running CDE (which you appear to be doing), this is what we do to force the sourcing of profiles: place the following in ~/.dtprofile:
DTSOURCEPROFILE=true
. /etc/profile;
. $HOME/.profile;
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 05:32 AM
09-15-2003 05:32 AM
Re: Korn shell
I have said before that the last word of the script is "logout" !
The scripts works now, but now I have the loout problem !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 05:40 AM
09-15-2003 05:40 AM
Re: Korn shell
So the last line in /etc/profile is "logout"? Maybe you could post (or attach) your /etc/profile, or explaing how you're expecting for this to work? With the "logout" line, I would expect that users would be automatically launching an application (what application?) at login time and logging directly out when they exit that application.
Can you supply more details?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2003 05:42 AM
09-15-2003 05:42 AM
Re: Korn shell
Thanks !!!!!!!!!!!!!!!!
The logout was invoked by the script .profile
see: set -u
trap echo 'logout root'