]> git.phdru.name Git - extfs.d.git/blob - INSTALL.html
Fix spelling: instruction => instructions
[extfs.d.git] / INSTALL.html
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.8.1: http://docutils.sourceforge.net/" />
7 <title>How to install an external VFS script</title>
8 <style type="text/css">
9
10
11 </style>
12 </head>
13 <body>
14 <div class="document" id="how-to-install-an-external-vfs-script">
15 <h1 class="title">How to install an external VFS script</h1>
16
17 <p>Related to extfs installation there are two major versions of <tt class="docutils literal">Midnight
18 Commander</tt>. Older versions before 4.7.something use <tt class="docutils literal">extfs.ini</tt>
19 configuration file. Newer versions simply allow to drop a VFS script to
20 <tt class="docutils literal"><span class="pre">$HOME/.mc/extfs.d</span></tt> directory. One can distinguish these versions by
21 looking up the file <tt class="docutils literal">extfs.ini</tt>; run the following command from the
22 command line:</p>
23 <pre class="literal-block">
24 locate -b \\extfs.ini
25 </pre>
26 <p>(I use GNU locate conventions; adapt the command line to your system;
27 the simplest variant is just <tt class="docutils literal">locate extfs.ini</tt>.)</p>
28 <p>Usual places for <tt class="docutils literal">extfs.ini</tt> are <tt class="docutils literal">/etc/mc/extfs/extfs.ini</tt>,
29 <tt class="docutils literal">/usr/lib/mc/extfs/extfs.ini</tt>, <tt class="docutils literal">/usr/share/mc/extfs/extfs.ini</tt> or
30 <tt class="docutils literal">/usr/local/share/mc/extfs/extfs.ini</tt>.</p>
31 <div class="section" id="older-versions-extfs-ini">
32 <h1>Older versions - extfs.ini</h1>
33 <p>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 - <tt class="docutils literal">/usr/share/mc/extfs/</tt> or <tt class="docutils literal">/usr/local/share/mc/extfs/</tt>.
36 Make the script executable. Edit <tt class="docutils literal">extfs.ini</tt> - add a line naming the
37 script; for example, if one's installing xml VFS one has to do something
38 like:</p>
39 <pre class="literal-block">
40 cd /etc/mc/extfs
41 echo xml &gt;&gt;extfs.ini
42 </pre>
43 <p>To use the installed VFS one also has to edit <tt class="docutils literal"><span class="pre">$HOME/.mc/mc.ext</span></tt> to assign
44 the VFS to file extension(s) or type(s).</p>
45 <p>To enable file types add or change the following configuration option in
46 ini file in section <tt class="docutils literal"><span class="pre">[Midnight-Commander]</span></tt>:</p>
47 <pre class="literal-block">
48 use_file_to_guess_type=1
49 </pre>
50 <p>This has to be done using text editor - <tt class="docutils literal">mc</tt> doesn't allow editing the
51 option in its configuration editor.</p>
52 </div>
53 <div class="section" id="newer-versions-home-mc-extfs-d">
54 <h1>Newer versions - $HOME/.mc/extfs.d</h1>
55 <p>For newer versions just drop a VFS script to <tt class="docutils literal"><span class="pre">$HOME/.mc/extfs.d</span></tt> or
56 <tt class="docutils literal"><span class="pre">$HOME/.local/share/mc/extfs.d/</span></tt> directory (verify directory by running
57 <tt class="docutils literal">mc <span class="pre">-F</span></tt>). Make the script executable. Edit <tt class="docutils literal">mc.ext</tt>. Enable file types
58 guessing (see above).</p>
59 <p>See my <a class="reference external" href="http://phdru.name/Software/dotfiles/mc/mc.ext.html">http://phdru.name/Software/dotfiles/mc/mc.ext.html</a> for examples.</p>
60 </div>
61 </div>
62 </body>
63 </html>