urxvt leaving ncurses content drawn on screen detach

2012-10-10

For a while now I've had this issue with urxvt, when I detach screen the terminal remains garbled with the content the screen had before I detached. This, I guess, is because there is something funny going on in urxvt's terminfo. As a workaround one can fake urxvt being actually rxvt by defining termName in ~/.Xdefaults:

urxvt*termName: rxvt-256color

or

urxvt*termName: rxvt

or whatever. The terminal acts nicely with screen and ncurses, and I haven't run into any problems thus far. But note that generally speaking lying about your terminal's capabilities is a stupid idea.