How to scroll to the bottom or to the beginning of a terminal session in xterm

scrollingxterm

If I want to move up or down in xterm page by page I do it with <shift> + <PgUp> and <shift> + <PgDn>. But how can I completely move to the bottom or to the beginning of the terminal session without going one page at a time?

Best Answer

As far as I know, there is no default way to jump to the top, but the easiest way to jump to the bottom is to type anything (beside the Shift+PgUp/Down of course).

For jumping at the top, you can map e.g. Shift+Home to scroll up 1000pages by starting xterm with

xterm -xrm  "XTerm*vt100.translations: #override \n Shift <Key>Home: scroll-back(1000)\n"

or adding

XTerm*vt100.translations: #override \n\
   Shift <Key>Home: scroll-back(1000)

to your $HOME/.Xresources (you need to restart your XServer or call xkrdb -merge $HOME/.Xresources to activate it).

For jumping additionally to the end with Shift+End, use

xterm*vt100.translations: #override \n\
 Shift <Key>Home: scroll-back(1000) \n\
 Shift <Key>End: scroll-forw(1000)
Related Question