Terminal view broken

Sometimes, the terminal window breaks somehow. Every new line is shifted to the right opposed the previous line. When I try to start mc, it says “Aborted”. But sometimes it’s just OK. When it’s not, I try to resize terminal window and run mc until it works. Any idea why is this happening and what to do with it?

Have you tried stty sane;reset? (no it does not reboot or “reset” the TO, only the command line)
Works for me after cating a binary file.

That helps. But trying to open mc breaks it again

Try a mc --xterm, works for me using bash.

still broken, nothing changed

the same here …

rm /etc/mc/history - this will help with mc


That helped. Not permanent, but in case of problem, it helps for some time.

i had issues with vim until I started with export TERM=vt100 explicitly when I log in. i have a feeling the terminfo is a bit screwy.

I use vt100 on my phone to keep it more stable, but I need to start mc in landscape mode and then turn it as I wish. If not, it refuses to start with the “Aborted” message.

All of these “graphical” applications have some minimal terminal size. On desktop you can just make window larger, but on phone unfortunately there is no such option, maybe try smaller font.

That’s is not the problem. I open mc in landscape mode and then turn it with no problem back in portrait mode. So mc have no problem runing on phone in portrait mode.

Well it might be, because ncurses, library mc uses, might check for terminal size just on initialization. That is probably why you can open mc in landscape and not in portrait, because in portrait there is not enough horizontal space.

there is enough space on portait. I can open it on portait usually. I think, that when the terminal window is broken (images above), the mc gets wrong size (0x0, for example) and refuses to load. The problem is not mc not loading some times, but the broken terminal window (images above). The mc not loading is just one of the symptoms.