View Full Version : Wrong gpm behaviour with Midnight Commander, elinks, etc.

18th April 2009, 02:41 AM
I can't get mouse interaction to work when I'm in logged into a tty (with gpm enabled) and run a non-graphical app which supports mouse interaction, such as Midnight Commander (mc) or elinks. I can still copy and paste text with the mouse, but can't expand menus or click on buttons; if I try to double-click something, gpm text-selection occurs instead of the expected behaviour. I'm not running 'screen' or anything similar, and I've tried with and without an X-server running (and with and without gpm in repeater mode for the former case).

When I run these apps in a terminal emulator like Konsole under X, everything works perfectly and as expected. After I make /dev/input/mice readable for all users on account of this unresolved bug (https://bugzilla.redhat.com/show_bug.cgi?id=472763), I can boot into runlevel 3 (with gpm started), run an SDL app and use the mouse with no trouble.

I know some apps (should) require a modifier key to be held down for gpm's default select-copy→paste to work at all, and that the program's normal mouse interaction is disabled while the key is held down. In case the opposite is at play here I even tried holding down combinations of Shift, Ctrl and Alt while clicking with the mouse, but that still didn't work.

Can someone help with this please?

18th April 2009, 05:47 AM
Hmm, gpm works fine for me in Midnight Commander and other apps in console mode, whether X is running on another virtual terminal or not. It sounds like gpm is not using the correct mouse type. You could try this in console mode:
/etc/init.d/gpm stop
/usr/sbin/gpm -t help

Pick the mouse type that fits your mouse then try
/usr/sbin/gpm -t <whatever_that_type_is>

18th April 2009, 02:44 PM
Thanks Rupert.

I've tried all mouse types without success. I'm using a laptop with an in-built touchpad (/dev/input/mouse0), and I've also tried with a USB mouse (/dev/input/mouse1). I tried all of:

gpm -m /dev/input/mice -t type
gpm -m /dev/input/mouse0 -t type
gpm -m /dev/input/mouse1 -t type
for each type (except touchscreen drivers), with a gpm -k after each trial. I only got both a moving cursor and console select-copy→paste when using ps2, exps2 or imps2 drivers, even for the touchpad. A couple of other drivers allowed me to move the cursor with the USB mouse, but not highlight any text in console mode. Should the evdev driver have worked?

Now that I know it works for you, I'm wondering if this is a hardware issue. I've just checked my dmesg for mouse references:

dmesg | grep -ni mouse
428:input: Macintosh mouse button emulation as /devices/virtual/input/input3
551:mice: PS/2 mouse device common for all mice
563:usb 2-2: Product: Microsoft Notebook/Mobile Optical Mouse 2.0
570:input: Microsoft Microsoft Notebook/Mobile Optical Mouse 2.0 as /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/input/input7
571:input,hidraw2: USB HID v1.10 Mouse [Microsoft Microsoft Notebook/Mobile Optical Mouse 2.0] on usb-0000:00:1d.0-2
763:input: Microsoft Microsoft Notebook/Mobile Optical Mouse 2.0 as /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/input/input11
764:input,hidraw2: USB HID v1.10 Mouse [Microsoft Microsoft Notebook/Mobile Optical Mouse 2.0] on usb-0000:00:1d.0-2
767:usb 2-2: Product: Microsoft Notebook/Mobile Optical Mouse 2.0

dmesg | grep -ni syn
589:Synaptics Touchpad, model: 1, fw: 6.2, id: 0xa5a0b1, caps: 0xa04713/0x0
590:synaptics: Toshiba Satellite M40 detected, limiting rate to 40pps.
591:input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input8
I have a very non-configurable Phoenix BIOS on a Toshiba Sattelite laptop. I'm not sure, but I think it uses PS/2 emulation for external input devices. But the PS/2 drivers didn't work..