Coloring AIX console

I am planning to color up my text and background on a AIX console and would like to permanently add it to my .profile in the home directory.

I have searched some post on EE, I found a solution and I was trying to implement #25899388/#25920311 but for some reason its not working. I have both ksh versions. But for now I am using KSH

To color the text yellow, I tried ..

color=$(tput colf3); nocolor=$(tput sgr 0); export PS1='${color}[$PWD]>${nocolor}'

1. Can you please help if I need to do something else.
2. I would also like to know how to change the background color also..

Thank you
Ramu ShettyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

carlmdCommented:
Do you really mean the system console or just your device?

Is you console configured as CDE?
0
Ramu ShettyAuthor Commented:
When I say Console, Its the putty session I am using to connect to an AIX server.
0
carlmdCommented:
The tput sequences you define are dependent upon what is defined in the tic file for the terminal type you have set for your session.

From your putty session please type:

echo $TERM

and post the result.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Ramu ShettyAuthor Commented:
Here are the results

$ echo $TERM
vt100

So can you please let me know where should i update the tic file and what should i update with..??
0
carlmdCommented:
The tic files are located In /usr/lib/terminfo. Their are two parts, a source version and a compiled version.

For a vt100 you "might" have the source in the above directory as vt100, but more likely under the name dec.ti. Note that  the compiled versions are in the sub directory "v". You won't be touching those directly.

Assuming you have the dec.ti, it is a text file that you can edit with vi or any other editor you use. I suggest you make a backup copy of this file before you do anything to it. Alternately, create a new terminal type (say vt100me) in a new file by that name, then extract what you need and put it in that file.

The programming in these files is a language into itself. For info on that look at:

http://tldp.org/HOWTO/Text-Terminal-HOWTO-16.html
http://www.delorie.com/gnu/docs/termcap/termcap_toc.html

To get you started, edit the dec.ti file and you will find numerous comments and variations of the vt100 definition. You should first read through these to see if one of them will already do what you want. Typically a vt100 does not have color, so you might want to look at a vt200 and above for examples of color settings. For example the vt240 for background colors.

If you start by making your own terminal type instead of editing the dec.ti, then you can work on this without worrying about it causing problems for anyone else on your system using a vt100 terminal type.

Once you have created your new file (or edited the dec.ti), you will need to compile it before you can use it. To do this you simply type "tic vt100me". This will now produce a new terminal type for you to use. To test with this, after you login with putty you can type at the command prompt "TERM=vt100me" and you will them be using your file.

Please not that I suggest you put everything you need/want in the new tic file so that you avoid having to type tput sequences.

Hope this helps. Let me know if you have questions.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Carlos IjalbaSenior SysadminCommented:
Sriveena,

"When I say Console, Its the putty session I am using to connect to an AIX server."

What you really want to do is just chage the colors in your PuTTY session definition, and that way you can define different sessions to the same server, but using different color schemes, ie: you can have one to read logs, another to program scripts, etc.

This is done from within PuTTY itself:

Select your saved session name from the Saved Sessions left pane and click Load,
expand the Window entry on the left and select  Colours
now you can change the Default Foreground, and Default Background, for example to create a "whitepaper" feel try Foreground 0 (black) and Background 255 (white)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.