Tuesday, February 12, 2008

/root/.dvipsrc: Permission denied

A TeX user on one of my systems mentioned the following error:
/root/.dvipsrc: Permission denied
I looked around and saw that others have this issue too, but no explanation was posted. I'm posting my explanation in hopes that it will help those searching around and not mislead them. Disclaimer: I'm no TeX expert.

So why would the programs that come along with TeX, in this case dvips, be looking for these non existent files? Well, dvips looks along a path of configuration files which were set according to its Makefile from when it was compiled. I see that our dvips came from RedHat:

$ rpm -qa | grep dvi
tetex-dvips-2.0.2-22.0.1.EL4.10
and whoever maintains the RPM probably builds it that way. When it tries to look in root's home it gets permission denied, as it should. We can make the error go away by building our own RPM or chmod'ing ~root open. The later item is not an option and it's not worth it to build our own dvips RPM just for this.

1 comment:

Graham Fawcett said...

I recently had the same problem. But there's another option: use the DVIPSRC environment variable to specify an alternate location for the .rc file.