Skins and color themes for Midnight Commander

MC (Midnight Commander) is a great piece of software and I use it a lot, even when I’m using a graphical desktop environment. Unfortunatly, it had to reach version 4.7 and many-many years of development until it got proper color themes support! But I’m not complaining (oh well, maybe a little) – I am now the happy user of MC 4.7 running on my brand-new Ubuntu 10.4 install, and I just noticed the skins support.

Of course, it is not perfect and it’s not the best approach either, but before we’ll get into that, let me show you an example of what coloring MC was like a few releases ago:


You see that horrible cryptic line? It was supposed to go into ~/.mc/ini and would change MC colors. Any typo would lead to colors not loading. And it doesn’t end here.

Since that file is overwritten when you exit MC, you can’t edit it with MC’s internal editor, so you have to edit a copy, exit MC and overwrite the file. Yes, talk about dubious design decisions. So I’m not going into that.

What I am going to write about is how the skins support work in MC 4.7 or later. The skins are simple ini files that are placed in /usr/share/mc/skins.

You can load any of the skins there with the command:

$ mc -S skinfile

Don’t write any path or the .ini extension of skinfile.

If you want to make the changes permanent, you need to edit the ~/.mc/ini file to contain this line:


Of course, make sure you don’t have MC started or you’ll lose the settings when you exit it. Edit a copy and replace the ini file:

$ cd ~/.mc
$ cp ini
$ mcedit
(do your stuff)
$ mv -f ini

MC comes with some predefined skins, so it’s pretty easy to “fork” one of them so you can customize it to your liking.

The skins support is (incompletely) documented on the mc wiki. The options that are not described on the wiki are pretty easy to understand – for exemple the characters used to draw the boxes.

To create a new skin, you just need to copy one of the existing files (I used default.ini) and edit it. After you save your changes, you should first test it with mc -S skinfile. The changes are not permanent, so if you messed up the display, you don’t have to kill all your MC settings.

The bad news is that there’s no option in the interface to choose the skin and no documented support to load a skin from your own home directory, so if you don’t have root access (or a friendly sysadmin), you can’t use the skins support.

Leaving the bad parts aside, in less than 20 minutes I was able to convert the horrible line at the beginning of the post to a complete skin, and now my MC changed looks from this:

to this:

You can download my skin file here – just save it to /usr/share/mc/skins and you can use it.

Enjoy and let me know what you think in the comments! Also, if you have improvements, I’m interested to see them!

For my romanian small-biz friends: make sure you read the NOVIT news!



  1. [...] updated MC from version 4.7 to 4.7.5 on my Ubuntu system, from a PPA repository. Unfortunatly, the MC skin I was using didn’t look very nice – some new keys appeared on the skin files and the default looked [...]

  2. Keith Bowes says:

    Well, in older versions of Midnight Commander, you could do any of the following:
    a. Exit Midnight Commander.
    b. vi ~/.mc/ini
    c. Add the color-scheme line
    d. Restart Midnight Commander.
    2. Use the MC_COLOR_TABLE environment variable (that’s what I did).
    3. Pass the -C option (preferably set it in your desktop or window manager’s menus or create an alias or script for it).

    Hm, I can load the skin from my home directory. What I’ve been doing is using the MC_SKIN environment variable.

    However, I now have slightly different skins for and the latest git (which I use for keeping my translation up-to-date), I’ve moved it to my ini file (use the skin directive in the [Midnight-Commander] section); it looks in the skins subdirectory of your configuration directory (~/.mc/skins in 3.7; $XDG_DATA_HOME/skins in the latest code).
    [Not that I’m that brilliant; I just found that hat tip at today; the same web search which lead me to this entry.]

    I can’t say where I see that the skins are any more fault tolerant than the color table; in both, an unrecognized keyword makes it resort back to the default color.

  3. Ovidiu says:

    @Keith, great info, thank you! I didn’t know about the environment variables, this makes it easier to play with the colors.

  4. Ovidiu says:

    @Greg, nice! Too bad I need to patch htop, I’ll try it when I’ll have some free time. Did you submit it upstream, maybe it’ll get included on next release?

  5. [...] found this:…ght-commander/ I haven't tested it, but I plan to! Thanks for letting me that there are such things as skins [...]

Leave a Reply

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

5 × = thirty

CommentLuv badge