When you suffer enough, you will want to change. Nobody likes suffering. I’m a huge fan of MC but one thing troubled me for months: when I quit MC and restart it, it doesn’t remember the last directories in the left and right panels.
As it was driving me crazy, finally I decided to look after the problem. As usual, the solution was just 1 minute away.
A quick Google search dropped out this thread. That is:
Menu->Options->Panel options... [x] Auto save panels setup
Copy the name of the current file to the mini shell:
“Esc+Enter” (i.e. press Esc, release, then press Enter)
I already knew this. Here are some new ones that I learned today:
The one above has an alternative shortcut:
Paste to the shell the path of the selected panel:
“Esc+a” or “Ctrl+x p”
Paste to the shell the path of the unselected (other) panel:
“Esc+A” or “Ctrl+x Ctrl+p”
These are actually in the man page, so it would be a good idea to read it once :)
Thanks to Andrew B. on the mc mailing list.
I use Midnight Commander a lot and F9 in MC means: “go to the top menu bar“. However, Unity steals F9 and activates a widget layer. By default this layer is empty, so you only see that the screen greys out.
How to disable this shit?
ccsm“, find the Desktop section and untick “Widget Layer“. Done.
In Midnight Commander, you want to see the same folder in the other panel.
Alt + i
It can also be a good idea to run through the manual for more tricks: “
man mc” :)
After I upgraded Ubuntu to 12.04, I also updated mc from source. The current stable version is 184.108.40.206. However, these recent versions of mc introduced some novelties. For instance, using the old mc.ext files, they won’t open archives :(
Another novelty is that the folder of mc was moved from “
~/.mc” to “
~/.config/mc“. So I moved my
mc.ext file to the new location. I also had a symbolic link called “
bindings” that pointed to
mc.ext, it was moved too. Then I removed the obsolete folder
Now, update your mc.ext file to the new format in order to open archives:
cd ~/.config/mc mv mc.ext mc.ext.old cat mc.ext.old | sed 's|\(Open.*\)#\(.*\)$|\1/\2://|' > mc.ext
Restart mc and opening the archives should work now.
This tip is from here.
With mc, you want to copy lots of small files to an NTFS partition. However, for every file it drops a warning: “cannot chmod target file”. Either you switch to root or you sit next to the keyboard and press Skip for every single file. WTF?
When you press F5, untick the option “Preserve attributes“. Done.
I’ve already noticed that the Ubuntu repositories are sometimes very out-of-date. A good example for this is the “mc” package. There is a PPA for Midnight Commander that should solve this problem but it’s also very old. At the time of writing (August 10, 2011), the current stable release is 220.127.116.11 while the PPA contains the version 18.104.22.168 (updated on Sept. 15, 2010).
Since I wanted to use a fresh release of MC, I installed it from source. Steps to follow:
- Download the latest stable source and unpack it.
- For a successful compilation I had to install this package too: “sudo apt-get install libslang2-dev libglib2.0-dev”.
- If it was successful then you should have a binary “
mc” file in the
src/folder. If it’s there, you can remove your current version with “
sudo apt-get remove mc“.
- Then install the new version with “
sudo make install“.
I also had to modify my
.bashrc a bit:
# old: #alias mc='. /usr/share/mc/bin/mc-wrapper.sh' # new: alias mc='. /usr/local/libexec/mc/mc-wrapper.sh'
Installing mc from source is now integrated in jabbatron.