]> git.phdru.name Git - extfs.d.git/blob - INSTALL.txt
9cd3031c2791b51d7bf19abbe1e6b7c7d1438045
[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 ~/.mc/extfs.d directory. One can distinguish these versions by looking
8 up the file extfs.ini; run the following command from the command line:
9
10 locate -b \\extfs.ini
11
12 (I use GNU locate conventions; adapt the command line to your system;
13 the simplest variant is just "locate extfs.ini".)
14
15 Usual places for extfs.ini are /etc/mc/extfs/extfs.ini,
16 /usr/lib/mc/extfs/extfs.ini, /usr/share/mc/extfs/extfs.ini or
17 /usr/local/share/mc/extfs/extfs.ini.
18
19 Older versions - extfs.ini
20 --------------------------
21
22 On the system where there is a file extfs.ini a VFS script has to be
23 installed the following way. Put the script into the system extfs
24 directory - /usr/share/mc/extfs/ or /usr/local/share/mc/extfs/. Edit
25 extfs.ini - add a line naming the script; for example, if one's
26 installing xml VFS one has to do something like
27
28 cd /etc/mc/extfs
29 echo xml >>extfs.ini
30
31 To use the installed VFS one also has to edit ~/.mc/mc.ext to assign the
32 VFS to file extension(s) or type(s). For example to assign xml VFS to
33 *.xml files (ignore case) and to XML file type add the following to
34 mc.ext:
35
36 regex/\.([xX][mM][lL])$
37     Open=%cd %p#xml
38
39 type/^XML *document text
40     Open=%cd %p#xml
41
42 To enable file types add or change the following configuration option in
43 ini file:
44
45 use_file_to_guess_type=1
46
47 This has to be done using text editor - mc doesn't allow editing the
48 option in its configuration editor.
49
50 Newer versions ~/.mc/extfs.d
51 ----------------------------
52
53 For newer versions just drop a VFS script to ~/.mc/extfs.d or
54 ~/.local/share/mc/extfs.d/ directory (verify directory by running "mc -F").
55 Edit mc.ext; the syntax is slightly different:
56
57 regex/\.([xX][mM][lL])$
58     Include=xml
59
60 type/^XML *document text
61     Include=xml
62
63 include/xml
64     Open=%cd %p/xml://