I have a simple test script that runs fine with xterm but I cannot see the output when using urxvt because the screen flashes and I only see the cursor on the top left corner. Here is the script:


while [ 1 ] ; do
    echo "test$i"
    echo -e "\033c"

I tried using urxvt*buffered: true in .Xresources but it does nothing.


If you don't want any flickering, don't reset (ESC c) the terminal at every loop:

echo -e '\033c'
while : ; do
    echo -e '\033[H'"test$i"
  • On some terminal emulators that simply results in a different kind of flicker, with the cursor appearing at different points on the first line. – JdeBP Aug 1 '17 at 16:36
  • By adding \033[2K to the homing of the cursor you can probably remove the flickering. My mistake was resetting the terminal every "frame". – 2A-66-42 Aug 1 '17 at 16:40
  • No, EL causes yet another flicker pattern on those terminal emulators. Your mistake is in thinking that this sort of thing is inherently free from screen erase and cursor motion being out of phase with window rendering. It isn't. Across a range of terminal emulators you will get a range of effects, with RIS, ED, EL, or simply only CUP 1,1. Try it. (-: – JdeBP Aug 1 '17 at 17:15

It’s not clear what you expect from a script that continually writes text to the screen and then immediately erases it.  It looks like you are observing that urxvt runs faster than xterm.  If you want to see the output from your script, add a sleep.

  • I was not sure if urxvt was just faster than xterm or if there was some kind of double buffer problem with urxvt. – 2A-66-42 Aug 1 '17 at 16:30
  • The script is issuing RIS. Change that to ED and xterm runs a whole lot faster. – JdeBP Aug 1 '17 at 16:43
  • @JdeBP: I’m not sure what you’re saying, and I’m especially puzzled why you’re saying it as a comment on my answer rather than a comment on the question (or maybe even as a separate answer). – Scott Aug 1 '17 at 17:02
  • Because it is a comment on your answer, which is talking about urxvt running "faster than xterm". As I said, xterm handles ED a lot faster than it does RIS, and the speed difference between it and urxvt is no longer orders of magnitude. – JdeBP Aug 1 '17 at 17:08
  • (1) Well, I still don’t know what “RIS” and “ED” are. (OK, I’m guessing that ED is “erase display”, but I still don’t know what RIS is, and it’s not worth the bother to Google it and go into TLA hell.) (2) Your comment seems to be beside the point, as my point is that urxvt runs too fast for the OP’s liking, and getting xterm to run faster isn't in anybody’s interest. – Scott Aug 1 '17 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.