Discussion:
How to install rxvt-unicode-256color termcap entry on machine without X
Gerard Lally
2014-05-29 14:17:31 UTC
Permalink
Hi,

I am trying to access a NetBSD 6.1.4 amd64 machine from a Slackware
machine, using the rxvt-unicode terminal, compiled with 256-color
support. I do not have X installed on the NetBSD machine, and I would
prefer to do without it if at all possible. Is there a way of installing
the terminfo or termcap entry for this terminal in the database?

I tried the command below, as recommended on the urxvt website, but I
still get an error:

REMOTE=myremoteserver.domain
infocmp rxvt-unicode | ssh $REMOTE "mkdir -p .terminfo && cat >/tmp/ti
&& tic /tmp/ti"

When running top I get the following error:

"top: no termcap entry for a `rxvt-unicode-256color' terminal"
--
Gerard Lally <***@netmail.ie>
atomicules
2014-05-29 22:48:03 UTC
Permalink
Hi Gerard,
Post by Gerard Lally
Is there a way of installing
the terminfo or termcap entry for this terminal in the database?
Not that I know of. I.e. I couldn't figure out a way to append to the
database:
http://atomicules.co.uk/2014/03/26/NetBSD-Terminfo.html

But... you can create a ~/.terminfo.cdb file that contains the
necessary info for the user of interest.
Post by Gerard Lally
I tried the command below, as recommended on the urxvt website, but I
REMOTE=myremoteserver.domain
infocmp rxvt-unicode | ssh $REMOTE "mkdir -p .terminfo && cat >/tmp/ti
&& tic /tmp/ti"
I imagine this wants to be something like:

infocmp rxvt-unicode | ssh $REMOTE "cat >~/.terminfo && tic
~/.terminfo"

(Must be someway to get rid of cat from there?)
Gerard Lally
2014-05-30 13:31:11 UTC
Permalink
Date: Thu, 29 May 2014 23:48:03 +0100
From: atomicules <***@atomicules.co.uk>

|> Hi Gerard,
|>
|> On 29-May-2014 15:17:31, Gerard Lally wrote:
|> >Is there a way of installing
|> >the terminfo or termcap entry for this terminal in the database?
|>
|> Not that I know of. I.e. I couldn't figure out a way to append to
|> the database:
|> http://atomicules.co.uk/2014/03/26/NetBSD-Terminfo.html
|>
|> But... you can create a ~/.terminfo.cdb file that contains the
|> necessary info for the user of interest.
|>
|> >I tried the command below, as recommended on the urxvt website, but I
|> >still get an error:
|> >
|> >REMOTE=myremoteserver.domain
|> >infocmp rxvt-unicode | ssh $REMOTE "mkdir -p .terminfo && cat >/tmp/ti
|> >&& tic /tmp/ti"
|>
|> I imagine this wants to be something like:
|>
|> infocmp rxvt-unicode | ssh $REMOTE "cat >~/.terminfo && tic
|> ~/.terminfo"
|>
|> (Must be someway to get rid of cat from there?)

Hi again, and thanks for your help. I spent some time trying this and
got no further. Pulling my hair out at this stage.

First of all I created a terminfo source file on the Slackware machine
with rxvt-unicode-256color installed:

infocmp -I rxvt-unicode-256color > rxvt-unicode-256color.terminfo

I copied this terminfo source file to my home directory in NetBSD and
ran tic on it:

tic -s rxvt-unicode-256color.terminfo.

This created a .terminfo directory in HOME, and a subdirectory r with a
single file in r called rxvt-unicode-256color. No cdb extension in other
words. But running tic on the source file seems to succeed: it reports
that it added 1 entry to the database.

When I connect to NetBSD using rxvt-unicode-256color (whose TERM
variable is rxvt-unicode-256color) I still get an error running top to
the effect that there is no termcap entry for rxvt-unicode-256color.

