<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: changing command prompt dynamically in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761755#M259529</link>
    <description>Hi Shiv:&lt;BR /&gt;&lt;BR /&gt;You said, "I become root by typing "$pbrun ksh".  Shiv, unless you use 'su' to switch users and cause your profile to be sourced (read) you will need to provide substantially more information.&lt;BR /&gt;&lt;BR /&gt;First, I am assuming that you are using the standard Poxix shell.  Are you?  Otherwise, you will need to change the "$pbrun" object to assign "#" to the PS1 environmental variable and export it when run.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Wed, 29 Mar 2006 19:48:13 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2006-03-29T19:48:13Z</dc:date>
    <item>
      <title>changing command prompt dynamically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761751#M259525</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have put the below line in my .profile.&lt;BR /&gt;&lt;BR /&gt;export PS1="[`whoami`@`hostname`:`echo '$PWD'`]$ "&lt;BR /&gt;&lt;BR /&gt;When i become root user i want to change the dollar prompt to "#"&lt;BR /&gt;&lt;BR /&gt;Can someone suggest how to do it ?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shiv</description>
      <pubDate>Wed, 29 Mar 2006 19:14:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761751#M259525</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2006-03-29T19:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: changing command prompt dynamically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761752#M259526</link>
      <description>Hi Shiv,&lt;BR /&gt;I think i didnt understand correctly..&lt;BR /&gt;1. When you become root user your prompt will surely change from $ to #, isn't that happening right now for you.&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Mar 2006 19:20:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761752#M259526</guid>
      <dc:creator>Rajeev  Shukla</dc:creator>
      <dc:date>2006-03-29T19:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: changing command prompt dynamically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761753#M259527</link>
      <description>Hi Shiv:&lt;BR /&gt;&lt;BR /&gt;IF you 'su' from your login account to root and do:&lt;BR /&gt;&lt;BR /&gt;# su root&lt;BR /&gt;&lt;BR /&gt;...then 'root's profile is not read and you will not see any change in your PS1 prompt.&lt;BR /&gt;&lt;BR /&gt;If, on the otherhand you do:&lt;BR /&gt;&lt;BR /&gt;# su - root&lt;BR /&gt;&lt;BR /&gt;...then whatever the PS1 prompt is defined as in the '.profile' for 'root' is honored.  By default, this will be a "#".&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 29 Mar 2006 19:20:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761753#M259527</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-03-29T19:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: changing command prompt dynamically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761754#M259528</link>
      <description>Actually we are using powerbroker software to become privileged user (i.e. root user). I have changed my .profile as described in my first post. I become root by typing "$pbrun ksh" on the dollar prompt. Once i become root this dollar prompt remains the same. Once I become root, dollar prompt should become "#" automatically. &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shiv</description>
      <pubDate>Wed, 29 Mar 2006 19:41:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761754#M259528</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2006-03-29T19:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: changing command prompt dynamically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761755#M259529</link>
      <description>Hi Shiv:&lt;BR /&gt;&lt;BR /&gt;You said, "I become root by typing "$pbrun ksh".  Shiv, unless you use 'su' to switch users and cause your profile to be sourced (read) you will need to provide substantially more information.&lt;BR /&gt;&lt;BR /&gt;First, I am assuming that you are using the standard Poxix shell.  Are you?  Otherwise, you will need to change the "$pbrun" object to assign "#" to the PS1 environmental variable and export it when run.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 29 Mar 2006 19:48:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761755#M259529</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-03-29T19:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: changing command prompt dynamically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761756#M259530</link>
      <description>When i executed $env command as my normal login id it shows &lt;BR /&gt;"SHELL=/usr/bin/ksh". It means it is not posix shell. It has been set as korn shell. &lt;BR /&gt;&lt;BR /&gt;Whenever i am logged in as normal user the command prompt should show "[sksonkar@servername:/home/sksonkar]$" and when i become privilaged user by typing $pbrun ksh it should change to "[sksonkar@servername:/home/sksonkar]$".&lt;BR /&gt;&lt;BR /&gt;As i navigate to other directories the name of directory on the prompt should show the current one.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Shiv&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Mar 2006 20:04:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761756#M259530</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2006-03-29T20:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: changing command prompt dynamically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761757#M259531</link>
      <description>Hi Shiv:&lt;BR /&gt;&lt;BR /&gt;As I said, the only way that you are going to transition to being a "superuser" is to execute an 'su' command.&lt;BR /&gt;&lt;BR /&gt;I hope that there is only onle superuser (uid=0) on your server and that that is named "root" and has a default shell of '/sbin/sh' (the static Posix one!).&lt;BR /&gt;&lt;BR /&gt;It would help greatly if you would post the 'pbrun' source, assuming that it is a command text file of some sort and not a binary.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 29 Mar 2006 20:38:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761757#M259531</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-03-29T20:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: changing command prompt dynamically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761758#M259532</link>
      <description>A quick search on the Symark support site, &lt;A href="http://www.symark.com/powerbroker_faq.htm" target="_blank"&gt;http://www.symark.com/powerbroker_faq.htm&lt;/A&gt; revealed the following:&lt;BR /&gt;&lt;BR /&gt;Q. How do I control the PS1 prompt in a PB delegated shell? &lt;BR /&gt;A. You can control any environment variable from within a policy, i.e.&lt;BR /&gt;setenv("PS1", host +"($PWD) # "); &lt;BR /&gt;&lt;BR /&gt;Hope this helps...&lt;BR /&gt;--donovan</description>
      <pubDate>Mon, 03 Apr 2006 00:27:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/changing-command-prompt-dynamically/m-p/3761758#M259532</guid>
      <dc:creator>John Donovan</dc:creator>
      <dc:date>2006-04-03T00:27:45Z</dc:date>
    </item>
  </channel>
</rss>

