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