Solved

Coloring AIX console

Posted on 2014-09-11
6
915 Views
Last Modified: 2014-09-30
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
0
Comment
Question by:Ramu Shetty
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 20

Expert Comment

by:carlmd
ID: 40319659
Do you really mean the system console or just your device?

Is you console configured as CDE?
0
 

Author Comment

by:Ramu Shetty
ID: 40319785
When I say Console, Its the putty session I am using to connect to an AIX server.
0
 
LVL 20

Expert Comment

by:carlmd
ID: 40322784
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Ramu Shetty
ID: 40323413
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
 
LVL 20

Accepted Solution

by:
carlmd earned 500 total points
ID: 40325195
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
 
LVL 9

Expert Comment

by:Carlos Ijalba
ID: 40345591
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

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Intel fortran compiler (ifort) 5 81
Windows 10 linux VM 30 91
AWS Linux EC2 question on group 7 85
Issue when using 'yum update' 4 22
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question