 <p>Your "standard Ubuntu terminal" probably supports xterm escape codes: <a href="http://invisible-island.net/xterm/ctlseqs/ctlseqs.html" rel="nofollow">http://invisible-island.net/xterm/ctlseqs/ctlseqs.html</a></p> <p>See specifically:</p> <blockquote> <p>CSI P s ; P s ; P s t P s = 1 9 → Report the size of the screen in characters. Result is CSI 9 ; height ; width t</p> </blockquote> <p>...and...</p> <blockquote> <p>ESC Y P s P s Move the cursor to given row and column.</p> </blockquote> <p>"CSI" is explained at <a href="http://en.wikipedia.org/wiki/ANSI_escape_code" rel="nofollow">http://en.wikipedia.org/wiki/ANSI_escape_code</a></p>