how to set up mouse in terminal window? when i click on midnight commander captions i get raw data from mouse printed as characters in terminal and any running progs don't understand mouses clicks. I didn't have a gpm package, so i'decided

$ps aux |grep -i gpm
user    3607  0.0  0.0 103244   912 pts/0    S+   16:45   0:00 grep -i gpm

and i did yum install gpm


ps aux| grep gpm
root      3898  0.0  0.0   6732   568 ?        Ss   16:56   0:00 
/usr/sbin/gpm -m /dev/input/mice -t exps2
user    3906  0.0  0.0 103244   888 pts/1    S+   16:56   0:00 grep gpm

then i start mc and do try click... all is the same i see responses in command-line as "M P!M#P!M F!M#F! " like sequences note i have other Linux where no gpm installed and all rocks fine..:doh:

1 Answer 1


Gpm is only used on the Linux console, i.e. outside the X Window System, in text mode. Gnome-terminal supports control sequences indicating mouse events, and you are in fact seeing these sequences.

Normally mouse support is activated by the application, not manually, so that the sequences are sent to applications that support them, and you can use the mouse for selection in applications that don't themselves use the mouse.

Make sure that you have mouse support activated in mc. It is on by default (at least on Debian squeeze, the only way to turn it off is if you run mc -d).

  • Running mc -d option I don`t see any sequences and when i click mouse it do select regions on screen. So may be this is question of terminal properties?
    – Yurij73
    Commented Nov 14, 2012 at 19:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .