The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Expired password doesn't prompt for change mark24p SUN Solaris 2 04-28-2008 01:15 PM
How to change prompt drogram UNIX for Dummies Questions & Answers 4 04-28-2008 08:48 AM
How can I change the behavior of the mouse in Terminal? TheChemist UNIX for Dummies Questions & Answers 0 03-03-2008 01:06 PM
Change Terminal Title here2learn SUN Solaris 8 11-21-2005 07:39 AM
script to change shell and prompt SHYAM Shell Programming and Scripting 1 06-27-2004 05:46 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 04-24-2008
Registered User
 

Join Date: Jan 2008
Posts: 183
How to change the system prompt and BG of terminal?

Hi all,

I was wondering how to change the PS1 to my liking?
I tried changing it using PS1='my choice'
it worked but the subsequent terminals i open will not have it as the default PS1 ,how do i change it?
also i am running as super user, and i need to exec bash, to get the bash environment...
So whenever i exec bash, i get the
"bash3.2#" system prompt....
How to change it permanently?


Other question is how to change the BG color of the terminal?is there a pkg available that does it or can it be done out of the box?
Again i want this to be permanent so that every time i open terminal i should get the changed BG and not the default one?

PS: am using solaris B-79a
Thanks
Reply With Quote
Forum Sponsor
  #2  
Old 04-24-2008
Registered User
 

Join Date: Dec 2007
Location: Paris
Posts: 487
Quote:
Originally Posted by wrapster View Post
I was wondering how to change the PS1 to my liking?
Set it in your .profile.
Quote:
also i am running as super user, and i need to exec bash, to get the bash environment...
So whenever i exec bash, i get the
"bash3.2#" system prompt....
How to change it permanently?
Set /usr/bin/bash as your shell. Or better, learn ksh and use it instead.
Quote:
Other question is how to change the BG color of the terminal?
Edit -> Current Profile -> Colors
Reply With Quote
  #3  
Old 04-24-2008
Registered User
 

Join Date: Jan 2008
Posts: 183
I was unable to open /usr/bin/bash...
I mean it was in unreadable format!!!.
and i was not able to figure out where to enter the PS to change to my liking in the .profile (i suppose you meant /etc/profile)(using bash)

So i tried this from the terminal...
export PS1='wrapster@home'
it works
but again its gone when i do exit...
and i will have to reset it to get it back...
(i want it to be displayed it as soon as the terminal is open, say something like a default))

Also its not reflected across terminals
do i have to keep doing export every time??

Also can you be a little descriptive as to where exactly i need to set the values in /etc/profile?
Reply With Quote
  #4  
Old 04-24-2008
Registered User
 

Join Date: Jul 2007
Posts: 9


Hi,

You can try this one. Edit your /etc/profile. Then put the lines below.

PS1=`hostname`:'$LOGNAME[$PWD]'
export PS1

Best regards,
sodapop

Reply With Quote
  #5  
Old 04-25-2008
Registered User
 

Join Date: Dec 2007
Location: Paris
Posts: 487
Quote:
Originally Posted by wrapster View Post
I was unable to open /usr/bin/bash...
I mean it was in unreadable format!!!.
Why do you want to try editing the bash binary ?
What you need is:
Code:
usermod -s /usr/bin/bash wrapster
usermod -s /usr/bin/bash root
Although logging in as root is a poor practice.
Quote:
and i was not able to figure out where to enter the PS to change to my liking in the .profile (i suppose you meant /etc/profile)(using bash)
It would work but apply to every user. By .profile, I meant $HOME/.profile
Quote:
Also can you be a little descriptive as to where exactly i need to set the values in /etc/profile?
Sodapop has it right.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0