4 1.1 Simple installation
5 1.2 Custom installation
7 1.2.2 Kpathsea application distributions
8 1.2.3 Changing search paths
9 1.2.3.1 Default path features
10 1.2.3.2 Default path generation
11 1.2.4 Running `configure'
12 1.2.4.1 `configure' shells
13 1.2.4.2 `configure' options
14 1.2.4.3 `configure' environment
15 1.2.4.4 `configure' scenarios
16 1.2.4.5 Shared library
18 1.2.6 Installing files
20 1.2.8 Filename database generation
22 1.2.9.1 `mktex' configuration
23 1.2.9.2 `mktex' script names
24 1.2.9.3 `mktex' script arguments
25 1.2.10 Installation testing
32 The procedure for Kpathsea (and Web2c, etc.) configuration and
33 installation follows. If you encounter trouble, see *Note Common
34 problems::, a copy of which is in the file `kpathsea/BUGS'.
36 1.1 Simple installation
37 =======================
39 Installing TeX and friends for the first time can be a daunting
40 experience. Thus, you may prefer to skip this whole thing and just get
41 precompiled executables: see *Note unixtex.ftp::.
43 This section explains what to do if you wish to take the defaults for
44 everything, and generally to install in the simplest possible way. Most
45 steps here refer to corresponding subsection in the next section which
46 explains how to override defaults and generally gives more details.
48 By default everything will be installed under `/usr/local' and the
49 following discussion assumes this. However, if you already have TeX
50 installed, its location is used to derive the directory under which
51 everything is to be installed.
53 1. Be sure you have enough disk space: approximately 8 megabytes for
54 the compressed archives, 15MB for sources, 50MB for compilation,
55 40MB for the (initial) installed system (including library files).
58 2. Retrieve these distribution archives:
59 `ftp://ftp.tug.org/tex/texk.tar.gz'
60 These are the sources, which you will be compiling.
62 `ftp://ftp.tug.org/tex/texklib.tar.gz'
63 This is a basic set of input files. You should unpack it in
64 the directory `/usr/local/share'; doing so will create a
65 `texmf' subdirectory there.
67 These archives are mirrored on the CTAN hosts, in the
68 `systems/web2c' directory.
70 *Note Kpathsea application distributions::.
72 3. When using the default search paths, there is no need to edit any
73 distribution files. *Note Changing search paths::.
75 4. At the top level of the distribution, run `sh configure'. (If you
76 have the GNU Bash shell installed, run `bash configure'.) *Note
79 5. `make'. *Note Running make::. If you are using a BSD 4.4 system
80 such as FreeBSD or NetBSD, you may have to use GNU make (often
81 installed in `/usr/local/bin'), not the BSD make.
83 6. `make install'. *Note Installing files::.
85 7. `make distclean'. *Note Cleaning up::.
87 8. Set up a cron job to rebuild the filename database that makes
88 searching faster. This line will rebuild it every midnight:
89 0 0 * * * cd /usr/local/share/texmf && /BINDIR/mktexlsr
90 *Note Filename database generation::, and *Note Filename
93 9. If you're installing Dvips, you also need to set up configuration
94 files for your printers and make any additional PostScript fonts
95 available. *Note Installation: (dvips)Installation. If you have
96 any color printers, see *Note Color device configuration:
97 (dvips)Color device configuration.
99 10. The first time you run a DVI driver, a bunch of PK fonts will be
100 built by Metafont via `mktexpk' (and added to the filename
101 database). This will take some time. Don't be alarmed; they will
102 created only this first time (unless something is wrong with your
105 By default, `mktexpk' will create these fonts in a hierarchy under
106 `/var/tmp/texfonts'; it simply assumes that `/var/tmp' exists and
107 is globally writable. If you need a different arrangement, see
108 *Note mktex configuration::.
110 *Note mktex scripts::.
112 11. For some simple tests, try `tex story \\bye' and `latex sample2e'.
113 Then run `xdvi story' or `dvips sample2e' on the resulting DVI
114 files to preview/print the documents. *Note Installation
117 1.2 Custom installation
118 =======================
120 Most sites need to modify the default installation procedure in some
121 way, perhaps merely changing the prefix from `/usr/local', perhaps
122 adding extra compiler or loader options to work around `configure'
123 bugs. This section explains how to override default choices. For
124 additional distribution-specific information:
127 * *Note Installation: (dvips)Installation.
129 * *Note Installation: (web2c)Installation.
133 These instructions are for Unix systems. Other operating-system
134 specific distributions have their own instructions. The code base
135 itself supports Amiga, DOS, OS/2, and VMS.
137 Following are the same steps as in the previous section (which
138 describes the simplest installation), but with much more detail.
143 Here is a table showing the disk space needed for each distribution
144 (described in the next section). The `(totals)' line reflects the
145 `texk' source distribution and `texklib'; the individual distributions
146 don't enter into it. Sizes are in megabytes. All numbers are
149 Distribution .tar.gz Unpacked Compiled Installed
155 texk 7.5 32.1 95.3 33.5
156 texklib 6.3 15.0 - 15.0
157 (totals) 14.6 47.1 95.3 48.5
159 1.2.2 Kpathsea application distributions
160 ----------------------------------------
162 The archive `ftp://ftp.tug.org/tex/texk.tar.gz' contains all of the
163 Kpathsea applications I maintain, and the library itself. For example,
164 since NeXT does not generally support X11, you'd probably want to skip
165 `xdvik' (or simply remove it after unpacking `texk.tar.gz'. If you are
166 not interested in all of them, you can also retrieve them separately:
169 DVI to PCL, for LaserJet printers.
172 DVI to PostScript, for previewers, printers, or PDF generation.
175 The software needed to compile TeX and friends.
178 The original WEB source files, also used in compilation.
181 DVI previewing under the X window system.
184 If you want to use the Babel LaTeX package for support of non-English
185 typesetting, you may need to retrieve additional files. See the file
186 `install.txt' in the Babel distribution.
188 1.2.3 Changing search paths
189 ---------------------------
191 If the search paths for your installation differ from the standard TeX
192 directory structure (*note Introduction: (tds)Top.), edit the file
193 `kpathsea/texmf.in' as desired, before running `configure'. For
194 example, if you have all your fonts or macros in one big directory.
196 You may also wish to edit the file `mktex.cnf', either before or
197 after installation, to control various aspects of `mktexpk' and
198 friends. *Note mktex configuration::.
200 You do not need to edit `texmf.in' to change the default top-level or
201 other installation _directories_ (only the paths). You can and should
202 do that when you run `configure' (next step).
204 You also do not need to edit `texmf.in' if you are willing to rely on
205 `texmf.cnf' at runtime to define the paths, and let the compile-time
206 default paths be incorrect. Usually there is no harm in doing this.
208 The section below explains default generation in more detail.
210 1.2.3.1 Default path features
211 .............................
213 The purpose of having all the different files described in the section
214 above is to avoid having the same information in more than one place. If
215 you change the installation directories or top-level prefix at
216 `configure'-time, those changes will propagate through the whole
217 sequence. And if you change the default paths in `texmf.in', those
218 changes are propagated to the compile-time defaults.
220 The Make definitions are all repeated in several Makefile's; but
221 changing the top-level `Makefile' should suffice, as it passes down all
222 the variable definitions, thus overriding the submakes. (The
223 definitions are repeated so you can run Make in the subdirectories, if
224 you should have occasion to.)
226 By default, the bitmap font paths end with `/$MAKETEX_MODE', thus
227 including the device name (usually a Metafont mode name such as
228 `ljfour'). This distinguishes two different devices with the same
229 resolution--a write/white from a write/black 300dpi printer, for
232 However, since most sites don't have this complication, Kpathsea
233 (specifically, the `kpse_init_prog' function in `kpathsea/proginit.c')
234 has a special case: if the mode has not been explicitly set by the user
235 (or in a configuration file), it sets `MAKETEX_MODE' to `/'. This
236 makes the default PK path, for example, expand into `.../pk//', so
237 fonts will be found even if there is no subdirectory for the mode (if
238 you arranged things that way because your site has only one printer,
239 for example) or if the program is mode-independent (e.g., `pktype').
241 To make the paths independent of the mode, simply edit `texmf.in'
242 before installation, or the installed `texmf.cnf', and remove the
245 *Note mktex script arguments::, for how this interacts with `mktexpk'.
247 *Note TeX directory structure: TeX directory structure, for a
248 description of the default arrangement of the input files that comprise
249 the TeX system. The file `kpathsea/HIER' is a copy of that section.
251 1.2.3.2 Default path generation
252 ...............................
254 This section describes how the default paths are constructed.
256 You may wish to ignore the whole mess and simply edit `texmf.cnf'
257 after it is installed, perhaps even copying it into place beforehand so
258 you can complete the installation, if it seems necessary.
260 To summarize the chain of events that go into defining the default
263 1. `configure' creates a `Makefile' from each `Makefile.in'.
265 2. When Make runs in the `kpathsea' directory, it creates a file
266 `texmf.sed' that substitutes the Make value of `$(var)' for a
267 string `@var@'. The variables in question are the one that define
268 the installation directories.
270 3. `texmf.sed' (together with a little extra magic--see
271 `kpathsea/Makefile') is applied to `texmf.in' to generate
272 `texmf.cnf'. This is the file that will eventually be installed
275 4. The definitions in `texmf.cnf' are recast as C `#define''s in
276 `paths.h'. These values will be the compile-time defaults; they
277 are not used at runtime unless no `texmf.cnf' file can be found.
279 (That's a lie: the compile-time defaults are what any extra :'s in
280 `texmf.cnf' expand into; but the paths as distributed have no extra
281 :'s, and there's no particular reason for them to.)
283 1.2.4 Running `configure'
284 -------------------------
286 Run `sh configure OPTIONS' (in the top-level directory, the one
287 containing `kpathsea/'), possibly using a shell other than `sh' (*note
290 `configure' adapts the source distribution to the present system via
291 `#define''s in `*/c-auto.h', which are created from the corresponding
292 `c-auto.in'. It also creates a `Makefile' from the corresponding
293 `Makefile.in', doing `@VAR@' and `ac_include' substitutions).
295 `configure' is the best place to control the configuration,
296 compilation, and installed location of the software, either via
297 command-line options, or by setting environment variables before
298 invoking it. For example, you can disable `mktexpk' by default with
299 the option `--disable-mktexpk'. *Note configure options::.
301 1.2.4.1 `configure' shells
302 ..........................
304 Considerable effort has gone into trying to ensure that the `configure'
305 scripts can be run by most Bourne shell variants. If `sh' runs into
306 trouble, your best bet is to use Bash, the GNU Bourne-again shell
307 (*note Top: (bash)Top.).
309 Bourne shell variants for which problems have been reported in the
312 Old versions of the Korn shell may fail to handle the scripts.
313 The Korn shell may be installed as `/bin/sh' on AIX, in which case
314 `/bin/bsh' may serve instead.
317 Old versions of ash are unable to handle the scripts. Ash is
318 sometimes installed as `/bin/sh' on NetBSD, FreeBSD, and Linux
319 systems. `/bin/bash' should be available for those systems, but
320 might not be part of a default installation.
323 `/bin/sh' under Ultrix is a DEC-grown shell that is notably
324 deficient in many ways. `/bin/sh5' may be necessary.
326 1.2.4.2 `configure' options
327 ...........................
329 For a complete list of all `configure' options, run `configure --help'
330 or see *Note Running `configure' scripts: (autoconf)Invoking configure,
331 (a copy is in the file `kpathsea/README.CONFIGURE'). The generic
332 options are listed first in the `--help' output, and the
333 package-specific options come last. The environment variables
334 `configure' pays attention to are listed below.
336 Options particularly likely to be useful are `--prefix', `--datadir',
337 and the like; see *Note configure scenarios::.
339 This section gives pointers to descriptions of the `--with' and
340 `--enable' options to `configure' that Kpathsea-using programs accept.
342 `--without-mktexmf-default'
343 `--without-mktexpk-default'
344 `--without-mktextfm-default'
345 `--with-mktextex-default'
346 Enable or disable the dynamic generation programs. *Note mktex
350 Build Kpathsea as a shared library, and link against it. Also
351 build the usual static library. *Note Shared library::.
354 Build only the shared library. Implies `--enable-shared'.
356 `--enable-maintainer-mode'
357 Enables make targets that are useful for the maintainer and likely
358 to be a pain for anyone else; the makefiles created when this
359 option is enabled may not work at all for you. You have been
362 1.2.4.3 `configure' environment
363 ...............................
365 `configure' uses the value of the following environment variables in
366 determining your system's characteristics, and substitutes for them in
370 The compiler to use: default is `gcc' if it's installed, otherwise
374 Options to give the compiler: default is `-g -O2' for `gcc', `-g'
375 otherwise. `CFLAGS' comes after any other options. You may need
376 to include `-w' here if your compilations commonly have useless
377 warnings (e.g., `NULL redefined'), or `configure' may fail to
378 detect the presence of header files (it takes the messages on
379 standard error to mean the header file doesn't exist).
382 Options to pass to the compiler preprocessor; this matters most for
383 configuration, not the actual source compilation. The `configure'
384 script often does only preprocessing (e.g., to check for the
385 existence of #include files), and `CFLAGS' is not used for this.
386 You may need to set this to something like
387 `-I/usr/local/include/wwwhatever' if you have the libwww library
388 installed for hyper-xdvik (see `xdvik/INSTALL').
391 Additional preprocessor options, but not used by `configure'.
392 Provided for enabling or disabling program features, as documented
393 in the various program-specific installation instructions. `DEFS'
394 comes before any compiler options included by the distribution
395 `Makefile's or by `configure'.
398 Additional options to give to the loader. `LDFLAGS' comes before
399 any other linker options.
402 Additional libraries to link with.
404 1.2.4.4 `configure' scenarios
405 .............................
407 Here are some common installation scenarios:
409 * Including X support in Metafont. This is disabled by default,
410 since many sites have no use for it, and it's a leading cause of
411 configuration problems.
414 * Putting the binaries, TeX files, GNU info files, etc. into a single
415 TeX hierarchy, say `/here/texmf', requires overriding defaults in
417 configure --prefix=/here/texmf --datadir=/here
419 * You can compile on multiple architectures simultaneously either by
420 building symbolic link trees with the `lndir' script from the X11
421 distribution, or with the `--srcdir' option:
422 configure --srcdir=SRCDIR
424 * If you are installing binaries for multiple architectures into a
425 single hierarchy, you will probably want to override the default
426 `bin' and `lib' directories, something like this:
427 configure --prefix=TEXMF --datadir=TEXMF \
428 --bindir=TEXMF/ARCH/bin --libdir=TEXMF/ARCH/lib
430 (Unless you make provisions for architecture-specific files in
431 other ways, e.g., with Depot or an automounter.)
433 * To compile with optimization (to compile without debugging, remove
435 env CFLAGS="-g -O" sh configure ...
436 For a potential problem if you optimize, see *Note TeX or Metafont
437 failing: TeX or Metafont failing.
439 1.2.4.5 Shared library
440 ......................
442 You can compile Kpathsea as a shared library on a few systems, by
443 specifying the option `--enable-shared' when you run `configure'.
445 The main advantage in doing this is that the executables can then
446 share the code, thus decreasing memory and disk space requirements.
448 On some systems, you can record the location of shared libraries in a
449 binary, usually by giving certain options to the linker. Then
450 individual users do not need to set their system's environment variable
451 (e.g., `LD_LIBRARY_PATH') to find shared libraries. If you want to do
452 this, you will need to add the necessary options to `LDFLAGS' yourself;
453 for example, on Solaris, include something like `-R${prefix}/lib', on
454 IRIX or Linux, use `-rpath${prefix}/lib'. (Unfortunately, making this
455 happen by default is very difficult, because of interactions with an
456 existing installed shared library.)
458 Currently, shared library support is implemented only on Linux, SunOS
459 4 (Solaris 1), SunOS 5 (Solaris 2), IRIX 5, and IRIX 6. If you're
460 interested and willing in adding support for other systems, please see
461 the `configure' mode in the `klibtool' script, especially the
462 host-specific case statement around line 250.
467 `make' (still in the top-level directory). This also creates the
468 `texmf.cnf' and `paths.h' files that define the default search paths,
469 and (by default) the `plain' and `latex' TeX formats.
471 You can override directory names and other values at `make'-time.
472 `make/paths.make' lists the variables most commonly reset. For
473 example, `make default_texsizes=600' changes the list of fallback
476 You can also override each of `configure''s environment variables
477 (*note configure environment::). The Make variables have the same
480 Finally, you can supply additional options via the following
481 variables. (`configure' does not use these.)
485 Preprocessor options.
491 Loader options (included at beginning of link commands).
494 More loader options (included at end of link commands).
497 Additional Make arguments passed to all sub-`make''s. You may need
498 to include assignments to the other variables here via `XMAKEARGS';
499 for example: `make XMAKEARGS="CFLAGS=-O XDEFS=-DA4"'.
501 It's generally a bad idea to use a different compiler (`CC') or
502 libraries (`LIBS') for compilation than you did for configuration,
503 since the values `configure' determined may then be incorrect.
505 Adding compiler options to change the "universe" you are using
506 (typically BSD vs. system V) is generally a cause of trouble. It's
507 best to use the native environment, whatever that is; `configure' and
508 the software usually adapt best to that. In particular, under Solaris
509 2.x, you should not use the BSD-compatibility library (`libucb') or
510 include files (`ucbinclude').
512 If you want to use the Babel LaTeX package for support of non-English
513 typesetting, you need to modify some files before making the LaTeX
514 format. See the file `install.txt' in the Babel distribution.
516 1.2.6 Installing files
517 ----------------------
519 The basic command is the usual `make install'. For security issues,
522 The first time you install any manual in the GNU Info system, you
523 should add a line (you choose where) to the file `dir' in your
524 `$(infodir)' directory. Sample text for this is given near the top of
525 the Texinfo source files (`kpathsea/kpathsea.texi',
526 `dvipsk/dvips.texi', and `web2c/doc/web2c.texi'). If you have a recent
527 version of the GNU Texinfo distribution installed
528 (`ftp://prep.ai.mit.edu/pub/gnu/texinfo-3.9.tar.gz' or later), this
529 should happen automatically.
531 On the offchance that this is your first Info installation, the `dir'
532 file I use is included in the distribution as `etc/dir-example'.
534 You may wish to use one of the following targets, especially if you
535 are installing on multiple architectures:
536 * `make install-exec' to install in architecture-dependent
537 directories, i.e., ones that depend on the `$(exec_prefix)' Make
538 variable. This includes links to binaries, libraries, etc., not
541 * `make install-data' to install in architecture-independent
542 directories, such as documentation, configuration files, pool
545 If you use the Andrew File System, the normal path (e.g., PREFIX/bin)
546 only gets you to a read-only copy of the files, and you must specify a
547 different path for installation. The best way to do this is by setting
548 the `prefix' variable on the `make' command line. The sequence becomes
550 configure --prefix=/whatever
552 make install prefix=/afs/.SYSTEM.NAME/system/1.3/@sys/whatever
553 With AFS, you will definitely want to use relative filenames in
554 `ls-R' (*note Filename database::), not absolute filenames. This is
555 done by default, but check anyway.
560 The basic command is `make distclean'. This removes all files created
564 * `make mostlyclean' if you intend to compile on another
565 architecture. For Web2C, since the generated C files are portable,
566 they are not removed. If the `lex' vs. `flex' situation is going
567 to be different on the next machine, `rm web2c/lex.yy.c'.
569 * `make clean' to remove files created by compiling, but leave
570 configuration files and Makefiles.
572 * `make maintainer-clean' to remove everything that the Makefiles can
573 rebuild. This is more than `distclean' removes, and you should
574 only use it if you are thoroughly conversant with (and have the
575 necessary versions of) Autoconf.
577 * `make extraclean' to remove other junk, e.g., core files, log
578 files, patch rejects. This is independent of the other `clean'
581 1.2.8 Filename database generation
582 ----------------------------------
584 You will probably want to set up a `cron' entry on the appropriate
585 machine(s) to rebuild the filename database nightly or so, as in:
586 0 0 * * * cd TEXMF && /BINDIR/mktexlsr
587 *Note Filename database::.
589 Although the `mktex...' scripts make every effort to add
590 newly-created files on the fly, it can't hurt to make sure you get a
591 fresh version every so often.
593 1.2.9 `mktex' scripts
594 ---------------------
596 If Kpathsea cannot otherwise find a file, for some file types it is
597 configured by default to invoke an external program to create it
598 dynamically (*note mktex configuration::). This is most useful for
599 fonts (bitmaps, TFM's, and arbitrarily-sizable Metafont sources such as
600 the Sauter and EC fonts), since any given document can use fonts never
601 before referenced. Trying to build all fonts in advance is therefore
602 impractical, if not impossible.
604 The script is passed the name of the file to create and possibly other
605 arguments, as explained below. It must echo the full pathname of the
606 file it created (and nothing else) to standard output; it can write
607 diagnostics to standard error.
609 1.2.9.1 `mktex' configuration
610 .............................
612 The following file types can run an external program to create missing
613 files: `pk', `tfm', `mf', `tex'; the scripts are named `mktexpk',
614 `mktextfm', `mktexmf', and `mktextex'.
616 In the absence of `configure' options specifying otherwise,
617 everything but `mktextex' will be enabled by default. The `configure'
618 options to change the defaults are:
620 --without-mktexmf-default
621 --without-mktexpk-default
622 --without-mktextfm-default
623 --with-mktextex-default
625 The `configure' setting is overridden if the environment variable or
626 configuration file value named for the script is set; e.g., `MKTEXPK'
627 (*note mktex script arguments::).
629 As distributed, all the scripts source a file `texmf/web2c/mktex.cnf'
630 if it exists, so you can override various defaults. See `mktex.opt',
631 for instance, which defines the default mode, resolution, some special
632 directory names, etc. If you prefer not to change the distributed
633 scripts, you can simply create `mktex.cnf' with the appropriate
634 definitions (you do not need to create it if you have nothing to put in
635 it). `mktex.cnf' has no special syntax; it's an arbitrary Bourne shell
636 script. The distribution contains a sample `mktex.cnf' for you to copy
637 and modify as you please (it is not installed anywhere).
639 In addition, you can configure a number of features with the
640 `MT_FEATURES' variable, which you can define:
641 * in `mktex.opt', as just mentioned;
643 * by editing the file `mktex.opt', either before `make install' (in
644 the source hierarchy) or after (in the installed hierarchy);
646 * or in the environment.
648 If none of the options below are enabled, `mktexpk', `mktextfm', and
649 `mktexmf' follow the following procedure to decide where fonts should
650 be installed. Find the tree where the font's sources are, and test the
651 permissions of the `fonts' directory of that tree to determine whether
652 it is writable. If it is, put the files in the tree in appropriate
653 locations. If it isn't writable, see whether the tree is a system tree
654 (named in `SYSTEXMF'). If so, the `VARTEXFONTS' tree is used. In all
655 other cases the working directory is used.
657 The `appendonlydir' option is enabled by default.
660 Tell `mktexdir' to create directories append-only, i.e., set their
661 sticky bit (*note Mode Structure: (coreutils)Mode Structure.).
662 This feature is silently ignored on non-Unix platforms (e.g.
663 Windows/NT and MS-DOS) which don't support similar functionality.
664 This feature is enabled by default.
667 Use 8.3 names; e.g., `dpi600/cmr10.pk' instead of `cmr10.600pk'.
668 Note that this feature only affects filenames that would otherwise
669 clash with other TeX-related filenames; `mktex' scripts do nothing
670 about filenames which exceed the 8+3 MS-DOS limits but remain
671 unique when truncated (by the OS) to these limits, and nether do
672 the scripts care about possible clashes with files which aren't
673 related with TeX. For example, `cmr10.600pk' would clash with
674 `cmr10.600gf' and is therefore changed when `dosnames' is in
675 effect, but `mf.pool' and `mp.base' don't clash with any
676 TeX-related files and are therefore unchanged.
678 This feature is turned on by default on MS-DOS. If you do not wish
679 `dosnames' to be set on an MS-DOS platform, you need to set the
680 `MT_FEATURES' environment variable to a value that doesn't include
681 `dosnames'. You can also change the default setting by editing
682 `mktex.opt', but only if you use the `mktex' shell scripts; the
683 emulation programs don't consult `mktex.opt'.
686 Instead of deriving the location of a font in the destination tree
687 from the location of the sources, the aliases and directory names
688 from the Fontname distribution are used. (*note Introduction:
692 Let mktexpk and mktextfm create metafont driver files in a
693 temporary directory. These will be used for just one metafont run
694 and not installed permanently.
697 Omit the directory level for the mode name; this is fine as long as
698 you generate fonts for only one mode.
701 Omit the font supplier name directory level.
704 Omit the font typeface name directory level.
707 Omit the font supplier and typeface name directory levels. This
708 feature is deprecated in favour of `stripsupplier' and
712 When this option is enabled, fonts that would otherwise be written
713 in system texmf tree go to the `VARTEXFONTS' tree instead. The
714 default value in `kpathsea/Makefile.in' is `/var/tmp/texfonts'.
715 The `Linux File System Standard' recommends `/var/tex/fonts'.
717 The `varfonts' setting in `MT_FEATURES' is overridden by the
718 `USE_VARTEXFONTS' environment variable: if set to `1', the feature
719 is enabled, and if set to `0', the feature is disabled.
722 Force generated files that would go into a system tree (as defined
723 by `SYSTEXMF') into `TEXMFVAR'. Starting with teTeX-3.0, the
724 variable `TEXMFVAR' is always set. The `varfonts' feature takes
725 precedence if also set.
727 The `texmfvar' setting in `MT_FEATURES' is overridden by the
728 `USE_TEXMFVAR' environment variable: if set to `1', the feature is
729 enabled, and if set to `0', the feature is disabled.
731 1.2.9.2 `mktex' script names
732 ............................
734 The following table shows the default name of the script for each
735 possible file types. (The source is the variable `kpse_make_specs' in
736 `kpathsea/tex-make.c'.)
745 Metafont input files.
750 These names are overridden by an environment variable specific to the
751 program--for example, `DVIPSMAKEPK' for Dvipsk.
753 If a `mktex...' script fails, the invocation is appended to a file
754 `missfont.log' (by default) in the current directory. You can then
755 execute the log file to create the missing files after fixing the
758 If the current directory is not writable and the environment variable
759 or configuration file value `TEXMFOUTPUT' is set, its value is used.
760 Otherwise, nothing is written. The name `missfont.log' is overridden
761 by the `MISSFONT_LOG' environment variable or configuration file value.
763 1.2.9.3 `mktex' script arguments
764 ................................
766 The first argument to a `mktex' script is always the name of the file
769 In the default `mktexpk' implementation, additional arguments may
773 Sets the resolution of the generated font to NUM.
776 Sets the Metafont mode to NAME.
779 Sets the the "base dpi" for the font. This must match the mode
783 A "magstep" string suitable for the Metafont `mag' variable. This
784 must match the combination of BDPI and DPI being used.
787 A directory name. If the directory is absolute, it is used as-is.
788 Otherwise, it is appended to the root destination directory set in
791 1.2.10 Installation testing
792 ---------------------------
794 Besides the tests listed in *Note Simple installation::, you can try
795 running `make check'. This includes the torture tests (trip, trap, and
796 mptrap) that come with Web2c (*note Triptrap: (web2c)Triptrap.).
801 None of the programs in the TeX system require any special system
802 privileges, so there's no first-level security concern of people gaining
803 illegitimate root access.
805 A TeX document, however, can write to arbitrary files, e.g.,
806 `~/.rhosts', and thus an unwitting user who runs TeX on a random
807 document is vulnerable to a trojan horse attack. This loophole is
808 closed by default, but you can be permissive if you so desire in
809 `texmf.cnf'. *Note tex invocation: (web2c)tex invocation. MetaPost has
812 Dvips, Xdvi, and TeX can also execute shell commands under some
813 circumstances. To disable this, see the `-R' option in *Note Option
814 details: (dvips)Option details, the xdvi man page, and *Note tex
815 invocation: (web2c)tex invocation, respectively.
817 Another security issue arises because it's very useful--almost
818 necessary--to make arbitrary fonts on user demand with `mktexpk' and
819 friends. Where do these files get installed? By default, the
820 `mktexpk' distributed with Kpathsea assumes a world-writable `/var/tmp'
821 directory; this is a simple and convenient approach, but it may not
822 suit your situation because it means that a local cache of fonts is
823 created on every machine.
825 To avoid this duplication, many people consider a shared, globally
826 writable font tree desirable, in spite of the potential security
827 problems. To do this you should change the value of `VARTEXFONTS' in
828 `texmf.cnf' to refer to some globally known directory. *Note mktex
831 The first restriction you can apply is to make newly-created
832 directories under `texmf' be append-only with an option in `mktex.cnf'.
833 *Note mktex configuration::.
835 Another approach is to establish a group (or user) for TeX files,
836 make the `texmf' tree writable only to that group (or user), and make
837 `mktexpk' et al. setgid to that group (or setuid to that user). Then
838 users must invoke the scripts to install things. (If you're worried
839 about the inevitable security holes in scripts, then you could write a
840 C wrapper to exec the script.)
842 The `mktex...' scripts install files with the same read and write
843 permissions as the directory they are installed in. The executable,
844 sgid, suid, and sticky bits are always cleared.
846 Any directories created by the `mktex...' scripts have the same
847 permissions as their parent directory, unless the `appendonlydir'
848 feature is used, in which case the sticky bit is always set.