[OS X TeX] Error: I can't write on file '(name)'
Peter Dyballa
Peter_Dyballa at Web.DE
Mon Mar 26 17:36:31 EDT 2007
Am 26.03.2007 um 18:51 schrieb Alain Schremmer:
> I do not really understand the responses terminal gave me but I
> assume that it found "openout_any = p" so what I need to do is to
> replace it by "openout_any = r". So, what I should do is
>
>> sudo echo "openout_any = r" > /usr/local/gwTeX/texmf/web2c/texmf.cnf
>
> with only one angle?
DON'T DO THIS!
Using only one angle would overwrite the whole file with only one
single statement.
Since you have the paranoid statement in /usr/local/gwTeX/texmf/web2c/
texmf.cnf you can do this on the command line: change on the fly the
paranoid line, save this new content in a new file, and if this all
succeeds substitute the old paranoid file with the new mildly
restricted contents. That texmf.cnf file is owned by root makes it
necessary to "abuse" sudo:
sudo cat /usr/local/gwTeX/texmf/web2c/texmf.cnf | sed -e "s/
openout_any = p/openout_any = r/" > texmf.cnf-new && sudo mv
texmf.cnf-new /usr/local/gwTeX/texmf/web2c/texmf.cnf
So sudo only requests once the password, when it's not yet needed for
the cat command, but later, when asking for the password might cause
problems, it's already and still authorised to finish the job of
moving the new file to the old place.
Now, with grep you've found that the paranoid openout statement is on
line #388, you can invoke pico à la:
sudo pico +388 /usr/local/gwTeX/texmf/web2c/texmf.cnf
and you are on the right line. ^E to warp to the line's end. ^O or F3
saves the edited file contents.
This all does not change the inverse character of the file's view
inside pico, maybe this does, at least it makes in my Terminal appear
black text on white background, what I call not inverse (because it
looks the same as on a sheet of paper: black types on white paper):
sudo env TERM=vt100 pico +388 /usr/local/gwTeX/texmf/web2c/texmf.cnf
To search for something in the file: F6 (the function key) or ^W
(ctrl and w at once, i.e. "Where is").
^R reads in another file. This is useless since pico has already
opened the proper file.
--
Greetings
Pete
"Evolution" o __o _o _
°\___o /0~ -\<, ^\___ /=\\_/-%
oo~_______ /\ /\______/ \_________O/ O_______________o===>-->O--o____
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/
More information about the MacOSX-TeX
mailing list