Midnight Commander Cheat Sheet

Midnight Commander is still my favourite Linux file browser and bulk file manipulation utility. The legacy of Norton Commander will never be forgotten!

Mac Home & End not working

https://stackoverflow.com/questions/161676/home-end-keys-in-zsh-dont-work-with-putty

https://superuser.com/questions/10716/how-to-make-home-or-end-keys-work-in-mc-running-on-os-x-ssh

How to show file sizes in human readable format

F9 / Left or Right / Listing format… / User defined:

Now simply add :4 to size, so that it’s size:4

Bob’s your uncle.

Reference: https://superuser.com/questions/1570436/how-to-show-file-sizes-in-midnight-commander-in-the-most-compact-form-smart-f

How to compress selected files

  1. Select them
  2. Press F2
  3. Press the ‘@’ sign
  4. Use this command:
7z a ARCHIVE_NAME.7z %s

What extra packages does Midnight Commander like?

If you want your Midnight Commander to have the maximum amount of functionality, installed these optional packages.

The pipe | links mean either|or so pick one that you prefer.

This is from 2019

arj catdvi | texlive-binaries dbview djvulibre-bin genisoimage gv libaspell-dev links | w3m | lynx odt2txt poppler-utils python-boto python-tz xpdf | pdf-viewer

Errors

Mac – identify: command not found

If Midnight commander is set up properly, it gives you the ability to preview both PDFs, PNGs, and JPGs. The problem is how to set it up properly? Which extra packages has be installed?

This morning I got the following error trying to preview a PDF file:

Thinking this is going to be a quick fix, I did the following on my Mac M2 Mini:

brew install mc

Out of the starting gates the news seemed hopeful:

==> Fetching dependencies for midnight-commander: pcre2, mpdecimal, ca-certificates, openssl@3, readline, sqlite, xz, [email protected], gettext, glib, libpng and diffutils

But almost ten minutes later something I skimped over, came to haunt me:

You have 111 outdated formulae and 1 outdated cask installed.

It seems just installing mc triggered a huge homebrew update. And, ironically, I already had mc installed and just wanted it updated.

The question is, did it work? The answer is no, afterwards, still identify: command not found .

Here is one bug report that indicates you need imagemagick:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534681

Next, this worked partially:

brew install imagemagick

Now, instead of getting identify: command not found, I get this on a PNG:

/Users/Name/code/project/public/uploads/lessons/images/10AM_112/images/2/a001.png PNG 936x651 936x651+0+0 8-bit sRGB 320462B
0.000u 0:00.001

No picture preview? What next.

Midnight Commander has an mc.ext.ini file. This file won’t exist on a default installation until you access the Command / Edit extension file menu:

Unfortunately, this doesn’t guarantee success. And also, the mc.ext.ini is so big it will make you cry. More concerning though it has entries for most file types and these don’t seem to take effect.

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top