Re: Mouse interface for text mc via console telnet

Hi, Ferdi!

I want to configure a mouse interface for mc on my VT emulator in
Windows. I connect to linux (SuSE 7.2 kernel 2.4.4) with the telnet
terminal type = linux.

Currently, MC only supports mouse in two cases - on the Linux
console and in xterm.

Mouse support on the Linux console is implemented using gpm library. This
library reads mouse events from a UNIX socket /dev/gpmctl using gpm own
protocol.  I don't tring it's worth the trouble to emulate it.

Mouse support on xterm actually works remotely if you run telnet or ssh in
xterm.  I always wanted an emulator for Windows that would emulate xterm
closely enough to support xterm mouse.

However, there are three important limitations.  They are likely to be
removed in the future, but they exist in all versions of MC including

1) The terminal name on the remote side must begin with "xterm" or be
equal to "dtterm".

2) This cannot be overridden even by the "-x" option.

3) The protocol must be exactly the one used by xterm.  The sequences are
hardcoded - they are not taken from terminfo.

In other words, to support xterm mouse, xterm should be emulated quite
closely, but this requirement may be relaxed in the future versions of MC.

You could search for documents about xterm mouse reporting, but I just
want to suggest you one.  Get rxvt-2.6.3 from and look for "mouse" in

How can I send the mouse clicks to the linux box? My emulator allows me
to add scripted functions.  Currently I translate mouse clicks into certain
keystrokes depending on position and content on the screen.

At least implement xterm mouse reporting without the ability to disable
it.  Even that will be safer.

PS I'm logging into a Linux server via telnet from Windows.  I do not have
much knowledge to go and upgrade or modify the s/w on the Linux server.
It seems I should install some extra mouse handlers?

I have no idea what you are talking about.  You may want to upgrade
mc-4.5.55, but beware that the "-x" option still doesn't work in it.

If we only could make all already existing code in MC work, without any
new stuff!

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]