Very frustrating.
--
Gerard Lally <***@netmail.ie>
atomicules
2014-05-30 21:42:04 UTC
Permalink
Post by Gerard Lally
I copied this terminfo source file to my home directory in NetBSD and
tic -s rxvt-unicode-256color.terminfo.
This created a .terminfo directory in HOME, and a subdirectory r with a
single file in r called rxvt-unicode-256color. No cdb extension in other
words.
I'm stumped and confused. I don't understand how NetBSD could do that
(not create a database file; a file with the .cdb extension).
Post by Gerard Lally
DESCRIPTION
The tic utility compiles terminfo(5) source into a database for use by
other programs. The created database path name is the same as the source
but with .cdb appended.
The .terminfo directory and subdirecotry you describe is what I see on Arch
Linux, but not NetBSD.
Brett Lymn
2014-05-31 02:10:14 UTC
Permalink
Post by atomicules
Post by Gerard Lally
I copied this terminfo source file to my home directory in NetBSD and
tic -s rxvt-unicode-256color.terminfo.
This created a .terminfo directory in HOME, and a subdirectory r with a
single file in r called rxvt-unicode-256color. No cdb extension in other
words.
I'm stumped and confused. I don't understand how NetBSD could do that
(not create a database file; a file with the .cdb extension).
Post by Gerard Lally
DESCRIPTION
The tic utility compiles terminfo(5) source into a database for use by
other programs. The created database path name is the same as the source
but with .cdb appended.
The .terminfo directory and subdirecotry you describe is what I see on Arch
Linux, but not NetBSD.
Make sure you run the right tic - if you have ncurses installed due to
some package dependency you may be accidentally running the ncurses tic
which will produce the wrong results, try using /usr/bin/tic and see
what happens. This catches me out from time to time.
--
Brett Lymn
Staple Guns: because duct tape doesn't make that KerCHUNK sound - xkcd.com
Gerard Lally
2014-05-31 14:53:46 UTC
Permalink
Post by Brett Lymn
Post by atomicules
Post by Gerard Lally
I copied this terminfo source file to my home directory in NetBSD and
tic -s rxvt-unicode-256color.terminfo.
This created a .terminfo directory in HOME, and a subdirectory r with a
single file in r called rxvt-unicode-256color. No cdb extension in other
words.
I'm stumped and confused. I don't understand how NetBSD could do that
(not create a database file; a file with the .cdb extension).
Post by Gerard Lally
DESCRIPTION
The tic utility compiles terminfo(5) source into a database for use by
other programs. The created database path name is the same as the source
but with .cdb appended.
The .terminfo directory and subdirecotry you describe is what I see on Arch
Linux, but not NetBSD.
Make sure you run the right tic - if you have ncurses installed due to
some package dependency you may be accidentally running the ncurses tic
which will produce the wrong results, try using /usr/bin/tic and see
what happens. This catches me out from time to time.
Well I finally found a way around it, although it feels like a kludge,
but it's working now. There is only one tic by the way, in /usr/bin/tic.

I'll give a summary in case someone else stumbles over this issue.

Three machines:

remote = remote NetBSD without X11 (and therefore without rxvt-unicode)
local = local X11 client with rxvt-unicode terminal installed
(Slackware)
vm = temporary local NetBSD virtual machine with X11 and rxvt-unicode
installed

I installed NetBSD 6.1.4 with X11 on $vm, and installed rxvt-unicode on
that machine. Running "make install" created three files in the
doc/etc/ subdirectory of the working source directory. These three files
were:

rxvt-unicode.terminfo
rxvt-unicode.termcap
rxvt-unicode.terminfo.cdb.

I copied these files to $HOME on $remote, and logged in to $remote from
$local. Once again I ran tic on $remote:

$ tic -s rxvt-unicode.terminfo

But once again this failed to create a file with extension .cdb,
although it did report successfully adding 2 entries to the database,
creating ~/.terminfo and ~/.terminfo/r/, together with the two files
rxvt-unicode and rxvt-unicode-256color in ~/.terminfo/r/.

Once again "top" reported an error: "no termcap entry for
rxvt-unicode-256color."

Now this is where I returned to the tic(1) and terminfo(5) man pages on
$remote, but to my mind they are not clear here. terminfo(5) specifies
the file $HOME/.terminfo.cdb as the database which contains terminal
descriptions for personal use, but tic(1) doesn't seem to care, just
saying that "the created database path name is the same as the source
but with .cdb appended." I take that to mean "tic -s rxvt-unicode.terminfo"
should produce a file named rxvt-unicode.terminfo.cdb in $HOME. Needless
to say it doesn't.

