LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-27-2010, 11:41 AM   #1
t1nm@n
Member
 
Registered: Aug 2009
Location: Trivandrum, Kerala, India.
Distribution: Slackware 14.2 x86_64
Posts: 96
Blog Entries: 3

Rep: Reputation: 25
PClinux OS konsole colours


hello i wanted to know how i can change the colours to the prompt

[ashish@localhost ~]$
this is how my prompt looks like i want to change it to red colour...like in bt and knoppix..

tell me how
 
Old 02-27-2010, 12:26 PM   #2
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
That doesn't depend on the distro and terminal application.

The prompt is stored as a bash environment variable and can contain ANSI escape codes to set how the terminal displays it.

This could help:

http://wiki.archlinux.org/index.php/Color_Bash_Prompt

And here is my bash prompt as an example:

Code:
PS1='\[\e[1;32m\][\A \u:\W]\$ \[\e[m\]' # Main prompt (Looks like this: [HH:MM username:pwd]$ )
PS2='\[\e[1;32m\]> \[\e[m\]' # Secondary prompt for multi-line commands
PS3='\[\e[1;32m\]#? \[\e[m\]' # Switch selector prompt
PS4='\[\e[1;32m\]$0:$LINENO+ \[\e[m\]' # Bash script debugging line number indicator

Last edited by MTK358; 02-27-2010 at 12:29 PM.
 
Old 02-27-2010, 01:16 PM   #3
penguiniator
Member
 
Registered: Feb 2004
Location: Olympia, WA
Distribution: SolydK
Posts: 442
Blog Entries: 3

Rep: Reputation: 60
Also, you can get more detail about this than you probably want at http://tldp.org/HOWTO/Bash-Prompt-HOWTO/.
 
Old 02-28-2010, 06:43 AM   #4
mjolnir
Member
 
Registered: Apr 2003
Posts: 748

Rep: Reputation: 82
One thing you might keep in mind is that the superuser terminal commonly uses a red prompt, I suppose as a warning, to keep one from inadvertently damaging the system.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Konsole always give SuperUser Konsole - can't get regular shell checkmate3001 Linux - Desktop 3 08-05-2008 11:00 AM
PClinux salah-ad-din Linux - Distributions 1 07-08-2006 08:26 PM
pclinux os khaleel5000 Linux - Software 4 01-30-2006 02:37 AM
Can I set ssh to change my konsole colours when I connect to a remote box? davee Linux - General 2 12-16-2004 03:56 PM
preserving konsole colours kazuni Linux - Newbie 2 06-03-2003 09:18 PM


All times are GMT -5. The time now is 12:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration