From: cwilson@Xenon.Stanford.EDU (Christopher S. Wilson) Subject: Re: TeX & doc only work for Root Date: Sat, 20 Feb 1993 02:31:33 GMT
In article <1993Feb19.084023.15817@unibi.hrz.uni-bielefeld.de> upsyf108@unibi.hrz.uni-bielefeld.de (Wolfgang Thiel) writes:
>Pekka Janhunen <Pekka.Janhunen@fmi.fi> writes:
>
>>hi linuxers,
>
>>If I run xdvi, dvips or doc as root, everything works just fine. When I
>>try
>>as non-root, xdvi and dvips work in principle, but they try to call
>>Metafont
>>to generate some missing fonts every time. It takes about half a minute
>>during
>>which the screen is filled with Metafont messages, after which the new
>>window
>>correctly appears. The new font data never get installed because of
>>permission restrictions.
>
>There are a few files , I think it was under /usr/TeX/lib/mf/macros,
>that are owned bei root.system and have only rw------- permissions.
>A chmod a+r solved the problem here.
> Wolfgang
With the standard MakeTeXPK script, you also need to have the
directory where the .pk files live world writable. Under the SLS
distribution, this is /usr/TeX/lib/tex/fonts.
This is a security hole, though -- anyone could wipe out all the TeX
files or use that directory for other things. Even with legitimate
use of this directory, the amount of disk space used could get out of
control if people are printing out various magnifications of odd fonts
and once a font bitmap is generated, in never goes away.
An alternative would be to just have MakeTeXPK put the newly generated
fonts in a subdirectory of the user's home directory. With the
standard MakeTeXPK, just change the line
DESTDIR=$LOCALDIR/fonts
to read
DESTDIR=$HOME/fonts
Caution: Make sure you change both MakeTeXPK files! SLS includes one
in /usr/TeX/bin and an identical copy in /usr/TeX/lib/tex (does that
second one ever really get used?).
Now MakeTeXPK, which is used by both xdvi and dvips (and any other
well behaved dvi driver) will put the fonts in the right place and
even create the directory if it doesn't exist. Then all you have to
do is tell the dvi driver to look here for fonts. For this you'll
have to set TEXFONTS=$HOME/fonts:/usr/TeX/lib/tex/fonts and remember
to export TEXFONTS. Do this in /etc/profile for all users to get the
effect. Then there don't have to be any world writable files or
directories under /usr/TeX.
As long as you have all the commonly used fonts at the common sizes in
/usr/TeX/lib/tex/fonts, this should work quite well. You might want
to copy the contents of ~/fonts into the standard place every once in
a while for various users if they have generated fonts that are likely
to be used by others.
I set up my system this way and it seems to work well enough for xdvi,
but for some reason dvips seemed to ignore the TEXFONTS variable when
I tried it. Theoretically, dvips and xdvi are supposed to use the
same standard algorithm for finding fonts, so this difference
shouldn't exist -- I'm going to recompile dvips from source and see
why this doesn't work (of course, if anyone happens to know what's
going on, I'd welcome suggestions).
--Chris