The problem:
I need to be able to run TUI programs that do no fit in a 9-line high terminal inside a nine-line terminal by panning up and down.
The set-up:
I have a Raspian computer connected to a 9-line Braille display (Canute 360). The Braille is automatically sent the last 9 lines of the terminal by screenreader software called brltty. The terminal emulator is gnome-terminal which is pre-set to 9 lines by 40 characters.
I am coming across TUI programs that we need to run (such as raspi-config) that assume the terminal will be more than 9 lines high and therefore do not work as certain options are hidden off the top of the terminal window. This means they are invisible on the Canute Braille display.
I cannot edit or change the size of the gnome-terminal (it needs to stay as-is to meet the client specification). I can't change brltty's behaviour as that is an external program, or the Braille display's behaviour. I can install any program within Raspian, but I cannot realistically patch and fix every TUI application with this behaviour, I need a fix that can be applied any time a user comes across a problem.
Using raspi-conf as the test case:
It assumes at least 12-line terminal but currently only the bottom 9 lines are visible, cutting off critical options from view (on the monitor and on the Braille display). If I can run a command or create a script that lets the user pan up and down, perhaps by running a taller terminal instance inside the 9-line one, then using keyboard short cuts to scroll up and down, then I assume I have solved the issue for all similar TUI applications.
Tried:
- I cannot use - gnome-terminalhistory buffer as- raspi-confis fixed to the full terminal screen.
- I have looked at - gnu-screenand- tmuxresize options, but I cannot see how to make a terminal window inside- gnome-terminalthat is larger than it rather than smaller than it or a portion of it. From this answer I read that "tmux limits the dimensions of a window to the smallest of each dimension across all the sessions to which the window is attached," so I assume that tmux is not an appropriate tool for this task.
- I cannot resize the - gnome-terminalwindow (to, say, 18 lines high) then use- brlttycommands to send either the top or bottom half of the screen to the Braille display as its multiline support is not yet developed enough to allow this.
 
                        
I tried with GNU screen in a 40x9 iTerm window on macOS (also tried with PuTYY on Windows) and the following "works" for me.
Start a
screensession. In the shell prompt,echo $LINES $COLUMNS(orstty size) outputs9 40.At this time, long lines would be wrapped at column 40 as usual. See this
ls -l /output:Press
C-a :and run screen commandwidth -w 80.Press
C-a :and run screen commandheight -w 24.Now
echo $LINES $COLUMNSwould output24 80and the earlierls -l /output is re-wrapped at 80 column. Since the "phyiscal" window is 40 columns you need to pressC-a [to enter copy mode and then use direction keys to move around.Now I start
vimand only the top-left part is visible.To see other part of the
vimwindow, I pressC-a [to enter copy mode and then I can move around. The following is when I moved to the bottom-left corner to seevim's status line.So for your TUI app, if some input area or buttons are not visible you can also do the similar things:
C-a [)Esc)