Xoria256 color scheme for Midnight Commander

Published on January 10, 2011

Xoria256 color scheme for Midnight Commander


I hasten to share the Xoria256 color scheme for Midnight Commander , which I made using the same name scheme for the vim editor .

For those who do not know what Midnight Commander is, this is a popular two-panel file manager for UNIX systems (including Linux and Mac OS X). It works in text mode, which makes it indispensable for visualizing the file system and file operations on a remote UNIX system without loading the SSH connection.

To use the scheme, you need the following:

1. The terminal emulator program with support for 256 colors
  • for UNIX systems with an X11 server, xterm , gnome-terminal , konsole , rxvt-unicode (with a patch) and others are suitable ;
  • for Windows, you can use PuTTY (you must enable the use of 256 colors in the settings);
  • for Mac OS X, iTerm / iTerm2 plus the terminals listed above (UNIX + X11) will work.

2. Midnight Commander assembled from git

Update: romeo_ordos habrayuzer offers ready-made build (.deb) for Debian (x86_64).
Update: lybin's habraiser suggests that everything is simple in ArchLinux with yaourt installed - $> sudo yaourt -S mc-git

The fact is that mc developers added support for 256 colors only in the last days of December 2010, after the release of 4.7.5.

Mini-instruction “how to build mc from git” We

clone the git program repository (on a UNIX computer):
$> git clone git://midnight-commander.org/mc.git

Set up assembly scripts: This may cause problems in Ubuntu, it may help you: Set the installation path (you can replace it with your own):
$> cd mc.git
$> ./autogen.sh

$> sudo apt-get install autopoint libslang2-dev

$> INSTALL_DIR="/usr/local/mc-git-$(date +%Y-%m-%d)"

For Mac OS X with macports add:
$> export CFLAGS="-I/opt/local/include -L/opt/local/lib"

Run the configuration:
$> ./configure --prefix="$INSTALL_DIR"
At this stage, you need to carefully look at the output of the previous command, the configuration script may not find any dependencies on your system - fix it and try again.

If everything is in order - compile mc:
$> make
Warning - there may be compilation errors if something is “wrong” in the system.

Finally, install in the INSTALL_DIR directory : You can run it directly from INSTALL_DIR : Or you can create a couple of symbolic links once: Warning - in FreeBSD / usr / local / bin / may contain mc binaries installed using the ports system. Trying in turn:
$> sudo make install

$> "$INSTALL_DIR"/bin/mc

$> sudo ln -s "$INSTALL_DIR"/bin/* /usr/local/bin/

$> mc
$> mcedit
$> mcview
$> mcdiff

Since we installed mc in a separate directory of the form / usr / local / mc-git-2011-01-10 , in which case, we can simply delete it (do not forget about symbolic links) without any consequences for the system, thus install several versions of the program at once, changing only the INSTALL_DIR value . By the way, this is true for most programs under UNIX.

3. Environment variable TERM = xterm-256color

Ensure that the TERM environment variable (indicating the type of terminal) is set to “xterm-256color”.

You can check with the command:
$> env | grep TERM=

To assign TERM permanently, usually add this line to the .profile file in the user's home directory:
export TERM=xterm-256color

Or you can specify TERM for only one application at startup.
Like this:
$> TERM=xterm-256color mc

Or like this:
$> env TERM=xterm-256color mc

4. File with color settings - xoria256.ini

Update: On January 12, 2011, the Xoria256 skin was added to the master branch of the git repository, so if you just installed mc from git, you already have this skin, you don’t need to do anything else.

Create the directory ~ / .mc / skins /
$> mkdir -p ~/.mc/skins

Copy the xoria256.ini file to this directory: Or like this: Everything, you can use it to indicate the theme explicitly: Or by specifying a new theme in the file ~ / .mc / ini Find the line like “skin = default "And replace with" skin = xoria256 "
$> cd ~/.mc/skins
$> wget "http://dl.dropbox.com/u/4663634/mc-xoria256-skin/xoria256.ini"

$> curl "http://dl.dropbox.com/u/4663634/mc-xoria256-skin/xoria256.ini" > ~/.mc/skins/xoria256.ini

$> mc -S xoria256

$> mcedit ~/.mc/ini

$> mc


Thanks for attention.

I express gratitude to the Midnight Commander development team and Dmitry Zotikov (author of the Xoria256 color theme for vim).