nsf / termbox

Library for writing text-based user interfaces
http://code.google.com/p/termbox
MIT License
1.96k stars 185 forks source link

Termbox does not start in LXC #106

Closed edurenye closed 6 years ago

edurenye commented 6 years ago

Termbox does not start in LXC with a TurnKeyLinux container, it gives the following error: consoleui failed: Failed to initialize terminal: termbox: error while reading terminfo data: termbox: unsupported terminal I connect throughout ssh and it works like a charm.

nsf commented 6 years ago

Termbox uses TERM environment variable to init for the right terminal. Termbox has a built-in database with commonly used terminals such as xterm, urxvt and few others. Also it support reading terminfo database which you need to install. It usually comes with ncurses packages. But you can play with TERM variable and see if your terminal is xterm compatible or not. E.g. TERM=xterm ./yourapp.

edurenye commented 6 years ago

Ok, so the problem is that LXC sets the $TERM variable to 'vt' + the id of the virtual container, when it is using bash actually. So this issue can be closed. Thank you!