GNU Midnight Commander
- Answers - Sitemap - Feedback |
The [NEW] tag marks the sections which have been added recently.
The [UPDATED] tag marks the sections which have been updated recently.
For more thorough description take a look at the announcement of Midnight Commander 4.0.
Midnight Commander uses GNU autoconfigure which can automatically configure Midnight Commander for use on almost any (if not every) Unix clone. Following configurations have been tested:
There is also a preliminary Ms-Dos port at http://www.gnome.org/cgi-bin/mc/download/DOS/.html (but no Ms-Dos binary).
Windows 95/NT port is compiled with Microsoft Visual C++ but it is possible to compile with cygwin32, too.
Because Midnight Commander is a full screen program it doesn't run on dummy terminals but anything more advanced will do (like vt100). If your terminal works with vi, emacs, elm or pine it will work with Midnight Commander.
The XView and Tk editions currently under development will require an X terminal.
If you want to use mouse on the Linux console you need General Purpose Mouse server from iride.unipv.it: /pub/gpm/. You need nothing extra to use mouse on xterm.
To compile the XView edition (currently under development) you need XView library. Xpm library and X11 non-rectangular shape extensions are recommended.
To compile the Tk edition (currently under development) you need Tk-4.0 libraries. Compilation of the Tk version won't be easy. Contact Miguel for details.
If you do not want to use the slang library you could try using ncurses (but this is not recommended).
You can get it along with other curses libraries, too, but results may not be pretty or even usable.
Midnight Commander is nowadays officially a part of GNU project. All the authors of the Midnight Commander have given all their rights on the program to the Free Software Foundation.
In short: the main site is ftp://ftp.nuclecu.unam.mx/linux/local/ and the sunsite.unc.edu mirrors have MC in the pub/Linux/utils/file/managers/mc directory.
C stands for the Ctrl key. For example, C-f means that you should hold down the Ctrl key and press the f key.
M stands for the Meta key. Your terminal might call it Alt or Compose instead of Meta. For example, M-f means that you should hold down the Meta/Alt/Compose key and press the f key. If your terminal doesn't have Meta, Alt or Compose or they don't work you can use Esc. For M-f press the Esc key and then press the f key.
F? stands for a function key. If your terminal doesn't have function keys or they don't work you can use Esc. For example, for F3 press the Esc key and then press the 3 key.
If the result is "using the S-Lang library with termcap database" you should fix your /etc/termcap database.
Better termcap and terminfo databases are available here:
http://sagan.earthspace.net/~esr/terminfo/You can select whether Midnight Commander will use terminfo or termcap database by giving --with-terminfo or --with-termcap option to the configure. Default is terminfo if found, otherwise termcap.
If you don't have permissions to edit terminal databases you can use Learn keys feature of Midnight Commander instead. Press Esc 9 o k and follow instructions.
If all else fails you can emulate function keys by first pressing the ESC key and then one of the number keys. For example, if you want to produce F9, press ESC, then 9. If you don't have a ESC key on your keyboard you can try alt-9 or meta-9.
Note! Windows 95/NT and OS/2 ports use F11 and F12 keys to change the current disk drive. In this case F11 and F12 mean the real F11 and F12 keys, not shift-F1 and shift-F2.
X terminals allow more control over keyboard, so these ESC limitations might not concern the forthcoming XView and Tk editions of the Midnight Commander.
The plus key is the hotkey for the select files command. If you want to add a literal plus on to the command line you must quote it by pressing C-q first.
Another common key which needs the C-q prefix is backslash "\".
The "c1" key is the key which has the "c1" caption on it.
If you have to ask what these two keys are your keyboard hasn't probably got them. Actually, I have never seen a keyboard which has got them.
Alternatively, on Linux console you can use GPM.
In the tk and xview editions you can access the extension dependent pop-up menu by pressing the right mouse button.
You could try using a different terminal setting. If you use csh or tcsh:
setenv TERM vt100or if you use sh, bash, ksh or zsh:
export TERM=vt100If this doesn't help you can recompile MC to use termcap instead of terminfo:
./configure --with-termcap
make
In general, there are three subcases:
+---------+ | | +---------+This also happens when you use the -a option. Other than that possible reason is 1, 2 or 3 (see below).
lqqqqqqqqqk x x mqqqqqqqqqjPossible reason is 2 or 3 (see below).
acsc=a\376k\277l\332m\300j\331n\305w\302v\301u\264t\303q\304x\263h\2600\333
Don't forget issue 'tic' command. This supposes you are using pc character set. The octal values might be different for other character sets. If you are using termcap instead of terminfo, you should modify above solution appropriately.
Here is Miguel's answer to Torben on this subject.
Torben:
When I load consolefonts/iso01.f16, I get perfectly right national characters, but the line drawing characters in mc get wrong. Is it a mc problem, or is it a problem with the font? (I guess it is).Miguel:Is there a trick?
First of all, we should determine whether the font has line drawing characters or not.If it has line drawing characters, then a new terminfo entry should be written for this specific case. Let's call this linux-iso01. The acsc variable should be modified to reflect which characters are used to do the line drawing.
If it does not have line drawing characters, then we should get rid of the switch to acsc sequences and make the acsc sequence be just a mapping to the ugly +, -, |, - characters.
You can get your terminfo definition by running the infocmp program, making the proper changes and running the tic program to compile your new terminfo database.
For font, if you use xterm try "xterm -fn fixed".
For termcap/terminfo database, change the acsc capability in the database.
From the Options - Display Bits dialog select Full 8 bits or ISO 8859-1. In addition, select 8 bit input from the same dialog.
If you get colors, be happy.
If your terminal stays black and white, your terminal doesn't support color. You might want to upgrade to a terminal which compatible with the ANSI color sequences.
If your terminal goes compelety black, see the next question.
More detailed answer:
First, check that your terminal supports color. Color_xterm, rxvt and Linux console do support, most other terminals don't. You can test color support with following simple C program:
#include <stdio.h> int main (void){ printf ("\033[32m Hello world! \033[m\n"); return 0; }Compile and run it. If you see "Hello world!" text in green your terminal supports color, otherwise not (however, for color_xterm see also the next question).
Second, check that you are using Ncurses or the Slang library (type "mc -V" to find out), in addition some System V curses implementations do support color, most don't.
With Slang library you can force color support by setting the environment variable COLORTERM to any value.
Third, if you use ncurses library, check that your terminfo database supports color. If not you should install one of the enhanced terminfo databases included in the Midnight Commander source distribution.
Fourth, you might want to set the TERM environment variable so that you use the correct terminfo database or termcap entry.
If you use color_xterm (or rxvt) the correct value might be xterm-color, xtermc or simply xterm.
If you use Linux console the correct value for TERM is linux or console.
You will have to override the defaults. Create a file "color.defaults" which has the following contents:
color_xterm*color0: Black color_xterm*color1: Red color_xterm*color2: Green color_xterm*color3: Yellow color_xterm*color4: Blue color_xterm*color5: Magenta color_xterm*color6: Cyan color_xterm*color7: White color_xterm*background: White color_xterm*foreground: Black(replace color_xterm with the name of your color_xterm, color_xterm mentions its name in its title bar)
Now type:
xrdb -merge color.defaultsAlternatively you can add the suggested contents of the color.defaults file to your .Xdefaults or .Xresources file (or what ever the name of your X configuration file is). Or you can replace your non-ANSI color_xterm with an ANSI color_xterm.
Alternatively, rxvt is a better choice, see http://www.gnome.org/cgi-bin/mc/download/rxvt/.html
Example: If you have set TERM to xterm-color locate from /etc/termcap the line which starts:
xterm|vs100|xterm terminal emulatorChange it to start:
xterm|xterm-color|vs100|xterm terminal emulator
You can configure which terminal database you want to use with the "--with-termcap" and "--with-terminfo" flags of configure. If you don't specify them, the configure script will try to use terminfo if available otherwise it will use termcap.
Get the newest development version, give the "--with-xview" or "--with-tk" option to the configure and otherwise compile as usual. See Download.
Xview and Tk editions are work in progress, they are not as robust as the text mode edition.
Since version 4.1.15 all the input widgets have permanent history. You can summon the history listbox by pressing M-h.
Switch to bash or zsh. They are both quite compatible with ksh. Your ksh functions should work as such or after minimal changes.
Another way to add functionality is the external panelize feature. See http://www.gnome.org/mc/manual-d.html#4 for more info.
And finally, you can code any feature you want yourself. MC source code is free which means you can change it anyway you want. There are some limitations to make sure MC stays free. See GNU General Public License for details.
Note! Virtual file systems are supported by Unix ports only. The Windows 95/NT and OS/2 ports do NOT support virtual file systems. This means you haven't got ftp, zip or tar support on Windows 95/NT and OS/2.
If you use mouse just doubleclick on the tar file.
If these procedures don't work, your .mc.ext file is faulty. Replace it with one from the MC source distribution.
You can also enter a tar archive by typing "cd tar:filename.tar.gz" where filename.tar.gz is the name of the archive.
The recognized suffixes for tar archives are .tar, .tar.gz and .tgz. If your tar archive uses different suffix you have to rename it.
Internally Midnight Commander closes ftp connection only after a timeout. This isn't visible to the end user.
You can use C-r to force an update.
Alternatively add the line
use_internal_edit=1under the [Midnight-Commander] section in your .mc.ini file (which is in your home directory).
To make the editor work all the time, go to the default/* section in the file lib/mc/mc.ext file and remove the line
Edit=%var{EDITOR:vi} %fThe internal editor will now be invoked for anything not specified elsewhere in the mc.ext file.
Make sure that you edit the correct mc.ext file. The Midnight Commander first checks the existance of $HOME/.mc.ext. If this file is missing MC will use $prefix/lib/mc/mc.ext instead ($prefix can be changed with configure before compilation and it defaults to /usr/local).
When you run `F9/Command/Extension file edit' for the very first time Midnight Commander copies the system-wide mc.ext from $prefix/lib/mc into your home directory because you need write access in order to change it.
And please don't forget that "make install" overwrites $prefix/lib/mc/mc.ext.
If the newfile doesn't exist, mcedit fails.
Start mcedit with no parameters, this will create a blank file. Then save the file with whatever name you like.
This bug has been fixed since 4.1.17.
Uid and gid is fixed since 4.0.1. "Preserve UIDs/GIDs" in the copy dialog needs to be checked and you must be root.
Date problem is supposed to be fixed with 4.0.13.
Since version 4.0.6 you can specify the actual location of the Midnight Commander configuration files with the MCHOME environment variable.
If disabling subshell doesn't help, try to reconfigure MC with "--with-our-slang" and "--with-termcap" options and recompile. If this helps, there is something wrong with your terminfo database or shared slang library. For better terminfo databases see chapter 4. For a better slang library, upgrade to a newer version or keep using the "--with-our-slang" option.
This problem can also be caused by gpm as noted by Luis Espinoza:
In regards to why midnight commander does nothing when invoked. I recently had the same problem. At the same time gpm was not loading properly with my patched kernel (now 2.0.33 from 2.0.30). Downloading version 1.13 of gpm, and got it working :-) MC still appeared locked.... However moving the mouse, brought MC to life. The mouse I am using is a Kensington Expert Mouse (Trackball).
This bug will probably be fixed in 4.1.6.
The photographs of the authors are available as:
http://www.gnome.org/mc/about.htmlMany people have contributed bug reports, feature suggestions and small code bits (alphabetical order):
Send your report/request to mc-devel@roxanne.nuclecu.unam.mx or mc@roxanne.nuclecu.unam.mx. These mailing lists are the most certain way to contact the developers. Remember to mention if you are not on the mailing list to make sure that you will receive a copy of replies.
Give as much details as possible. A too long message is a lot better than a too short message.
For segmentation faults a stack backtrace is appreciated. You can produce stack backtrace as follows:
Note that the authors of the Midnight Commander have given all their rights on the program to the Free Software Foundation. You will have to do the same if you contribute non-trivial patches. Otherwise we have to reject your patches in order to avoid copyright problems.
Upgrade to a newer version of Midnight Commander. Many problems are fixed in the new versions.
If you still can't find an answer, post your question to the Midnight Commander mailing list. Its address is mc@nuclecu.unam.mx.
subscribe <list-name> [optional-address]Replace <list-name> with the name of the list you want to subscribe and [optional-address] with your email address.
http://www.gnome.org/mc/The WWW page features MC screen shots, photographs of the authors, mailing list archive and a few other things.
This document is available in ASCII format in the Midnight Commander source package.
Send your comments about this document to janne@gnome.org
Send your comments about the Midnight Commander to mc@nuclecu.unam.mx
You can use Questions and Answers according to GNU Public License (see the COPYING file in the Midnight Commander source distribution). Questions and Answers is not public domain.
GNU Midnight Commander
- Answers | - Sitemap - Feedback |