VT100 terminal and colour


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting VT100 terminal and colour
# 1  
Old 05-19-2005
Question VT100 terminal and colour

Good day all

I am looking for a way to change colours in a text file that get tailed.
I have tried using tput, however this does not seem to work. terminal type is using putty and vt100 emulation.

Any ideas. Smilie

Thanks

J
# 2  
Old 05-24-2005
You can use:
setterm -foreground ... | od -tc
to see control sequences for changing these attributes.

Regards
# 3  
Old 05-24-2005
thanks for the reply,. I forgot to mention that it is for a AIX system. setterm seems not to be available on this platform.

Regards
# 4  
Old 06-29-2006
additional question

I don't know if this is the right place for my post.
Could someone tell me how to put on and put off the colour in vi editor.
Also what is an AIX system
# 5  
Old 06-29-2006
I didn't understood what you wanted fully. If you want to change the display colors, look for DIR_COLORS or DIRCOLORS.xterm file in /etc. It defines the color mappings. Not sure if it exists in AIX.

Also, try echo -e "\033[30;47m" ( terminal command that changes colors. Its specific to terminal type)

mappings defined in my system(linux) are

# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white

echo -e "\033[05;30;47m Hello" causes text to blink and 04 causes text to be underlined as mentioned above. Hope this helps.
# 6  
Old 06-30-2006
I could not see colour when i am using the vi editor.

When i write in the vi editor some times for some srtings like "echo" ,"do", "exit","where" all these words come in the white clolour
Like
echo " Hello "
if [ $1 > $2 ]
do
echo " great "
exit.

And in some enviornments it won't be there.How to siwtch it on or off.
# 7  
Old 07-03-2006
Re: I could not see color while using vi

The terminal command that I mentioned works only when you are at the shell prompt and its also dependent on what terminal is being used. For vi color settings try:

:syntax on or :synatx enable( To enable command highlighting)
I think this is only a feature of vim, might not work with vi. So check first whether vi command on your system is actually an alias to vim or not.


For more information try:
: help syntax
or
http://www.faqs.org/docs/Linux-HOWTO...#window_colors
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Add a new user to a vt100 profile

Hello Team, I am trying to add a user a9acd012 and the user has to be added to two groups in unix and two groups in windows, Also i want to give the user vt100 profile when i create the user.Can anyone here help me with the command please.Thanks in advance. (1 Reply)
Discussion started by: Revathi2089
1 Replies

2. Shell Programming and Scripting

Colour code in shell script

Hello, I am trying to colour code a single word in whole line. Can you please help. I am able to colour code the whole line but not able to do only for single word Query) I want to echo below line and colur code red to word FAILED only. This server is FAILED in check. (2 Replies)
Discussion started by: saurabh84g
2 Replies

3. Shell Programming and Scripting

sed colour change

Hi, I am trying to write a script which will email a backup report from the server, The contents of the email will be: ---------------------- ---- -- ---- ----- ---- ------- ---- ------- ------- | | | | |Chnge|Wkng| | | | | | ... (6 Replies)
Discussion started by: Bdoydie
6 Replies

4. Programming

Cshell help with change colour in print

i want to ask how to change the colour of prompt message from use? and also how to change colour in printing........ i want to change it as blue colour and red colour, but i found many website still don't know how to do. how's the command is wrote? thz really!! (1 Reply)
Discussion started by: wendy1089
1 Replies

5. Shell Programming and Scripting

Changing text colour in bash

I am doing a basic script to check if services are disabled, and I was wondering how to change to colours for PASS and FAIL to green & red respectively. #!/usr/bin/bash clear TELNET=`svcs -a | grep telnet | awk '{print $1}'` if then RESULT=PASS else RESULT=FAIL fi... (3 Replies)
Discussion started by: detatchedd
3 Replies

6. HP-UX

hpux top colour

Hello, is there some way to change b/w colour of top command output in hpux B.11.31 ? (1 Reply)
Discussion started by: tonijel
1 Replies

7. Shell Programming and Scripting

random colour xterm alias

I used to have this but do not know where it went - a script or an alias that: opens a new xterm window with a random background colour. I have this off "the internets" : alias xterm1="xterm ... -bg \#* printf '%02x%02x%02x' {repeat 3 times $((RANDOM%128+128))}` &" this gives me an... (2 Replies)
Discussion started by: arcadia
2 Replies

8. Shell Programming and Scripting

ksh, font colour

hi all, how do i change the colour of text if i am using printf ?? in my script i am printing out response times from the server and i wanted to print out the max response time in red. ta. (1 Reply)
Discussion started by: cesarNZ
1 Replies

9. UNIX for Advanced & Expert Users

Changing Text Color Using VT100

Hi, I want to change the color of the text. Currently, I am using the following VT100 command, which changes the color of the foreground: <ESC>[{attr1};...;{attrn}m The problem is, when I change the color of the foreground, it changes the color of the text as expected, but it also... (4 Replies)
Discussion started by: Abed Alnaif
4 Replies
Login or Register to Ask a Question