]> git.phdru.name Git - extfs.d.git/blob - INSTALL.txt
Docs(INSTALL): Move up instructions for newer `mc`
[extfs.d.git] / INSTALL.txt
1 How to install an external VFS script
2 =====================================
3
4 Related to extfs installation there are two major versions of ``Midnight
5 Commander``. Older versions before 4.7.something use ``extfs.ini``
6 configuration file. Newer versions simply allow to drop a VFS script to
7 ``$HOME/.mc/extfs.d`` directory. One can distinguish these versions by
8 looking up the file ``extfs.ini``; run the following command from the
9 command line::
10
11   locate -b \\extfs.ini
12
13 (I use GNU locate conventions; adapt the command line to your system;
14 the simplest variant is just ``locate extfs.ini``.)
15
16 Usual places for ``extfs.ini`` are ``/etc/mc/extfs/extfs.ini``,
17 ``/usr/lib/mc/extfs/extfs.ini``, ``/usr/share/mc/extfs/extfs.ini`` or
18 ``/usr/local/share/mc/extfs/extfs.ini``.
19
20 Newer versions - \$HOME/.mc/extfs.d
21 -----------------------------------
22
23 For newer versions just drop a VFS script to ``$HOME/.mc/extfs.d`` or
24 ``$HOME/.local/share/mc/extfs.d/`` directory (verify directory by running
25 ``mc -F``). Make the script executable. Edit ``mc.ext``. Enable file types
26 guessing (see above).
27
28 See my https://phdru.name/Software/dotfiles/mc/mc.ext.html for examples.
29
30 Older versions - extfs.ini
31 --------------------------
32
33 On the system where there is a file extfs.ini a VFS script has to be
34 installed the following way. Put the script into the system extfs
35 directory - ``/usr/share/mc/extfs/`` or ``/usr/local/share/mc/extfs/``.
36 Make the script executable. Edit ``extfs.ini`` - add a line naming the
37 script; for example, if one's installing xml VFS one has to do something
38 like::
39
40   cd /etc/mc/extfs
41   echo xml >>extfs.ini
42
43 To use the installed VFS one also has to edit ``$HOME/.mc/mc.ext`` to assign
44 the VFS to file extension(s) or type(s).
45
46 To enable file types add or change the following configuration option in
47 ini file in section ``[Midnight-Commander]``::
48
49   use_file_to_guess_type=1
50
51 This has to be done using text editor - ``mc`` doesn't allow editing the
52 option in its configuration editor.