Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TERM / termcap / terminfo & st from suckless tools

200 views
Skip to first unread message

Rob Paisley

unread,
Nov 21, 2013, 9:27:14 AM11/21/13
to
I use st 0.4.1 from st.suckless.org as my terminal. It assigns
TERM=st-256color. Accordingly I get errors running top / tmux as follows:

$ top
top: can't open termcap file

$ tmux
open terminal failed: can't find terminfo database

On Linux like systems, the solution is:

$ tic -s st.info
2 entries written to /home/rpaisley/.terminfo

which is run normally via make install. On FreeBSD 9.2-RELEASE with `pkg
install ncurses` yielding version 5.9_3, the output is as follows:

$ tic -s st.info
2 entries written to /usr/local/share/misc/terminfo.db

It didn't appear to have changed in size, so I ran the same command as root
and verified the file /usr/local/share/misc/terminfo.db did in fact change,
yet I still get the errors from above for both top / tmux.

My current work around is to manually set TERM=xterm-color.

I've tried various settings for TERMINFO / TERMCAP environment variables to no
avail. How do I get st-256color recognized as a valid terminal?
_______________________________________________
freebsd-...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"

Sean DuBois

unread,
Nov 21, 2013, 12:38:50 PM11/21/13
to
This might not be any help, but I have been setting termname to
xterm-256color in my config.h for as long as I have used st.
(the port allows you to pass in your config.h easily, so don't
download from suckless.org if you don't plan on patch/dev)

I have issues with working on remote machines when setting my TERM to
anything else. (I don't want to install st everywhere I go) this has
been the case for me on both GNU/Linux and FreeBSD

I use vim, emacs, mutt and ncmpcpp locally + remote in tmux and I have
not had any issues with my setup.

The only thing I have run into is issues with mutt, and to fix that use
slang instead of ncurses and set the env var CLICOLOR=yes

ill...@gmail.com

unread,
Nov 21, 2013, 12:54:15 PM11/21/13
to
Resorted to rxvt-256color, because, despite toe -a showing st-256color,
it simply doesn't work. (toe also dumps core, so there's that)
And:
> tic -c /usr/local/share/misc/terminfo.db
"/usr/local/share/misc/terminfo.db", line 18, col 1: Illegal character
(expected alphanumeric or @%&*!#) - '^C'

--
--

Thomas Dickey

unread,
Nov 21, 2013, 8:52:35 PM11/21/13
to
On Thu, Nov 21, 2013 at 11:38:50AM -0600, Sean DuBois wrote:
> This might not be any help, but I have been setting termname to
> xterm-256color in my config.h for as long as I have used st.

not a recommended solution, since st lacks features.
infocmp shows me ~130 differences between "simpleterm" and "xterm-256color".

ymmv

--
Thomas E. Dickey <dic...@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
signature.asc

Thomas Dickey

unread,
Nov 21, 2013, 8:54:42 PM11/21/13
to
On Thu, Nov 21, 2013 at 12:54:15PM -0500, ill...@gmail.com wrote:
> Resorted to rxvt-256color, because, despite toe -a showing st-256color,
> it simply doesn't work. (toe also dumps core, so there's that)

FreeBSD doesn't by default use terminfo.
It stores the bulk of its data in a different database.

> And:
> > tic -c /usr/local/share/misc/terminfo.db

tic processes text-files (the manpage says "source format").
terminfo.db is not a text file.

> "/usr/local/share/misc/terminfo.db", line 18, col 1: Illegal character
> (expected alphanumeric or @%&*!#) - '^C'

sounds about right.
signature.asc

Thomas Dickey

unread,
Nov 21, 2013, 9:02:01 PM11/21/13
to
On Thu, Nov 21, 2013 at 09:27:14AM -0500, Rob Paisley wrote:
> I use st 0.4.1 from st.suckless.org as my terminal. It assigns
> TERM=st-256color. Accordingly I get errors running top / tmux as follows:
>
> $ top
> top: can't open termcap file
>
> $ tmux
> open terminal failed: can't find terminfo database
>
> On Linux like systems, the solution is:
>
> $ tic -s st.info

actually, the file with st has a few errors in it (I saw some recent discussion
which hinted that its developers may get around to incorporating the fixes that
I made over the past few years.

> 2 entries written to /home/rpaisley/.terminfo
>
> which is run normally via make install. On FreeBSD 9.2-RELEASE with `pkg
> install ncurses` yielding version 5.9_3, the output is as follows:
>
> $ tic -s st.info
> 2 entries written to /usr/local/share/misc/terminfo.db
>
> It didn't appear to have changed in size, so I ran the same command as root
> and verified the file /usr/local/share/misc/terminfo.db did in fact change,
> yet I still get the errors from above for both top / tmux.

top's looking in termcap.db :-)

> My current work around is to manually set TERM=xterm-color.
>
> I've tried various settings for TERMINFO / TERMCAP environment variables to no
> avail. How do I get st-256color recognized as a valid terminal?

"man 5 termcap" mentions cap_mkdb, which is a good place to start reading
signature.asc
0 new messages