Configure Midnight Commander to open files with custom application
You use Midnight Commander (mc) for all your file operations. So far it’s not a problem :) However, when you hit Enter on a file, you would like to set what application mc should use for opening the given file.
For instance, you want to open an
.avi file with VLC instead of X player, etc.
Steps to follow:
cd ~/.mc cp /etc/mc/mc.ext . ln -s mc.ext bindings
That is, copy the global
mc.ext to your local
.mc directory and put a symbolic link on it called
bindings. Now you can start customizing your local
Don’t forget to restart mc after editing
(1) You want to open all your video files with VLC. You also want to add support for
# add these lines regex/\.([wW][mM][vV])$ Include=video # modify the include/video section include/video #Open=(mplayer %f >/dev/null 2>&1 &) # for mplayer Open=(vlc %f >/dev/null 2>&1 &) # for VLC
.docx files with OpenOffice.org.
# add these lines regex/\.([Dd][oO][cC][xX])$ Open=(ooffice %f &)
(Thanks for the mc mailing list for their help).