[texworks] Why is $PATH ignored?
st.loeffler at gmail.com
Sat Dec 20 14:49:10 CET 2008
I'm new to this mailing list but I've been using TeXworks for quite some
time now and I've also worked on the source code. So maybe I can help
clear some things up a little bit.
> Oh, after some tests it seems like I don't understand at all how the
> default list is built. Testing with the other configuration (loading the
> environment before loading X), where my PATH is
> I get only the three components
> (no ~/bin, /bin, /usr/game). Is there yet another environment
> inheritance artefact, or does texworks filter things in any way?
>From what I've gathered so far the paths shown in the preference dialog
of TeXworks have nothing to do with your path setting. They are used *in
addition* to whatever path the application inherits from its caller
(console, X, etc.). By this you can override the default settings from
your path (i.e. if you have several TeX installations on the same
machine). In any case there are some standard locations that are used as
initial values for the list in the preferences dialog (these can be
found in src/TWapp.cpp lines 379-396 in the texworks source directory).
In order to figure out which folders TeXworks really searches during a
typeset operation I propose to add the following line to
src/TeXDocument.cpp on the line 1788:
qDebug() << binPaths;
and recompile (this is assuming you use the current SVN source code
(r246) and compile the program yourself). With this addition a list of
TeXwork's search paths is printed to the console at each typeset (if you
run the program from the console, of course).
If you're not using a self-compiled version of TeXworks I may be able to
send you a precompiled version, although I'm not sure if it would work
on your system (I'm using Ubuntu 8.10).
BTW: The output of my program is:
("/usr/local/texlive/2008/bin/i386-linux", "/usr/local/bin", "/usr/bin",
"/usr/local/sbin", "/usr/local/bin", "/usr/sbin", "/usr/bin", "/sbin",
with the first three paths being set in the preferences dialog.
Hope that helps.
More information about the texworks