<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY mc-download-http "http://ftp.midnight-commander.org/mc-&mc-version;.tar.xz">
  <!ENTITY mc-download-ftp  "ftp://ftp.osuosl.org/pub/midnightcommander/mc-&mc-version;.tar.xz">
  <!ENTITY mc-md5sum        "d967caa12765eb86e52a6a63ca202500">
  <!ENTITY mc-size          "2.2 MB">
  <!ENTITY mc-buildsize     "71 MB (119 MB, running the test suite)">
  <!ENTITY mc-time          "0.7 SBU (additional 0.1 SBU, running the test suite)">
]>

<sect1 id="mc" xreflabel="MC-&mc-version;">
  <?dbhtml filename="mc.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-02-21 00:50:01 -0500 (Sat, 21 Feb 2015) $</date>
  </sect1info>

  <title>MC-&mc-version;</title>

  <indexterm zone="mc">
    <primary sortas="a-MC">MC</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to MC</title>

    <para><application>MC</application> (Midnight Commander) is a text-mode
    full-screen file manager and visual shell. It provides a clear,
    user-friendly, and somewhat protected interface to a Unix system while
    making many frequent file operations more efficient and preserving the
    full power of the command prompt.</para>

    &lfs77_checked;

    <!--<note><para>The download site uses a self-signed security certificate.
    You will need to accept it as valid to get the source code.</para></note>-->

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>Download (HTTP): <ulink url="&mc-download-http;"/></para>
      </listitem>
      <listitem>
        <para>Download (FTP): <ulink url="&mc-download-ftp;"/></para>
      </listitem>
      <listitem>
        <para>Download MD5 sum: &mc-md5sum;</para>
      </listitem>
      <listitem>
        <para>Download size: &mc-size;</para>
      </listitem>
      <listitem>
        <para>Estimated disk space required: &mc-buildsize;</para>
      </listitem>
      <listitem>
        <para>Estimated build time: &mc-time;</para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">MC Dependencies</bridgehead>

    <bridgehead renderas="sect4">Required</bridgehead>
    <para role="required">
      <xref linkend="glib2"/> and
      <xref linkend="pcre"/>
    </para>

    <bridgehead renderas="sect4">Recommended</bridgehead>
    <para role="recommended">
      <xref linkend="slang"/>
    </para>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend="doxygen"/>,
      <xref linkend="gpm"/>,
      <xref linkend="samba"/>,
      <xref linkend="unzip"/>,
      <xref linkend="x-window-system"/>, and
      <xref linkend="zip"/>
    </para>

    <para condition="html" role="usernotes">User Notes:
    <ulink url="&blfs-wiki;/MC"/></para>

  </sect2>

  <sect2 role="installation">
    <title>Installation of MC</title>

    <para>Install <application>MC</application> by
    running the following commands:</para>

<screen><userinput>./configure --prefix=/usr \
            --sysconfdir=/etc \
            --enable-charset &amp;&amp;
make</userinput></screen>

    <para>To test the results, issue: <command>make check</command>.</para>

    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>

<screen role="root"><userinput>make install &amp;&amp;
cp -v doc/keybind-migration.txt /usr/share/mc</userinput></screen>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para><parameter>--sysconfdir=/etc</parameter>: This switch places the
    global configureation directory in <filename
    class="directory">/etc</filename>.</para>

    <para><parameter>--enable-charset</parameter>: This switch adds support
    to <command>mcedit</command> for editing files in encodings different
    from the one implied by the current locale.</para>
<!-- currently broken
    <para><parameter>- -with-screen=ncurses</parameter>: This switch
    selects the screen library used by <application>MC</application>. It is only
    required if the optional <xref linkend="slang"/> package is not installed
    which is the default if found.</para>
-->
  </sect2>

  <sect2 role="configuration">
    <title>Configuring MC</title>

    <sect3 id="mc-config">
      <title>Config Files</title>

      <para><filename>~/.config/mc/*</filename></para>

      <indexterm zone="mc mc-config">
        <primary sortas="e-AA.config/.mc/*">~/.config/.mc/*</primary>
      </indexterm>

    </sect3>

    <sect3>
      <title>Configuration Information</title>

      <para>The <filename class="directory">~/.config/mc</filename> directory and
      its contents are created when you start <command>mc</command> for the
      first time. Then you can edit the main <filename>~/.config/mc/ini</filename>
      configuration file manually or through the <application>MC</application>
      shell. Consult the mc(1) man page for details.</para>

      <note><para> On 8.x versions of <application>mc</application>,
      keybind names used in mc.keymap.* files are changed.  This is
      described in <filename>keybind-migration.txt</filename>.</para></note>

    </sect3>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>mc and the symlinks mcdiff, mcedit and mcview</seg>
        <seg>None</seg>
        <seg>/etc/mc, /usr/libexec/mc, and /usr/share/mc</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="conssaver">
        <term><command>cons.saver</command></term>
        <listitem>
          <para>is used internally by <command>mc</command> for saving and
          restoring the text behind the panels on Linux text console.</para>
          <indexterm zone="mc conssaver">
            <primary sortas="b-conssaver">cons.saver</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mc-prog">
        <term><command>mc</command></term>
        <listitem>
          <para>is a visual shell.</para>
          <indexterm zone="mc mc-prog">
            <primary sortas="b-mc">mc</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mcedit">
        <term><command>mcedit</command></term>
        <listitem>
          <para>is an internal file editor.</para>
          <indexterm zone="mc mcedit">
            <primary sortas="b-mcedit">mcedit</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mcdiff">
        <term><command>mcdiff</command></term>
        <listitem>
          <para>is an internal visual diff tool.</para>
          <indexterm zone="mc mcdiff">
            <primary sortas="b-mcdiff">mcdiff</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mcview">
        <term><command>mcview</command></term>
        <listitem>
          <para>is an internal file viewer.</para>
          <indexterm zone="mc mcview">
            <primary sortas="b-mcview">mcview</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
