Midnight commander with mouse in screen #14359

Closed
opened 2026-01-31 04:08:09 +00:00 by claunia · 5 comments
Owner

Originally created by @CyrusJoudieh on GitHub (Jun 29, 2021).

Running mc in ssh without the screen app the mouse works as expected without issues in small window, maximized window and full screen.

When running mc inside the screen app the mouse is responsive only in half of the Windows Terminal window from left to middle.
If resizing the Windows Terminal window to half of the monitor screen the mouse works on the entire Windows Terminal window.
If resizing the font when pressing [ctrl - +] to the maximum in a maximized window the mouse works on the entire Windows Terminal window.

The mouse works fine in screen with Putty.

Windows Terminal Preview 1.9.1523.0
Remote OS: Centos 8 stream

Screen environment variables:
TERM="screen.xterm-256color"
DISPLAY="xterm" or DISPLAY="_"

Originally created by @CyrusJoudieh on GitHub (Jun 29, 2021). Running mc in ssh without the screen app the mouse works as expected without issues in small window, maximized window and full screen. When running mc inside the screen app the mouse is responsive only in half of the Windows Terminal window from left to middle. If resizing the Windows Terminal window to half of the monitor screen the mouse works on the entire Windows Terminal window. If resizing the font when pressing [ctrl - +] to the maximum in a maximized window the mouse works on the entire Windows Terminal window. The mouse works fine in screen with Putty. Windows Terminal Preview 1.9.1523.0 Remote OS: Centos 8 stream Screen environment variables: TERM="screen.xterm-256color" DISPLAY="xterm" or DISPLAY="_"
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 04:08:09 +00:00
Author
Owner

@DHowett commented on GitHub (Jun 29, 2021):

This is likely due to screen requesting legacy mouse mode, which only supports coordinates up to 93 or something small (perhaps with additional limitations because of UTF-8...).

What is TERM outside of screen?

@DHowett commented on GitHub (Jun 29, 2021): This is likely due to screen requesting legacy mouse mode, which only supports coordinates up to 93 or something small (perhaps with additional limitations because of UTF-8...). What is `TERM` _outside_ of screen?
Author
Owner

@CyrusJoudieh commented on GitHub (Jun 29, 2021):

Its TERM="xterm-256color"

@CyrusJoudieh commented on GitHub (Jun 29, 2021): Its TERM="xterm-256color"
Author
Owner

@j4james commented on GitHub (Jun 29, 2021):

Also check what version of screen you're using. I believe that support for SGR mouse mode was added in version 4.7.0, so anything after that should be fine. That said, I couldn't get the mouse in mc to work at all unless I changed the TERM in screen to xterm-256color, so I suppose another explanation may be that the term info is just out of date.

@j4james commented on GitHub (Jun 29, 2021): Also check what version of screen you're using. I believe that support for SGR mouse mode was added in version 4.7.0, so anything after that should be fine. That said, I couldn't get the mouse in mc to work at all unless I changed the TERM in screen to xterm-256color, so I suppose another explanation may be that the term info is just out of date.
Author
Owner

@CyrusJoudieh commented on GitHub (Jun 30, 2021):

The screen version installed is: 4.06.02 (GNU) 23-Oct-17

Will try to get the latest version of screen and test it.

I had to add an environment variable DISPLAY="_" or DISPLAY="xterm" to enable the mouse in mc or use the command line "mc -x".

@CyrusJoudieh commented on GitHub (Jun 30, 2021): The screen version installed is: 4.06.02 (GNU) 23-Oct-17 Will try to get the latest version of screen and test it. I had to add an environment variable DISPLAY="_" or DISPLAY="xterm" to enable the mouse in mc or use the command line "mc -x".
Author
Owner

@CyrusJoudieh commented on GitHub (Jun 30, 2021):

Can confirm that its working fine under Screen version 4.08.00 (GNU) 05-Feb-20

Thank you!

@CyrusJoudieh commented on GitHub (Jun 30, 2021): Can confirm that its working fine under Screen version 4.08.00 (GNU) 05-Feb-20 Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14359