We are using a text based program through SSH. The session is started with a login script, which does a bit of setup then starts the program without a shell. It works well in putty. We are trying to use it with a mobile SSH client, like termius.
The problem is that the xHarbour program recognizes terminal changes like rotating the screen or closing the keyboard. So if the terminal is resized the xHarbour program knows about it and changes the console size.
With stty x rows y columns
I can set the initial terminal size.
I tried putting these commands in the init script before the program starts, but if the screen size changes on the client side (closing the keyboard, rotating screen) it changes the values automatically again and messes up the output. I also used shopt -u checkwinsize
, which affects the shell, making it seem as if the terminal has a fixed size, but has no effect on the xHarbour program.
Is there a way to block the SSH session from receiving the in-band commands described here? As far as I can tell I can't set the terminal size in termius. Is there an android(maybe iOS too) client that allows that?
The target system is Centos 6,7