Finally figured the terminfo thing out.