Operating System - HP-UX
1847251 Members
3175 Online
110263 Solutions
New Discussion

Colors within terminal app on HP-UX 11i

 
SOLVED
Go to solution
UNIX GruppeHDI
New Member

Colors within terminal app on HP-UX 11i

Hi,

I'm using putty to connect to an HP-UX 11i server and then start vim with syntax highlighting. I just get different sort of grey and underlined characters. So, how do define a TERMINFO/TERM to get real colors displayed?
I've already tried a bit with different tic files and tic_colr etc. ...

Bye,
Udo.
3 REPLIES 3
Mark Grant
Honored Contributor

Re: Colors within terminal app on HP-UX 11i

Normally, you play with the terminfo values but if you have done that and are convinced that it's ok, you could try and make sure that "stty -a" shows you "cs8" and if not set it. I seem to have some long lost memory about colour and setting this but could be way off base.
Never preceed any demonstration with anything more predictive than "watch this"
Bill Hassell
Honored Contributor
Solution

Re: Colors within terminal app on HP-UX 11i

You'll need to identify exactly what terminal putty is trying to emulate and see whether the ttytype -s command idetifies it correctly. This is a combination of terminal emulation (can the putty program display any colors at all?), and if so, can putty be configured to handle different terminfo parameters with different colors (ie, bold=blue, dim=yellow, etc), and if so, change the map in putty. vim (as far as I know) is using the Curses library (and hopefully does not have hardcoded escape sequences internally). For instance, try this little snippet to show the different character enhancements:

eval $(ttytype -s)
echo "ttytype says this is a $TERM"
HB=$(/usr/bin/tput dim) # dim text
HV=$(/usr/bin/tput smso) # 1/2 bright inverse
IV=$(/usr/bin/tput bold) # inverse
UL=$(/usr/bin/tput smul) # underline
BL=$(/usr/bin/tput blink) # blink
echo "Normal $IV Inverse $HB Dim $BL Blink $HV halfbrite $UL underline"

The problem with terminals (and emulators like putty) is that there are so many of them. The good news is that hundreds (about 1800 different models) are included in /usr/lib/terminfo/* so dig out the putty manual to see how video enhancements and colors are handled. The terminfo man page gives some good info about colors too. Look for: Color Manipulation in the man page.


Bill Hassell, sysadmin
UNIX GruppeHDI
New Member

Re: Colors within terminal app on HP-UX 11i

Thanx for the help. It improved my understanding of term/terminfo/termlib etc.
putty is capabale of displaying colors - tested with a script changing colors by means of escape sequences. Finally, I was vim's "problem". So, I had to configure vim to use escape sequences.

Bye,
Udo.