Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A custom terminfo to restore 10.2 Terminal behavior' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A custom terminfo to restore 10.2 Terminal behavior
Authored by: jpf on Dec 29, '04 12:25:39PM
d1taylor wrote:
*phew* that's a long, difficult solution. My alternative is to just add

TERM=ansi

to my .bashrc file in my home directory. :-)

sorry for the excessive verbosity ... had i chosen to be even more long-winded, you would have been able to read, had you chosen to do so, that TERM=ansi was one of those "less than optimal" solutions. biggest problem with ansi is that it doesn't have decent support for syntax coloring in vim. the other hint robg mentioned in his editorial comment also contains a good deal of interesting information. if i'd found it earlier, i might not have even written my hint, although mine does solve all my problems (which of course may not be yours) ...

in answer to capn hector, there is some evidence that some programs can look for and use a TERMINFO environment variable, or will pay attention to terminfo entries in a ".terminfo" directory in your home directory, but i wasn't able to achieve anything useful by playing around with those things. it seems to me that probably Terminal is not one of those that bothers checking ... i seem to recall scrolling through the output of strings having been run on the Terminal executable, and not seeing anything that would indicate its support for such a feature. unfortunately, we are thus pretty much stuck with having to put stuff in /usr/share/terminfo.

one thing that may help there is to just keep all your custom stuff somewhere under ~/, and then just symlink to that from the "real" locations. at least that way, only the links will get overwritten by system updates and installs, and you won't lose your custom stuff, although you'll of course have to recreate the links.

in another hint/thread somewhere, i have a link to my "checklist" of custom stuff that i have to redo every time a new system dot-release comes out. it's a couple pages long, full of stuff i'd forget to do if i didn't have it written down.

[ Reply to This | # ]

A custom terminfo to restore 10.2 Terminal behavior
Authored by: blm on Dec 29, '04 03:22:29PM

Thanks jpf for the hint. A couple comments on the hint and your followup:

There's no reason to expect Terminal to do anything with terminfo stuff, it's programs started in the Terminal session that use the curses and/or terminfo libraries which use the compiled terminfo files.

~/.terminfo does work for me. You have to duplicate the directory structure, so just putting xterm-color in ~/.terminfo isn't enough, you have to make a 78 directory then put xterm-color in that. Once I do that, I see the new behavior, and if I rename the directory, I see the old behavior.

Setting TERMINFO to the directory path also works for me, so if you want to share the terminfo entry among accounts you can make a directory some shared placed and set TERMINFO in the appropriate place(s).

For those interested, man curses describes all the places compiled terminfo files can be placed. There's a bunch of them, although I suspect ~/.terminfo or TERMINFO are sufficient for most people.



[ Reply to This | # ]