# Commands paths in TeXstudio on Mac OS X - with 'could not start the command' error

When I am trying to 'quick build' my document in TeXstudio 2.1 on Mac OS X 10.6.8, I am getting and error: could not start the command (with 'quick build' options being LaTeX + DviPdf + PdfViewer). I know that this question has resonated across different forums:

and I realized that the key to solution is to set the right commands paths in options > configure texstudio > commands - the image below shows exactly how I set it up. So I set ALL command paths to /usr/texbin/latex, Now, the error disappears, TeXstudio starts the compilation process, but never finishes - it simply freezes in the compilation process.

I have to add I compiled the document in TeXShop and it works fine, so... it must be something I messed up with the command paths...

-
/usr/texbin is fine, but it must be followed by the right tool; for PdfLaTeX it should be pdflatex, for instance. –  egreg Dec 17 '11 at 21:37

## Paths for a MacTeX distribution

The following settings should work:

latex       "/usr/texbin/latex" -synctex=1 -interaction=nonstopmode %.tex
dvips       "/usr/texbin/dvips" -o %.ps %.dvi
ps2pdf      "/usr/local/bin/ps2pdf" %.ps
MakeIndex   "/usr/texbin/makeindex" %.idx
BiBTeX      "/usr/texbin/bibtex" %.aux
pdfLaTeX    "/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode %.tex
dvipdf      "/usr/texbin/dvipdfm" %.dvi
dvipng      "/usr/texbin/dvipng" -T tight -D 120 %.dvi
Metapost    "/usr/texbin/mpost" --interaction nonstopmode
DVI viewer  open %.dvi
PS viewer   open %.ps
PDF viewer  open %.pdf
Ghostscript /usr/local/bin/gs "?am.ps"
Asymptote   "/usr/texbin/asy" %.asy


## Paths for other types of distributions

If you are using any other TeX distribution, for example MacPorts or Fink, you will need to change /usr/texbin/ to the relevant path in that particular distribution. In MacPorts it is /opt/local/bin/.

I would not recommend using such a distribution, however, as they are generally harder to keep updated.

## Screenshot

-
I've added -synctex=1 also to the PdfLaTeX entry, which of course is missing from the screen shot, but is highly convenient. –  egreg Dec 17 '11 at 21:47
Thanks, I've updated to screenshot. –  Alan Munn Dec 17 '11 at 22:00
Excellent, thank you Alan and @egreg - it works perfectly! –  Geek On Acid Dec 17 '11 at 22:18
Thanks!! I had %.aux inside of double quote, I have changed to "/usr/texbin/bibtex" %.aux and all is ok. –  user14610 May 15 '12 at 11:54
my configuration is exactly what you typed up there, but still I get the error "could not start the command". I am using a newer version of TexMaker with MacTex. Where am I doing wrong? –  user23243 Dec 12 '12 at 11:00