2

After running crontab -e, My terminal starts acting strange, where characters aren't printed in the correct position. Starting and exiting an ncurses application (like vim and nano) doesn't help, nor does reset fix it either, so I have to restart my terminal emulator.

It appears to have the same symptoms as force quitting an ncurses application.

How do I fix this problem?

Edit: Screenshot: enter image description here

Environment

  • I my $TERM variable is set to xterm
  • I use uxterm as my emulator
  • crontab uses vim as its editor.

Edit: On the first answer, I noticed that it still persists with xonsh, even though *it gets fixed when I type reset with bash or zsh. So, it must be some issue with xonsh.

Nolan Akash
  • 383
  • 2
  • 10

2 Answers2

1

OP didn't respond to the comment about reset, which should work. The screenshot shows what happens if I run bash, and type

stty -onlcr

making newlines no longer force a carriage return, just becoming line feeds to produce the staircase effect.

Reconstructing:

breaking and not fixing...

and running reset:

reset fixes it

While bash will reset some of the terminal modes, between commands, it seems to overlook this one. The reset manual page says it does several things including

turns on newline translation

Thomas Dickey
  • 75,040
  • 9
  • 171
  • 268
  • I didn't reply to your answer because I already said in the question that `reset` does not work. However, copying your commands word-for-word, I noticed that `reset` works for bash and zsh, but not for `xonsh`. I'll change my question to reflect this. – Nolan Akash Feb 21 '17 at 02:42
0

I had the same issue when starting some java application with sudo on the background.

sudo /path/to/app &

I had to remove the sudo so the terminal won't be ruined (and chown my app)

hudac
  • 699
  • 2
  • 6
  • 17