I just use a Makefile[1] for this, I just type 'make', and it builds it and uses xdg-open to open it in my PDF viewer. Much faster than waiting for ShareLaTeX or similar web apps to re-render.
Gummi[2] is also nice for instant feedback, and you don't need to get the whole toolchain working by hand.
You can try latexmk, it does almost all of the work when building LaTeX (including getting cross-references right) and can even watch for changes and rebuild the document when necessary, updating your PDF reader too. Just calling _latexmk -pdf -silent -xelatex -pvc mydoc.tex_ should suffice (the -pvc option is for the continuous build and preview mode).
Gummi[2] is also nice for instant feedback, and you don't need to get the whole toolchain working by hand.
1: https://gist.github.com/rhinoceraptor/8b7e9bf650db6396e27e
2: https://github.com/alexandervdm/gummi