[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[52d29f7] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[2571cae1] | 7 | <!ENTITY mc-download-http "http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-&mc-version;.tar.gz">
|
---|
[3cd5c69] | 8 | <!ENTITY mc-download-ftp "ftp://ftp.uni-koeln.de/util/shell/mc-&mc-version;.tar.gz">
|
---|
| 9 | <!ENTITY mc-md5sum "18b20db6e40480a53bac2870c56fc3c4">
|
---|
| 10 | <!ENTITY mc-size "3.8 MB">
|
---|
| 11 | <!ENTITY mc-buildsize "29 MB">
|
---|
| 12 | <!ENTITY mc-time "0.4 SBU">
|
---|
[52d29f7] | 13 | ]>
|
---|
| 14 |
|
---|
[2082ebf6] | 15 | <sect1 id="mc" xreflabel="MC-&mc-version;">
|
---|
[2571cae1] | 16 | <?dbhtml filename="mc.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>MC-&mc-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="mc">
|
---|
| 26 | <primary sortas="a-MC">MC</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to MC</title>
|
---|
| 31 |
|
---|
[539ace5] | 32 | <para><application>MC</application> (Midnight Commander) is a text-mode
|
---|
[3cd5c69] | 33 | full-screen file manager and visual shell. It provides a clear,
|
---|
| 34 | user-friendly, and somewhat protected interface to a Unix system while
|
---|
| 35 | making many frequent file operations more efficient and preserving the
|
---|
| 36 | full power of the command prompt.</para>
|
---|
| 37 |
|
---|
[2571cae1] | 38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 39 | <itemizedlist spacing="compact">
|
---|
| 40 | <listitem>
|
---|
| 41 | <para>Download (HTTP): <ulink url="&mc-download-http;"/></para>
|
---|
| 42 | </listitem>
|
---|
| 43 | <listitem>
|
---|
| 44 | <para>Download (FTP): <ulink url="&mc-download-ftp;"/></para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>Download MD5 sum: &mc-md5sum;</para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download size: &mc-size;</para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Estimated disk space required: &mc-buildsize;</para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Estimated build time: &mc-time;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | </itemizedlist>
|
---|
| 59 |
|
---|
[3a575ab5] | 60 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 61 | <itemizedlist spacing="compact">
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>Required patch: <ulink
|
---|
| 64 | url="&patch-root;/mc-&mc-version;-bash32-1.patch"/></para>
|
---|
| 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
| 67 | <para>Recommended Patch: <ulink
|
---|
| 68 | url="&patch-root;/mc-&mc-version;-debian_fixes-1.patch"/></para>
|
---|
| 69 | </listitem>
|
---|
| 70 | </itemizedlist>
|
---|
| 71 |
|
---|
| 72 | <bridgehead renderas="sect3">Do I Need the Debian Patch?</bridgehead>
|
---|
| 73 | <para>Midnight Commander without the Debian patch is completely unusable
|
---|
| 74 | in multibyte locales because it assumes that characters and
|
---|
| 75 | bytes are the same thing. The issue manifests itself as massive screen
|
---|
[f0801a2d] | 76 | content corruption similar to what is depicted in
|
---|
[3a575ab5] | 77 | <ulink url="&files-anduin;/mc-bad.png">this screenshot</ulink>
|
---|
| 78 | (taken in the ru_RU.UTF-8 locale). For a general discussion of this type
|
---|
[a4b9cd7] | 79 | of issue, see the <xref linkend="locale-wrong-multibyte-characters"/>
|
---|
| 80 | section of the <xref linkend="locale-issues"/> page. The Debian patch
|
---|
[3a575ab5] | 81 | mostly fixes this issue, and adds support for recoding remote FTP
|
---|
| 82 | filenames. Debian also fixed 64-bit issues, rare segfaults in
|
---|
| 83 | <command>mcedit</command>, and improved syntax highlighting.</para>
|
---|
[29f80ebc] | 84 |
|
---|
[3a575ab5] | 85 | <para>If you do not use a multibyte locale and do not need any of the new
|
---|
| 86 | features or fixes, the patch is still supposed to be harmless.
|
---|
| 87 | However, the patch changes the dependencies and build instructions, and
|
---|
| 88 | in the past it caused unacceptable regressions for non-UTF-8 locale users.
|
---|
| 89 | Thus, failsafe instructions without the patch are left in the book just
|
---|
| 90 | in case. Due to the size and unofficial nature of the patch, please
|
---|
[f0801a2d] | 91 | do not report bugs in the patched <application>MC</application> to the
|
---|
| 92 | original <application>MC</application> developers.</para>
|
---|
[3a575ab5] | 93 |
|
---|
[2571cae1] | 94 | <bridgehead renderas="sect3">MC Dependencies</bridgehead>
|
---|
| 95 |
|
---|
| 96 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[3a575ab5] | 97 | <para role="required"><xref linkend="GLib"/> (untested with Debian patch) or
|
---|
[3cd5c69] | 98 | <xref linkend="glib2"/></para>
|
---|
[2571cae1] | 99 |
|
---|
| 100 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[56762b82] | 101 | <para role="optional"><xref linkend="gpm"/>,
|
---|
[e77976f] | 102 | <xref linkend="x-window-system"/>,
|
---|
[2571cae1] | 103 | <xref linkend="samba3"/>,
|
---|
[3a575ab5] | 104 | <xref linkend="slang"/> (required when building with Debian patch),
|
---|
[2571cae1] | 105 | <xref linkend="zip"/>,
|
---|
[3cd5c69] | 106 | <xref linkend="unzip"/>, and
|
---|
[dcd55b37] | 107 | <!-- <xref linkend="gnome-libs"/> -->
|
---|
[6e5fd759] | 108 | <ulink url="&gnome-download-http;/gnome-libs/1.4/">GNOME
|
---|
[dcd55b37] | 109 | Libraries-1.4</ulink></para>
|
---|
[2571cae1] | 110 |
|
---|
[1039de3] | 111 | <para condition="html" role="usernotes">User Notes:
|
---|
[6c42d4e] | 112 | <ulink url="&blfs-wiki;/MC"/></para>
|
---|
[1039de3] | 113 |
|
---|
[2571cae1] | 114 | </sect2>
|
---|
| 115 |
|
---|
| 116 | <sect2 role="installation">
|
---|
| 117 | <title>Installation of MC</title>
|
---|
| 118 |
|
---|
[f0801a2d] | 119 | <para>Fix incompatibility of <application>MC</application>-&mc-version;
|
---|
| 120 | with <application>Bash</application>-3.2:</para>
|
---|
| 121 |
|
---|
[3a575ab5] | 122 | <screen><userinput>patch -Np1 -i ../mc-&mc-version;-bash32-1.patch</userinput></screen>
|
---|
| 123 |
|
---|
| 124 | <para>If desired, apply Debian fixes:</para>
|
---|
[f0801a2d] | 125 |
|
---|
[3a575ab5] | 126 | <screen><userinput>patch -Np1 -i ../mc-&mc-version;-debian_fixes-1.patch</userinput></screen>
|
---|
| 127 |
|
---|
[2571cae1] | 128 | <para>Install <application>MC</application> by
|
---|
| 129 | running the following commands:</para>
|
---|
| 130 |
|
---|
[3a575ab5] | 131 | <screen><userinput>CPPFLAGS="-DUTF8" ./configure --prefix=/usr \
|
---|
| 132 | --enable-charset &&
|
---|
[f0801a2d] | 133 | make</userinput></screen>
|
---|
[3a575ab5] | 134 |
|
---|
[f0801a2d] | 135 | <para><application>MC</application> with Debian patches expects its
|
---|
| 136 | documentation to be stored in UTF-8 encoding on disk, and automatically
|
---|
| 137 | converts it to the locale encoding when displaying on the terminal. This
|
---|
| 138 | is different from the expectations of the unpatched
|
---|
| 139 | <application>MC</application>, so the documentation files have to be
|
---|
[3a575ab5] | 140 | converted if (and only if) the Debian patch has been applied:</para>
|
---|
[f0801a2d] | 141 |
|
---|
[3a575ab5] | 142 | <screen><userinput>convert-mans ISO-8859-1 UTF-8 lib/mc.hint{,.es,.it,.nl} &&
|
---|
| 143 | convert-mans ISO-8859-2 UTF-8 lib/mc.hint{.cs,.hu,.pl} &&
|
---|
| 144 | convert-mans ISO-8859-5 UTF-8 lib/mc.hint.sr &&
|
---|
| 145 | convert-mans KOI8-R UTF-8 lib/mc.hint.ru &&
|
---|
| 146 | convert-mans KOI8-U UTF-8 lib/mc.hint.uk &&
|
---|
| 147 | convert-mans BIG5 UTF-8 lib/mc.hint.zh &&
|
---|
| 148 | convert-mans ISO-8859-1 UTF-8 doc/{es,it}/mc.hlp.* &&
|
---|
| 149 | convert-mans ISO-8859-2 UTF-8 doc/{hu,pl}/mc.hlp.* &&
|
---|
| 150 | convert-mans ISO-8859-5 UTF-8 doc/sr/mc.hlp.sr &&
|
---|
| 151 | convert-mans KOI8-R UTF-8 doc/ru/mc.hlp.ru</userinput></screen>
|
---|
[7f78b6f] | 152 |
|
---|
[b4054a8] | 153 | <para>This package does not come with a test suite.</para>
|
---|
[bccbdaea] | 154 |
|
---|
[7f78b6f] | 155 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 156 |
|
---|
[3a575ab5] | 157 | <screen role="root"><userinput>make install &&
|
---|
| 158 | chmod 1755 /usr/lib/mc/cons.saver</userinput></screen>
|
---|
| 159 |
|
---|
| 160 | </sect2>
|
---|
| 161 |
|
---|
| 162 | <sect2 role="commands">
|
---|
| 163 | <title>Command Explanations</title>
|
---|
[29f80ebc] | 164 |
|
---|
[3a575ab5] | 165 | <para><parameter>CPPFLAGS="-DUTF8"</parameter>: This parameter activates
|
---|
[f0801a2d] | 166 | UTF-8 support in the Debian patch and has no effect without this
|
---|
| 167 | patch.</para>
|
---|
[3a575ab5] | 168 |
|
---|
| 169 | <para><parameter>--enable-charset</parameter>: This option adds support
|
---|
[f0801a2d] | 170 | to <command>mcedit</command> for editing files in encodings different
|
---|
| 171 | from the one implied by the current locale. This feature works in
|
---|
| 172 | non-UTF-8 locales only, even with the Debian patch.</para>
|
---|
[29f80ebc] | 173 |
|
---|
[3a575ab5] | 174 | <para><parameter>--with-screen=(slang|mcslang|ncurses)</parameter>: This
|
---|
[f0801a2d] | 175 | parameter selects the screen library used by <application>MC</application>.
|
---|
| 176 | <application>NCurses</application> support is
|
---|
[3a575ab5] | 177 | currently buggy (MC does not handle mouse events in xterm correctly).
|
---|
| 178 | UTF-8 support in the Debian patch is functional
|
---|
| 179 | only when external <xref linkend="slang"/> is used as a screen library
|
---|
| 180 | (this is the default).</para>
|
---|
[29f80ebc] | 181 |
|
---|
[f0801a2d] | 182 | <para><parameter>--with-codepagedir=DIR</parameter>: This parameter was
|
---|
| 183 | useful only with <application>SAMBA</application>-2.x. New versions of
|
---|
| 184 | <application>SAMBA</application> do not have codepage files.</para>
|
---|
[29f80ebc] | 185 |
|
---|
[3a575ab5] | 186 | <para><command>chmod 1755 /usr/lib/mc/cons.saver</command>: The
|
---|
[f0801a2d] | 187 | <command>cons.saver</command> program has to be installed setuid
|
---|
| 188 | root, because on LFS regular users have no access to
|
---|
| 189 | <filename>/dev/vcsa*</filename> devices. This step is optional if
|
---|
| 190 | <application>MC</application> is going to be started from X terminal
|
---|
| 191 | emulators or <command>ssh</command> sessions only (thus rendering the
|
---|
| 192 | <command>cons.saver</command> binary completely unneeded).</para>
|
---|
[3a575ab5] | 193 |
|
---|
| 194 | <!-- Other distributions make the devices owned by the vcsa group
|
---|
| 195 | and make the cons.saver program setgid vcsa instead -->
|
---|
[2571cae1] | 196 |
|
---|
| 197 | </sect2>
|
---|
| 198 |
|
---|
| 199 | <sect2 role="configuration">
|
---|
| 200 | <title>Configuring MC</title>
|
---|
| 201 |
|
---|
| 202 | <sect3 id="mc-config">
|
---|
| 203 | <title>Config Files</title>
|
---|
| 204 |
|
---|
| 205 | <para><filename>~/.mc/*</filename></para>
|
---|
| 206 |
|
---|
| 207 | <indexterm zone="mc mc-config">
|
---|
| 208 | <primary sortas="e-AA..mc/*">~/..mc/*</primary>
|
---|
| 209 | </indexterm>
|
---|
| 210 |
|
---|
| 211 | </sect3>
|
---|
| 212 |
|
---|
| 213 | <sect3>
|
---|
| 214 | <title>Configuration Information</title>
|
---|
| 215 |
|
---|
| 216 | <para>The <filename class="directory">~/.mc</filename> directory and
|
---|
| 217 | its contents are created when you start <command>mc</command> for the
|
---|
[0619e6d] | 218 | first time. Then you can edit the main <filename>~/.mc/ini</filename>
|
---|
| 219 | configuration file manually or through the <application>MC</application>
|
---|
[2571cae1] | 220 | shell. Consult the mc(1) man page for details.</para>
|
---|
| 221 |
|
---|
| 222 | </sect3>
|
---|
| 223 |
|
---|
| 224 | </sect2>
|
---|
| 225 |
|
---|
| 226 | <sect2 role="content">
|
---|
| 227 | <title>Contents</title>
|
---|
| 228 |
|
---|
| 229 | <segmentedlist>
|
---|
| 230 | <segtitle>Installed Programs</segtitle>
|
---|
| 231 | <segtitle>Installed Libraries</segtitle>
|
---|
| 232 | <segtitle>Installed Directories</segtitle>
|
---|
| 233 |
|
---|
| 234 | <seglistitem>
|
---|
[3a575ab5] | 235 | <seg>cons.saver, mc, mcedit, mcmfmt, and mcview</seg>
|
---|
[2571cae1] | 236 | <seg>None</seg>
|
---|
[b4054a8] | 237 | <seg>/usr/share/mc and /usr/lib/mc</seg>
|
---|
[2571cae1] | 238 | </seglistitem>
|
---|
| 239 | </segmentedlist>
|
---|
| 240 |
|
---|
| 241 | <variablelist>
|
---|
| 242 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 243 | <?dbfo list-presentation="list"?>
|
---|
| 244 | <?dbhtml list-presentation="table"?>
|
---|
| 245 |
|
---|
[3a575ab5] | 246 | <varlistentry id="conssaver">
|
---|
| 247 | <term><command>cons.saver</command></term>
|
---|
| 248 | <listitem>
|
---|
| 249 | <para>is used internally by <command>mc</command> for saving and
|
---|
[f0801a2d] | 250 | restoring the text behind the panels on Linux text console.</para>
|
---|
[3a575ab5] | 251 | <indexterm zone="mc conssaver">
|
---|
| 252 | <primary sortas="b-conssaver">cons.saver</primary>
|
---|
| 253 | </indexterm>
|
---|
| 254 | </listitem>
|
---|
| 255 | </varlistentry>
|
---|
| 256 |
|
---|
[2571cae1] | 257 | <varlistentry id="mc-prog">
|
---|
| 258 | <term><command>mc</command></term>
|
---|
| 259 | <listitem>
|
---|
| 260 | <para>is a visual shell.</para>
|
---|
| 261 | <indexterm zone="mc mc-prog">
|
---|
| 262 | <primary sortas="b-mc">mc</primary>
|
---|
| 263 | </indexterm>
|
---|
| 264 | </listitem>
|
---|
| 265 | </varlistentry>
|
---|
| 266 |
|
---|
| 267 | <varlistentry id="mcedit">
|
---|
| 268 | <term><command>mcedit</command></term>
|
---|
| 269 | <listitem>
|
---|
| 270 | <para>is an internal file editor.</para>
|
---|
| 271 | <indexterm zone="mc mcedit">
|
---|
| 272 | <primary sortas="b-mcedit">mcedit</primary>
|
---|
| 273 | </indexterm>
|
---|
| 274 | </listitem>
|
---|
| 275 | </varlistentry>
|
---|
| 276 |
|
---|
[3a575ab5] | 277 | <varlistentry id="mcmfmt">
|
---|
| 278 | <term><command>mcmfmt</command></term>
|
---|
| 279 | <listitem>
|
---|
[f0801a2d] | 280 | <para>is used internally by <command>mcview</command> when viewing
|
---|
| 281 | mailbox files.</para>
|
---|
[3a575ab5] | 282 | <indexterm zone="mc mcmfmt">
|
---|
| 283 | <primary sortas="b-mcmfmt">mcmfmt</primary>
|
---|
| 284 | </indexterm>
|
---|
| 285 | </listitem>
|
---|
| 286 | </varlistentry>
|
---|
| 287 |
|
---|
[2571cae1] | 288 | <varlistentry id="mcview">
|
---|
| 289 | <term><command>mcview</command></term>
|
---|
| 290 | <listitem>
|
---|
| 291 | <para>is an internal file viewer.</para>
|
---|
| 292 | <indexterm zone="mc mcview">
|
---|
| 293 | <primary sortas="b-mcview">mcview</primary>
|
---|
| 294 | </indexterm>
|
---|
| 295 | </listitem>
|
---|
| 296 | </varlistentry>
|
---|
| 297 |
|
---|
| 298 | </variablelist>
|
---|
| 299 |
|
---|
| 300 | </sect2>
|
---|
[2082ebf6] | 301 |
|
---|
| 302 | </sect1>
|
---|