Colors on HPUX or ANY *nix that supports TERMINFO

171 views
Skip to first unread message

Zac Slade

unread,
Feb 24, 2011, 10:55:30 AM2/24/11
to Boyd Stephen Smith Jr., Joey Kavanaugh
The tools you need are a Linux box, tic and infocmp. Both tic and
infocmp are available in the terminfo package and they read, write and
compile terminfo files. On many modern Linux systems you can find
many terminfo types that support colors. In my example I converted
putty-256color and screen-256color (on HPUX the name gets truncated).

On your Linux box run the following to get the terminfo source file:
infocmp -I putty-256color > putty-256color.src

Now scp that file to the target *nix box.

Set up the target *nix system to use your own terminfo database by
exporting TERMINFO to a directory in your home dir. I chose
$HOME/.terminfo (which on linux is a default search location). In
your .profile just set TERMINFO=$HOME/.terminfo and source the file
again.

Now to install the new terminfo just run tic putty-256color.src which
will compile the source terminfo file and put it in your local
TERMINFO. Now you can set your TERM to putty-256color. Application
support is required to actually get the colors to display, but you can
validate it's working like so:

#uname -a
HP-UX <redacted> B.11.11 U 9000/800 137414660 unlimited-user license
#echo $TERM
xterm
#tput colors
-1
#echo $TERMINFO
/home/stab/sladez/.terminfo
#tic src/putty-256color.src
#export TERM=putty-256color
#tput colors
256

--
Zac Slade
krak...@gmail.com

Boyd Stephen Smith Jr.

unread,
Feb 24, 2011, 12:00:30 PM2/24/11
to Zac Slade, Joey Kavanaugh
On Thursday 24 February 2011 09:55:30 Zac Slade wrote:
> #uname -a
> HP-UX <redacted> B.11.11 U 9000/800 137414660 unlimited-user license
> #echo $TERM
> xterm
> #tput colors
> -1
> #echo $TERMINFO
> /home/stab/sladez/.terminfo
> #tic src/putty-256color.src
> #export TERM=putty-256color
> #tput colors
> 256

I got this far and I still don't get colors in vim. :(

From within vim,
:echo &t_Co
prints nothing, as opposed to the "256" is gives on various Linux systems.

The troublesome vim does have color support, if you hard-code certain terminal
strings in your .vimrc. :(
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
b...@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/

signature.asc

Thomas Black

unread,
Feb 24, 2011, 12:12:40 PM2/24/11
to nwa...@googlegroups.com
Nice tut, Zac.  Will try here.

Tom


--
You received this message because you are subscribed to the Google Groups "Northwest Arkansas Linux Users Group" group.
To post to this group, send email to nwa...@googlegroups.com.
To unsubscribe from this group, send email to nwalug+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nwalug?hl=en.


Reply all
Reply to author
Forward
0 new messages