Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#608 Compiling latex files don't work

General (289)
Claudio Corti

I switched to ubuntu 10.10, geany version is 0.19.1.
Now if I try to compile a latex file, geany says "/bin/sh: pdflatex: not found".
From command line outside geany and from the virtual terminal inside geany, pdflatex works.
In ~/.config/geany/filedefs/filetypes.latex there is:

linker=/home/genesys87/texlive/2009/bin/i386-linux/latex --file-line-error-style "%f"
compiler=/home/genesys87/texlive/2009/bin/i386-linux/pdflatex --file-line-error-style "%f"
run_cmd=evince "%f"
run_cmd2=xvdi "%f"

EX_00_LB=V_iew PDF File
EX_00_CM=evince "%e.pdf"
EX_01_LB=_View DVI File
EX_01_CM=evince "%e.dvi"

The path of latex and pdflatex programs in the config file above are right.


  • Claudio Corti
    Claudio Corti

    Nobody has a solution (except executing pdflatex in virtual terminal)?

  • Nick Treleaven
    Nick Treleaven

    Have you checked the command in the Build->Set Build Commands dialog?

  • Claudio Corti
    Claudio Corti

    Yes, I tried: if I put in the full path to pdflatex, the file is compiled, except when pdflatex needs to call itself (sometimes this is needed, like when using \write18 command and -shell-escape option).
    My $PATH environment variable contains the path /home/genesys87/texlive/2009/bin/i386-linux/, which is the same contained in ~/.config/geany/filedefs/filetypes.latex, so there shouldn't be problems (and older versions of geany didn't have this problem).
    Maybe geany doesn't handle correctly the $PATH variable when executes a command?

  • Claudio Corti
    Claudio Corti

    PS: when pdflatex needs to call itself, it fails because it cannot find pdflatex (ie: it doesn't find itself!!!); this is the error: "sh: pdflatex: not found" which is the same one of above.

  • Lex Trotman
    Lex Trotman

    • status: open --> pending
  • Lex Trotman
    Lex Trotman

    It sounds like pdflatex is in a non-standard path. If you start Geany from the desktop menu no shell is run and so no .bashrc or .profile (as appropriate) is read. Thus Geany and the shell it starts does not know about any extra paths you have defined in the shell startup file and so pdflatex is not found unless you use the full path (but recursive uses still do not use the full path so fail).

    You could try editing the desktop start menu item to run Geany in a shell.