phyver / GameShell

a game to learn (or teach) how to use standard commands in a Unix shell
GNU General Public License v3.0
2.13k stars 135 forks source link

Problems running GameShell with tmux #86

Closed ffaf1 closed 2 years ago

ffaf1 commented 2 years ago

WARNING: terminal is not fully functional

and

Press Enter to continue.'screen-it': unknown terminal type.

But terminfo file is present

f@mkiii:~/download/GameShell$ ls  ~/.terminfo/s/screen-it
/home/f/.terminfo/s/screen-it
phyver commented 2 years ago

Is there a reason you don't use TERM=tmux or TERM=tmux-256color?

If your system is really old and doesn't have those terminfo entries, you could try running GameShell with TERM=screen:

$ TERM=screen bash gameshell.sh

(It works for me.)

Note: like those for screen, official terminfo entries for tmux don't have italics. I don't thinks that a problem when running GameShell, but you might want to generate your own entry from the official one to add italics if you want it. (see for example https://herrbischoff.com/2020/08/how-to-enable-italics-in-tmux/)

Note2: I have the same problem if I use my own screen-it entry. (I still have it from the old days.) Something must happen with GameShell, as running plain bash in tmux with screen-it works fine, but running GameShell doesn't (less, or even clear don't work). I'll try to find where the problem is coming from, but that's not high in my TODO list!

phyver commented 2 years ago

Fixing #116 put me on the right track: the user terminfo database is found in ~/.terminfo by defaul. Since GameShell redefines $HOME, the database isn't found.

I'll look into it to see if (re)defining TERMINFO is reasonnable for GameShell, but a fix is to start GameShell with

    $ TERMINFO=$HOME/.terminfo bash ./gameshell.sh
phyver commented 2 years ago

fixed by fa667de4