The simplest program that should draw a horizontal line:
int main()
{ initscr(); for (int i=0;i<10;i++) addch(ACS_HLINE); getch(); endwin(); }
works ok localy, but over MOSH connection result is qqqqqqqqqq.
I tested other well known ncurses programs this way (over MOSH connection) and some of them works well, like: alsamixer, vim, tmux... but other tested also showed "ugly characters", like: tetris game (bastet), dialog (showing dialogs from shell scripts).
So the problem again for myprogram above, tetris, dialog and others is:
- it works localy in xterm and virtual-terminals(term=linux) and tmux/screen.
- it works well over SSH too.
- it shows q and x characters instead of lines over MOSH client
Mosh is very usefull program that resolves ssh disconnections on laptop wifi. It creates its own terminal and sets TERM variable to xterm. Right before starting program over mosh, TERM var is 'xterm', locale command shows LANG=en_US.UTF8,LC_ALL="", fonts seems ok (and same results with testing different fonts)
Does someone know how to solve or further debug this problem?
Simplest simulation:
sudo apt-get install mosh bastet #<--install mosh and tetris
bastet #<--tetris works ok
mosh -- 127.0.0.1 bastet #<--q and x chars instead of lines
Asked by Asain Kujovic
(2178 rep)
Jan 16, 2018, 11:38 PM
Last activity: May 15, 2022, 09:52 AM
Last activity: May 15, 2022, 09:52 AM