[OS X TeX] Error: I can't write on file '(name)'

Alain Schremmer schremmer.alain at gmail.com
Tue Mar 27 04:05:10 CEST 2007

On Mar 26, 2007, at 5:36 PM, Peter Dyballa wrote:

> 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?
I am scared of Terminal which is why I didn't do it.
> Using only one angle would overwrite the whole file with only one  
> single statement.

My unix friend came to check on me and he laughed his head off when  
he read what I had written and then told me the same.

> 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.

Right now, my installation has been fixed by my unix friend and the  
strike at my school has just come to an end so I have to go teach  
tomorrow morning and then catch up with all the tex stuff. Once I  
have caught up, though, I will study what you wrote above but maybe  
you can suggest an introduction to the terminal that *I* can read.  
(With big stress on "I")

Very grateful regards
------------------------- 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 macostex-archives mailing list