NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rxvt-unicode-9.15nb1 and irssi-0.8.15nb4 vs netbsd-5 curses

"John D. Baker" <> writes:


> Now that pkgsrc-2012Q1 has been branched, I'm getting around to updating
> my machines that run the "netbsd-5" branch.  One of the first packages
> I install is "x11/rxvt-unicode".  In previous pkgsrc branches, it was
> "rxvt-unicode-9.06nb2".  The latest branch updates to
> "rxvt-unicode-9.15nb1".
> The resulting executable 'urxvt' sets the TERM environment variable to
> "rxvt-unicode-256color".  Of course, utilities in the base system that
> use the curses library (particularly 'vi' and 'less') complain about an
> unknown or not-fully-functional terminal.
> Making a symbolic link ${HOME}/.termcap pointing to
>   /usr/pkg/share/examples/rxvt-unicode/rxvt-unicode.termcap
> lets 'less' and 'vi' work OK.
> I also install "chat/irssi".  In the past (rxvt-unicode-9.06nb2, default
> TERM=rxvt-unicode), 'irssi' could perform color highlighting on IRC
> events when run in 'urxvt'.  Now, with the rxvt-unicode-9.15nb1 version
> (even using TERM=rxvt-unicode), 'irssi' thinks the terminal is not
> color-capable, even with the local "~/.termcap" file (it otherwise
> works).
> If the 'urxvt' instance in which 'irssi' is to run sets TERM=rxvt (or
> TERM=xterm) or uses the "-tn rxvt" (or "-tn xterm") options, 'irssi'
> sees the terminal as color-capable (as "rxvt" and "xterm" are in the
> system default termcap file/database).
> If I make a hashed database with:
>   cap_mkdb -f ~/.termcap ~/.termcap
> (resulting in ~/.termcap.db), the behavior of 'irssi' is the same as
> above (considers it a non-color terminal).  Furthermore, all curses-using
> utilites will consult ONLY this database rather than fall back to the
> system termcap database.  Thus if "TERM=xterm" is set, curses-using
> utilities will fail with "Unknown terminal type: xterm".
> By contrast, on netbsd-6 and -current (which use a terminfo-type
> curses implementation), compiling a local "~/.terminfo.db" with:
>   tic -o ~/.terminfo \
>   /usr/pkg/share/examples/rxvt-unicode/rxvt-unicode.terminfo
> is sufficient to satisfy all curses-using utilities and 'irssi' sees
> the default "TERM=rxvt-unicode-256color" as a color-capable terminal.
> Is there any way to get 'irssi' to recognize the color capability of
> the new 'urxvt' on netbsd-5 without changing the reported TERM type?

This is weird, because other products like mc, emacs, ninja or even bash 
works with this TERM (after linking to ~/.termcap).
In irssi alone you can do 

/set term_force_colors on 

and you'll get colors.

You can include more files in termcap.db:

cap_mkdb -f ~/.termcap ~/.termcap /usr/share/misc/termcap

which will eliminate problem of missing terminals defs.

Or you could do upgrade to netbsd-6. ;-)

Daniel Horecki
BOFH since 1999.

Home | Main Index | Thread Index | Old Index