At this point I took terminfo(5) literally and created $HOME/.terminfo.cdb
by renaming the rxvt-unicode.terminfo.cdb file I had copied from $vm.
Lo and behold that solved the problem straight away! "top" was happy,
although "tput" complained about an unknown terminal but I solved this
by logging in as root and running "tic -s /home/gerard/rxvt-unicode.terminfo",
which created these two files:

/usr/share/terminfo/r/rxvt-unicode.terminfo
/usr/share/terminfo/r/rxvt-unicode.terminfo-256color

Now tput was happy as well. Problem solved, in a most convoluted way!
I'm sure there must be an easier and less stressful way to solve this
but I don't have the knowledge or time to go into it too deeply. All I
want is a good terminal that works!

Thanks to you and atomicule for the help.
--
Gerard Lally
Gerard Lally
2014-05-31 20:17:06 UTC
Permalink
Post by Gerard Lally
Post by Brett Lymn
Post by atomicules
Post by Gerard Lally
I copied this terminfo source file to my home directory in NetBSD and
tic -s rxvt-unicode-256color.terminfo.
This created a .terminfo directory in HOME, and a subdirectory r with a
single file in r called rxvt-unicode-256color. No cdb extension in other
words.
I'm stumped and confused. I don't understand how NetBSD could do that
(not create a database file; a file with the .cdb extension).
Post by Gerard Lally
DESCRIPTION
The tic utility compiles terminfo(5) source into a database for use by
other programs. The created database path name is the same as the source
but with .cdb appended.
The .terminfo directory and subdirecotry you describe is what I see on Arch
Linux, but not NetBSD.
Make sure you run the right tic - if you have ncurses installed due to
some package dependency you may be accidentally running the ncurses tic
which will produce the wrong results, try using /usr/bin/tic and see
what happens. This catches me out from time to time.
Well I finally found a way around it, although it feels like a kludge,
but it's working now. There is only one tic by the way, in /usr/bin/tic.
I'll give a summary in case someone else stumbles over this issue.
remote = remote NetBSD without X11 (and therefore without rxvt-unicode)
local = local X11 client with rxvt-unicode terminal installed
(Slackware)
vm = temporary local NetBSD virtual machine with X11 and rxvt-unicode
installed
I installed NetBSD 6.1.4 with X11 on $vm, and installed rxvt-unicode on
that machine. Running "make install" created three files in the
doc/etc/ subdirectory of the working source directory. These three files
rxvt-unicode.terminfo
rxvt-unicode.termcap
rxvt-unicode.terminfo.cdb.
I copied these files to $HOME on $remote, and logged in to $remote from
$ tic -s rxvt-unicode.terminfo
But once again this failed to create a file with extension .cdb,
although it did report successfully adding 2 entries to the database,
creating ~/.terminfo and ~/.terminfo/r/, together with the two files
rxvt-unicode and rxvt-unicode-256color in ~/.terminfo/r/.
Once again "top" reported an error: "no termcap entry for
rxvt-unicode-256color."
Now this is where I returned to the tic(1) and terminfo(5) man pages on
$remote, but to my mind they are not clear here. terminfo(5) specifies
the file $HOME/.terminfo.cdb as the database which contains terminal
descriptions for personal use, but tic(1) doesn't seem to care, just
saying that "the created database path name is the same as the source
but with .cdb appended." I take that to mean "tic -s rxvt-unicode.terminfo"
should produce a file named rxvt-unicode.terminfo.cdb in $HOME. Needless
to say it doesn't.
At this point I took terminfo(5) literally and created $HOME/.terminfo.cdb
by renaming the rxvt-unicode.terminfo.cdb file I had copied from $vm.
Lo and behold that solved the problem straight away! "top" was happy,
although "tput" complained about an unknown terminal but I solved this
by logging in as root and running "tic -s /home/gerard/rxvt-unicode.terminfo",
/usr/share/terminfo/r/rxvt-unicode.terminfo
/usr/share/terminfo/r/rxvt-unicode.terminfo-256color
/usr/share/terminfo/r/rxvt-unicode
/usr/share/terminfo/r/rxvt-unicode-256color
--
Gerard Lally
Loading...