LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-09-2008, 01:16 PM   #1
jpanski
LQ Newbie
 
Registered: Jan 2008
Posts: 2

Rep: Reputation: 0
Constantly changing text color on the console


Hey..this is my first post here, and i'm a total linux noob, but I was wondering if there was any way to make the text color in my linux console to constantly change ever time i type a new command.

Basically my main goal is to be able to clearly differentiate output between commands by having each one output in a different (random) color. Thank you in advance!
 
Old 01-09-2008, 02:12 PM   #2
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
The bash prompt gets it's display style from the PS1 variable. I set my PS1 variable in my .bashrc file, which is only read upon starting the console session.

I suppose you'd need to create a script that rewrites the PS1 variable with new random color values, then somehow get bash to execute that script after every command you enter.
 
Old 01-09-2008, 03:35 PM   #3
jpanski
LQ Newbie
 
Registered: Jan 2008
Posts: 2

Original Poster
Rep: Reputation: 0
i'm retarded

Last edited by jpanski; 01-09-2008 at 03:38 PM. Reason: i didn't fully read the man pages: rtfm for me
 
  


Reply

Tags
color, console, text


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
Meaning of text color in the console? (ls output for example) EtherGhost Linux - General 3 12-31-2006 01:59 AM
Console Text Color Change Mercurius Slackware 6 05-16-2006 08:35 AM
How to get a color text console? dejavu_01 Debian 1 08-30-2005 12:38 PM
Changing text color in C++ Brakki Programming 3 04-21-2004 05:24 PM
changing console color? Wilson Linux - General 14 05-25-2003 10:29 PM


All times are GMT -5. The time now is 08:34 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration