Installing Midnight Commander (mc) on MacOS X


Midnight Commander (often referred just as mc) is very popular file manager among Linux and FreeBSD users. "But we already have the Finder" may argue die-hard MacOS X users. The problem is that Finder is not designed for many tasks required by power users and especially developers. UNIX core of MacOS X consist of more than 47,000 files and folders most of which are not visible in the Finder. Additionally, MacOS X v10.1 Finder do not allow to do even such simple tasks like changing ownership because this is not supposed to be done by ordinary users (Apple disabled almost everything that may cause harm to the OS). That's why Midnight Commander is an essential piece of software for anyone digging deep.

Which version of Midnight Commander?

Midnight Commander may work in console (text) mode and under XFree86/Gnome (GUI mode). The second is obviously useless since it duplicates many functions available in MacOS X Finder. Additionally, running XFree86 on MacOS X is a pure hacking. Most Linux and FreeBSD power users run Midnight Commander in console mode only.

What Midnight Commander can do?

Very fast and convenient handling of directory tree using keyboard shortcuts, all UNIX file commands, browsing archives (tar, gzip, bzip), installer packages (RPM, deb), and much much more. In short, Midnight Commander is a must have Swiss army knife tool for power UNIX users!

Before You Install

No questions the best way to install Midnight Commander on MacOS X is to do it with Fink. Fink is a MacOS X port of package management system from Debian/GNU Linux. Before you proceed further, I am strongly recommend you to learn Fink basics, either from Fink web site either from my tutorial "Safe and Happy UNIX Hacking with MacOS X" either from both. Please note that everything except XFree86 packages will be installed outside MacOS X system directories.


First of all, you need to install Fink. The rest of installation procedure is a little bit tricky. At the time I am writing this (Fink 0.31 release) standard release of Midnight Commander in stable tree does not work in console mode on MacOS X. However, Christoph Pfisterer developed a patch which solves this problem. Thus, you should move Midnight Commander version 4.5.54-3 or above from unstable to local tree (please learn Fink basics before doing that). Then, you should install the following dependent packages ("apt-get update", "apt-get install package-name") in order to avoid recompilation: giflib, xfree86-base. You will be prompted to install more packages, so just say yes. Please note that XFree86 will be installed only to satisfy package dependencies, it will not be actually used (if you will run mc in console mode only). Wait until all this stuff will be downloaded and installed, then run "fink build mc". Finally, locate link to mc deb package in "/sw/fink/debs" and run "dpkg --install mc-version-number.deb".

If you do not like lengthy procedure described above, you may take my precompiled mc deb package. Then, follow these steps:

  1. Install Fink.
  2. Install packages required for Midnight Commander - "sudo apt-get install audiofile daemonic dlcompat esound ghostscript ghostscript-fonts glib gnome-libs gtk+ imlib libjpeg libpng libtiff libungif libxml2 netpbm orbit passwd readline slang xfree86-base zlib" (you can copy this line from this document and paste in terminal to avoid retyping). Please note that automatic downloading a number of packages from Fink Web site will take some time.
  3. Place downloaded deb package from this archive in your home directory and run in terminal "sudo dpkg --install mc_x.xx.xx-x_darwin-powerpc.deb" (replace "x" with actual version number).
It may happen that installing dependent packages will not be completed because of package slang is not available. The cause of this problem is that author removed source tarball of slang version 1.44 used by Fink 0.32. Solution is simple - you should upgrade to cutting edge CVS version of Fink which uses slang 1.55.

Usage Notes

Run "mc" or "sudo mc" in terminal to launch mc. If you have not used Midnight Commander before, it will take some time until you will get used to use it. Please note that it is not a good idea to compare Midnight Commander and MacOS X Finder, they have been designed for different tasks and users. Midnight Commander for MacOS X is still experimental piece of software, so some thing just do not work as expected. For example, instead of Function (F1 - F10) keys you may have to use Escape + Number (e.g. Esc + 1 instead of F1).


Midnight Commander (with console mode support) deb for MacOS X is available for download here.


MacGuruHQ and MacGuruHQ Logo

Copyright© 1996 - 2002 by Andrei Verovski. All right reserved. Content may not be copied in whole or in part, through electronic or other means, without the author's permission. MacGuru Logo (blue penguin) by Sergey Orehov.