Keyboard PgUp,PgDown,Home,End in Solaris

Ouvir com webReader

There’s an annoying behaviour in Solaris (10?) that prevents you from using PgUp/PgDown/Home/End keys in some programs. Instead, it will print a tilde (˜). Luckily I found someone complaining as well and got help from some Solaris users (see Reference below).

Check your current/usual TERM type, so you can check the effect right away:

[ntavares@solaris ~]$ echo $TERM

This tells you your terminal is setup with vt100 definitions, so copy your ‘vt100′ terminfo to somewhere so that you can add this specific keystrokes definitions [you should replace 'vt100' for whatever the result above, e.g. 'xterm']:

$ mkdir ~/.util
$ env TERMINFO=/usr/share/lib/terminfo /bin/infocmp vt100 > ~/.util/vt100.ti
$ echo ‘ knp=\E[6~, kpp=\E[5~, kend=\EOF, khome=\EOH, ‘ >> ~/.util/vt100.ti
$ env TERMINFO=$HOME/.util /bin/tic -v ~/.util/vt100.ti

Test the keys in a text file (example: /etc/profile):

$ env TERMINFO=$HOME/.util less /etc/profile

It should be working now. Unless you want to change this behaviour system wide — replacing /usr/share/lib/terminfo/x/xterm with your compiled info at ~/.util — you’ll need to teach bash to read a different TERMINFO description on login:

$ echo “export TERMINFO=$HOME/.util” >> ~/.profile


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply