«

»

Mar 25 2008

How to install Midnight Commander under Mac OS X (the easy way, using Rudix)

Mc-screenshot

Image via Wikipedia

EDIT: New article for Midnight Commander users: Fixing Midnight Commander’s unreadable dropdown menus.

EDIT: This article has been revised to show the latest information as of 2012. Note that these instructions probably will not work unless you are running a relatively recent version of OS X. Also, you really should read How to install Midnight Commander under Mac OS X (the easiest way?) before using the procedure shown here!

I have to admit, I am one of those people who dislikes Linux for one major reason: Whenever you ask for help in any online forum, the knowledgeable people all seem to be command-line devotees, and they invariably give you instructions that involve typing long, arcane commands into the command line. I hate using the command line – if I had wanted to use a command line, I’d never have moved away from MS-DOS, and i cannot understand why Linux geeks insist on using it, and on trying to get others to use it.  Even users of Linux distributions such as Ubuntu have found that when they go online asking how to do some function that could easily be accomplished using one of the GUI tools, often some obnoxious twit helpful person will reply by giving a bunch of stuff (that makes no sense at all to the uninitiated) to type in at the command line. One of the things I like most about Mac OS X is that you almost never have to do anything from a terminal prompt if you don’t want to, and Mac users seem to have a healthy disdain for using a computer as if it were still the 1970’s.

Long ago, when I was using MS-DOS, there was one tool that I had to have on any system I was using: Norton Commander.  The original, dual-pane file manager that made it oh-so-easy to do typical file manipulations like copying and moving files, viewing and editing text files, launching executables, etc.  without typing in DOS commands.  Norton Commander was such a great program that it inspired similar programs on other platforms, such as Total Commander under Windows, and the cross-platform muCommander that runs on just about anything (if it has Java installed).  In the Linux world, KDE users have Krusader, and Gnome users have Gnome Commander.

Mac OS X users have a number of choices, including the aforementioned muCommander and Xfolders, both of which are free.  Possibly the best alternative today is XtraFinder, which is excellent and free — it add tabs and other features to the OS X Finder, and can display dual panes in either a horizontal or vertical alignment.

However, despite your best intentions, there may come a time when you find yourself working at a shell prompt.  Maybe you are working with a Linux server, or on a Mac, maybe you can’t get OS X to come up but you are able to get to a terminal prompt (in my early days of using a Mac, this happened to me twice after OS X upgrades). More commonly, you are getting a permissions error on some file and can’t understand why – that’s very rare on the Mac, but it happens, and now you find yourself in the terminal trying to remember how to change permissions or ownership on a file (by the way, in most cases you should be doing this by right-clicking on the file in Finder,  then clicking on “Get Info” in the context menu, and then using the Sharing & Permissions section at the bottom of the information panel. But there are occasions when nothing else seems to work, and you want to go a bit deeper into the guts of the system). It is at those times when Midnight Commander may be the tool you want.

However, up until now there has not been a really easy way to install Midnight Commander on a Mac running OS X (at least not that I’ve seen).  But now, there is a package by Rudá Moura called Rudix, which is described this way:

Rudix features a world class collection of pre-compiled and ready to use Unix compatible software which are not available from a fresh installation of Mac OS X but are popular among other Unix environments. Here you can find utilities, programming languages, libraries and tools delivered as standard Mac OS X packages.

Now, I hear some of you “cut-my-teeth-on-Unix” types screaming, “What about MacPorts? What about the Fink project?”  Those are all well and good if that’s your cup of tea, but they require a much higher lever of Unix “geekiness” to install, and they add a lot of code that the typical user doesn’t need.  Rudix will let you add a whole bunch of Unix utilities if you really want to do that, but if you only want a few needed utilities then the “Custom Install” button in the Rudix installation lets you select exactly what you want, and no more.

So here is how you would install Midnight Commander in Mac OS X, using Rudix:

Go to the Rudix mc: Midnight Commander page. Select the correct package for your version of OS (filename ends in .pkg) and click on the package filename. On the next page, click the package filename again to download it to your computer. When it has downloaded, double click on it to run it. You should see a screen like this:

Rudix - Midnight Commander installer

Rudix – Midnight Commander installer

Click “Continue” and continue to do so until it has been installed. That’s all there is to it!

I should point out that this used to be a much more convoluted process, and there was a much longer set of instructions here explaining it, but all those old instructions are superfluous now.

Once you have installed Midnight Commander, you will realize that you can easily install many other utilities commonly found on Unix/Linux systems, if they are available in the Rudix package list. Personally, I would not go hog wild on this – I’d only install the utilities you actually need, as you need them. One package I typically install is wget, because so many scripts (such as those written in Perl) expect it to be present.

Edit March 28, 2008: I made an interesting discovery tonight.  Normally I use iTerm as my terminal program, and Midnight Commander runs fine in that. What it does not seem to run so well under is the Terminal.app program that comes with OS X. What specifically does not work in Terminal.app, at least on my system, is the mouse.  Under iTerm, mouse clicks get passed to Midnight Commander in the normal manner, but under Terminal.app that doesn’t seem to be the case. Another thing that you can do in iTerm (but not Terminal) is hold down the ⌘ (Command) key and right click on a file to select it. So, for the “best user experience”, so to speak, I’d suggest downloading and installing iTerm, which has a lot of other nice features you’ll probably appreciate (and did I mention it’s free?).

Edit April 1, 2008: If, for some reason, you want to modify the color theme of Midnight Commander, here are a couple of blog posts that show how to do that:

And, the Midnight Commander manual is another good source of information on this subject.

Command line haters of the world, untype!

29 comments

8 pings

Skip to comment form

  1. rstm

    Hello, I’ve read your post and enjoy it much. This is the kind of information which only a native speaker can do to pass users a very descriptive background in what Rudix is and do.

    I like the way do you explain step-by-step in how to install Rudix with only a few packages and how do you show to the novices the customization of /etc/profile and to insert the correct PATH. Really Great.

    So, I’m asking you permission to link your post into my Website in “Documentation” section because it worth allot for other users.

    — Rudá.

  2. Admin

    Rudá, of course you have my permission to link to this post, and I much appreciate the link! And thank you for making it so easy to install many of the popular Unix-based packages, without adding a lot of extra bloat to your system. I hope that many Mac OS X users will try Rudix, it really is a nice package.

  3. robind63

    What are your iTerm settings for the terminal and keyboard profiles? I tried this build of MC because the one I did myself misbehaved with the mouse in both iTerm and Terminal. In iTerm it types garbage characters when I click the mouse instead of sending the mouse event to the app. The funny thing is that if I am logged in to a linux system in the iTerm and run MC there then the mouse does fine.

  4. robind63

    Nevermind. It was just a bad setting in my .mc/ini file. The use_8th_bit_as_meta value needs to be set to zero.

  5. fyngyrz

    If you’d like to add something to your path such as /usr/local, here’s how it’s done:

    export PATH = $PATH:/usr/local/

    …the $PATH tells export to use the previous value, the colon separates the last value in the path from the new one you supply, and and finally the new is appended

    .

  6. Anonymous

    I’m getting error 🙁

    dyld: Library not loaded: /usr/local/lib/libintl.8.dylib
    Referenced from: /usr/local/bin/mc
    Reason: image not found
    Any idea?
    -Janusz

  7. Admin

    Anonymous, why do I get the feeling you hurried through the article and didn’t take the time to read and follow the instructions explicitly? In particular, did you also install gettext and glib, as instructed in the article? If you did install BOTH of those packages and you still got that message, you may want to send the author of Rudix an e-mail, as the article states.

  8. Amit

    Hey Michigantelephone,,

    i am using MAC OS X 10.5.7 and i was trying to install Midnight commander

    The first software i downloaded for that was fink commander from the web, since aptget doesn’t work in MAC world..

    I read through a lot of online articles and realized that i will have to download
    pkg-config,gettext and glib ,before i could even install midnight commander
    properly and so, i did that..

    while downloading pkgconfig i got error message gcc not installed and for that
    i had to download apple’s developer kit and after that i got fixed..

    right now,it looks like i do not get any error messages while trying to install pkgconfig and gettext,,whereas glib is still not being installed properly
    the last lines of error message i get is –

    make[5]: Nothing to be done for `install-exec-am’.
    make[5]: Nothing to be done for `install-data-am’.
    make[4]: Nothing to be done for `install-exec-am’.
    make[4]: Nothing to be done for `install-data-am’.

    and when i type in mc

    amit-sens-macbook-pro:glib-2.19.10 amitsen$ mc
    dyld: Library not loaded: /sw/lib/libintl.1.dylib
    Referenced from: /sw/bin/mc
    Reason: image not found
    Trace/BPT trap

    and following is my PATH-

    amit-sens-macbook-pro:glib-2.19.10 amitsen$ echo $PATH
    /sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin

    Could you assist me with installing MC on my MAC please ??

    Regards,

    Amit Sen

  9. Admin

    Amit, sorry, I cannot, because you’re doing it the hard way, and I don’t know how to do it the hard way — I only know the easy way, which is outlined in the article.

  10. MikeC

    Thanks for the tip on getting MC to run under OS X. I am new to OSX but have used many versions of Linix (Ubuntu and several others). Most CLI commands are similar.

    I found that ‘/usr/local’ was in the $PATH but no actual directory exist so I created as well as ‘/usr/local/sbin’. Strange but what the heck this is all new (OSX that is…) but easily correctable.

    You really don’t need to load Rudix. The images stand on there own as long as you understand that there might also be some dependencies (as you pointed out with gettext, etc.).

    robind63 pointed out that MC worked with mouse under iTerm, well, if that is different than X11 terminal under 10.5.8, it works great too! No function keys though – F10 to exit for example.

    I’m about to test all this under Snow Leopard.

  11. skylander

    респект, работает на ура

    в новой версии Rudix’a 2009 Chimera в комплект входит не 1 установщик, а комплект из отдельных пакетов, так что нужно самому руками установить пакеты gettext, glib и mc

    thanx alot, its works!

    Rudix 2009 Chimera is not installer, this contain collect of all packages as .pkg files each lib-packet. user (YOU) need to install gettext.pkg, glib.pkg and mc.pkg

    enjoy!

  12. awe

    Thanks, this is just what I needed. As a long time (debian) linux user I’m still lacking apt-like functionality in other OSs:(

  13. Anton

    Thank you, this was extremely useful! mc works great in putty ssh session to Mac OS X (Snow Leopard), better than in Terminal.app where mouse clicks do not work…

    However I get a strange error when exiting mc by typing “exit”:

    read (subshell_pty…): Interrupted system call (4)

    it doesn’t seem to happen when i exit through the F10 button or by mouse clicks.

  14. Руслан Гаврилов

    Я конечно в этом не особо разбираюсь, но после вашего поста стал гораздо больше понимать. Благодарствую 🙂

  15. Kirill

    Here is 100% terminal way using Fink package:
    http://www.woloszyn.org/2008/12/21/installing-midnight-commander-on-mac-osx/

    Just tested on Leopard, works fine.

  16. novertigo

    Hey, this is just an awesome tutorial. I am completely new to OS X coming from linux. The reason I switched that I was tired of setting up my laptop’s hardware almost every time Ubuntu had a new release.

    I was looking for my favourite console app, because I feel comfortable in a concole environment when mc is at my hand.

    I did not wanted to enter in a relatively deep console-minded install of anything. So I defenetly needed the encouraging that this post gave me to test mc on my shiny new MBP.

    It may be helpful someone that the current release of rudix’s mc has been compiled with gettext and glib giving you an even easier install.

    Rudix project is a great effort from Rudá. Big thanks!

    nv.

  17. CATAHИCT

    Такой информации, полагаю, и так достаточно, чтобы сделать вывод, как не надо делать.

  18. deepian

    thanks to this article I installed mc on snow leapard with minimal pain (and I have done it the hard way a few times before – taking many hours of frustration then.. so I really appreciate Rudi’s work)

    A useful tip for mc installs: if (like me) you like the terminal shell to retain changes of directory made within mc, after you have exited mc, then add the following to /etc/profile :

    [ -r /usr/local/share/mc/bin/mc.sh ] && source /usr/local/share/mc/bin/mc.sh

    then restart terminal, and hey presto, mc is even more useful 🙂

  19. Jane

    Thanks for your great article. I have installed mc on Tiger by following your instructions.
    You said you are happy to have links, I have included yours on my mc tutorial page.
    http://www.trembath.co.za/mctutorial.html

  20. ALien

    This needs to be updated. Rudix 2010 doesn’t offer the same install method as these screenshos depict.

    This step:
    http://michigantelephone.files.wordpress.com/2008/03/rudix-4.png

    Doesn’t exist anymore. So I clicked on “base” which has MC and clicked on libraries with the understanding that I could deselect the rubbish I DIDN’T want installed….and landed up getting ALL software under libraries installed ( 425meg ) and every under Base installed ( 156meg ).

    Can’t find where the “rudix” command line package can get installed from.

    SUX SUX SUX. Now I got to restore from backup to get rid of 600meg of stuff I didn’t want and/or already had installed….and all I wanted was MC.

    🙁

  21. Admin

    ALien: Doggone it, you’re right, it looks like the developer of Rudix decided to make his software decidedly less user-friendly. I added a new first paragraph to the article to warn everyone about this, and I suggest you try either the individual install package for Midnight Commander (if you are running Snow Leopard) or an older version of Rudix (if you are running Leopard or earlier), as mentioned in that paragraph. THANK YOU for letting me know about this!

    EDIT: One other point, according to the Rudix FAQ at http://code.google.com/p/rudix/wiki/FAQ all you have to do to completely uninstall Rudix is this (from a terminal prompt):

    sudo rudix -R

    So, if that works it should not be that big a deal to uninstall the megabytes of crap you don’t want. Still, I agree it should not have been installed in the first place.

  22. ALien

    I did the -R after I posted. It did “something” but /usr/local/bin/.

    I’m going to restore /usr or atleast /usr/local from backup.

  23. chad

    Snow Leopard users look here:

    http://blog.vladalexa.com/2009/09/30/midnight-commander-for-snow-leopard/

    (Moderator’s note: I have NOT tested this, so please observe all the usual cautions with regard to obtaining software from an unknown source, such as a virus scan, etc.).

  24. LouiSe

    What do you think about an up2date universal binary installer package? … http://louise.hu/poet/?tag=mc

    (Moderator’s note: I have NOT tested this, so please observe all the usual cautions with regard to obtaining software from an unknown source, such as a virus scan, etc.).

  25. Silver Knight

    First, thank you for taking the time to post about midnight commander on OS X. I have found it to be one of the most useful command-line tools for simplifying certain remote administration tasks.

    However, regarding this comment from the article: “Whenever you ask for help in any online forum, the knowledgeable people all seem to be command-line devotees, and they invariably give you instructions that involve typing long, arcane commands into the command line. I hate using the command line – if I had wanted to use a command line, I’d never have moved away from MS-DOS, and i cannot understand why Linux geeks insist on using it, and on trying to get others to use it. “, and more importantly the statement (retracted or not, it’s the thought that counts) that the “helpful people” on forums are “obnoxious twits” for their insistence on usage of the command-line to help folks, I’d like to clarify some details which you appear to have overlooked on that issue.

    (Please understand that while my initial knee-jerk reaction was to flame the hell out of you on that detail, I have taken two seconds to stop and think about it and realized it’s not your fault for feeling that way. It’s just a misunderstanding which you happen to share with a great many OTHER people. So, instead of flaming, I’m going to inform.)

    While it might SEEM at first glance that it’s an issue of the “knowledgable” all being “command-line devotees”, that’s actually not been the case for many years now. The command-line IS a useful tool, and IS still heavily used by system administrators and other “knowledgable people”, but MOST folks (including those helpful folks on forums) DO tend to use a GUI interface MOST of the time. So, if this is the case, then why the insistence on posting helpful advice involving the command-line? It’s simple, really. Let me explain…

    The problem with a GUI interface (especially on Linux) is that it’s almost NEVER exactly identical from one system to another. Each user has configured and customized, and installed various software which changes their system (sometimes dramatically), so helping someone with a (often deeply technical) problem by walking them through the GUI step by step could require a LIBRARY of writing to get down to the nitty-gritty of the solution they need. NOT really very effective on a forum type environment.

    On the other hand, these knowledgable people all KNOW that they CAN count on the underlying command-line to be FAIRLY consistent from one similar system to another. (ALL Linux systems will have a pretty similar interface at the shell, as will ALL Mac OS X systems, and ALL Windows systems tend to be mostly identical at the command-line also.) Thusly, if you are trying to help a person with a problem which could easily be solved with a few “arcane” commands at the shell, are you REALLY going to spend the time to walk them step by step through post-after-post and page-after-page of discovering WHICH GUI functionality they HAVE and which they do NOT (which MAY not even be the same GUI as YOU have) or are you going to paste a few commands for them to copy and paste?

    So now you know… Most of these “obnoxious twits” (who do not HAVE to take the time to help ANYONE but CHOOSE to help anyhow) aren’t such command-line devotees as you might initially have thought. They are simply trying their best to help in an efficient and consistent way which can possibly be helpful to more than just the one person they are helping at that moment.

    (Please understand that while my initial

  26. totusek

    Note also: The web page you list for getting older versions of Rudix at http://rudix.org/2009/index.html is now giving:

    Not Found
    The requested URL /2009/index.html was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/2.2.3 (CentOS) Server at rudix.org Port 80

    That was also the same web page that MacUpdate and other OS X software sites linked to, for getting Rudix for OS X 10.4.11 (8S165) PPC, OS X 10.4.11 (8S2167) Universal Binary Server for PPC and Intel, and Rudix for OS X (9L30) UB for PPC users.

    Apparently, the developer of Rudix has dropped all Rudix PPC support…

    So, the previous glowing recommendations that a number of OS X reviews were giving, for PowerPC users of “Tiger” and “Leopard” OS X builds in particular, to use Rudix instead of MacPorts or FINK to save themselves enormous headaches, may no longer be the case.

    On a related note: Anyone wonder why PPC users – who are the longest-time users of both the older Classic Mac OS builds and of OS X builds, feel rather discriminated against by some OS X developers and by Apple Corporate?

    Seeing the decade-old Windows XP builds continuing to be being supported – including directly by Apple’s Windows compatible programs, but Apple Corporate refused to allow either Mac OS 7.6.x * up though Mac OS 9.2.2 and OS X 10.0 (4K78) PPC up though OS X (9L30) UB for PPC to be allowed to be made freeware and thus allow having user community development to be done to create updates for OS X 10.3.9 (7W98) PPC up though OS X (9L30) UB for PPC in particular – while at the same time declaring Classic Mac OS builds and OS X builds for PPC to be “dead” in terms of Apple support (which included the removal of a good chunk of the Apple developer tools for older versions of OS X that supported PPC from Apple’s developer downloads, and the banning of PowerPC apps from the App Store).

    And note that older PowerPC and older Intel hardware are being supported by some of the Linux communities, in terms of non-Apple OSes based on Linux kernels – but that doesn’t help OS X PowerPC users, including because of Apple’s positions and actions, and how a number of OS X software developers have dropped PowerPC support in reaction to what Apple has done.

    On a side note: There is a bit of dry irony and humor for OS X PPC users, if the news reports coming out are correct, that the current Flashback OS X compatible trojan horse malwares require an Intel CPU or AMD CPU plus Apple’s lack of proper modern Java support (now being very belatedly patched by Apple to plug that part of the issue for OS X 10.6.8 Intel up through OS X 10.7.3 Intel users only).

    * Classic Mac OS (aka Macintosh Operating System) 7.0, 7.5.3r2, and 7.5.5 for CISC CPU and/or PPC CPU, were given freeware status by Apple CEO Gil Amelio; However, when Steve Jobs returned to Apple, had Amelio forced out, and became CEO, Apple then said that Mac OS 7.1 wasn’t specifically named as having been given freeware status by Amelio, so users would still have to buy that particular OS version, and that Apple also would no longer allow sites other than Apple’s to post versions of System 7 for free download (although you could download 7.5.3r2 and the 7.5.5 update for free from Apple’s site). Mac OS 7.6.0 and Mac OS 7.6.1 have still not been given freeware status, and thus are still not available for free download from Apple’s site, etc., etc.

  27. Jane

    The up2date version from LouiSe’s link installed fast and easily on 10.7 and works perfectly.

  28. McUsr

    I have installed mc from a package from Rudix the last couple of days onto my now venerable Snow Leopard System, and it works as a charm.

    That is, I use iTerm. I have to rework the keyboard layout a little. as I can’t hit ctrl-/ on my keyboard, since it involves the opt key. I wonder if there are somebody out there that has customized the key-bindings to some extent?

  29. Admin

    NOTICE: All comments above this one were imported from the original Michigan Telephone Blog and may or may not be relevant to the edited article above.

  1. Three FREE dual pane Commander-type file managers | CrabApple Forest

    […] And thanks to our friends at the Michigan Telephone, VoIP and Broadband blog there are now some instructions for installing Midnight Commander that make the process as easy as following a recipe in a […]

  2. Mac OS X: mc - Midnight Commander « Tuxhausen-Blog

    […] Weitere Infos (auf englisch) findest du hier http://michigantelephone.wordpress.com/2008/03/25/how-to-install-midnight-commander-under-mac-os-x-t… […]

  3. The five Windows programs I wish were available on a Mac « Michigan Telephone, VoIP and Broadband blog

    […] Total Commander – I’ve said before how much I think that Mac OS X Finder Sucks, but if you try to find a decent dual-pane file manager for the Mac you won’t find one as full-featured as Total Commander.  What I’m looking for here is ease of use – give me buttons to select my various drives (or Volumes, as they are known under OS X).  Don’t make me click-click-click-click-click to get to frequently used locations. I would run Total Commander under Codeweavers Crossover except that it knows nothing of permissions.  Strangely enough, the dual-pane file manager I most often use on my Mac is a Linux program called Midnight Commander, which I install using Rudix, as previously mentioned in my post appropriately titled How to install Midnight Commander under Mac OS X (the easy way, using Rudix). […]

  4. Midnight Commander on OSX | Kamen Dimitrov's Blog

    […] намерих по въпроса, можете директно да я намерите тук или директно да отидете на rudix.org и да си свалите glib, […]

  5. Rudix « Mundo 3W

    […] con el pestiño del macports es como si nos hubiera tocado el euromillones. Y es que está hasta el mc o Midnight Commander aunque hay conflicto con las teclas FXX y creo que no enlaza como debiera pero en fin hay mucho mas […]

  6. Any cross-platform two-panel file manager? Drija

    […] YMMV May 28, 2009 1:06 am Adam Midnight Commander has been ported to Windows and can be installed on OSX. A bit messy, but should get you what you want. May 28, 2009 1:00 am Eye of Hell Midnight […]

  7. Any cross-platform two-panel file manager? - Admins Goodies

    […] Commander has been ported to Windows and can be installed on OSX. A bit messy, but should get you what you […]

  8. Установка Midnight Commander на OS X (Lion, Mountain Lion, Snow Leopard) | Macorona

    […] я нашел эти ссылки здесь. Подсказка: Для выбора нескольких файлов на […]

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

%d bloggers like this: