View Full Version : [gnome] Nautilus vs. user environment

February 21st, 2011, 04:56 PM

I am using kile (and sometimes texmaker) to edit LaTeX documents. My private TeX style files are located in ~/localtexmf/ and I am using the TEXMFLOCAL environment variable (which I define in my ~/.cshrc) to tell kpathsea to search for files in this directory. If I call kile or texmaker from the shell prompt, I can use the kile/texmaker shortcuts to run LaTeX on my document (and it finds files in my localtexmf files as it should). If I open kile or texmaker by clicking the document's icon in Nautilus, kile (resp. texmaker) opens correctly and I can still run LaTeX as long as only standard packages (from the system-wide texmf directory) are used, but files in my localtexmf are not found. I found out that, obviously, Nautilus launches programs without passing the environment to them. I tried to find options in the Nautilus settings, but did not succeed. Maybe Nautilus is running in a different shell or it intensionally avoids using any shell.

My questions:
- Is there any way of passing my custom environment variables to application programs "through" Nautilus?
- If not, why not?

Thanks and greetings, Ulrich

April 2nd, 2011, 09:55 AM
I figured out a solution myself by the help of other forums. In case somebody stumbles across my posting, I am posting the - finally very simple - solution:

I added the necessary command to ~/.gnomerc:


export PERLLIB=~/perl/lib/
export TEXMFLOCAL=~/localtexmf/
That was it. It works nicely.