I have a problem with Midnight Commander that I am finding exceptionally annoying. I hope that you can provide some relief to me.

I want to use Midnight Commander without mouse support, with mouse actions invoking my X terminal emulator program's functionality rather than being passed through to Midnight Commander. So I invoke Midnight Commander with the command-line option that does that, via an alias

alias mc='mc -d'

This works all well and good … until I press F4 to edit a file. Because (I think) I am using the so-called internal editor, this brings up mcedit, to which all of my mouse actions are passed because the mouse is enabled in it.

I know that the -d option works when I manually invoke the editor with mcedit -d and a file. How do I get the same when mc invokes the editor with F4?

Midnight Commander has this option of not using the mouse for both its mc and mcedit programs and I want to know how to turn it on throughout the whole of Midnight Commander, including when invoking its supposedly internal editor (that surely, if it were internal, should be respecting the -d option that I gave to mc).

Latter Edit: I have shell variables EDITOR and VISUAL set to '/usr/bin/mcedit', now I just changed them to /usr/bin/mcedit -d ... still don't work, then I tried to set a path with higher priority where I put a script called mcedit that call /usr/bin/mcedit -d $* (verified that is first with which mcedit) ... still same problem

  • Can't reproduce this with mc 4.8.21. – Ipor Sircer Jul 17 '18 at 17:46
  • I cannot get to that mc version, I just tried on Mint 18.3, Mint 19 (which has the same versions with latest Ubuntu - 18.04), also on latest Knoppix, maximum mc version I got was 4.8.19, and all got the same problem in my above question, so, what is your Linux distro ? – THESorcerer Jul 17 '18 at 22:41
  • Debian buster (testing). packages.debian.org/buster/mc – Ipor Sircer Jul 17 '18 at 22:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.