diff --git a/GraphvizPreview.py b/GraphvizPreview.py index f931909..fb8f47e 100644 --- a/GraphvizPreview.py +++ b/GraphvizPreview.py @@ -31,8 +31,10 @@ def run(self, edit): try: if platform.system() == 'Windows': os.startfile(pdf_filename) + elif platform.system() == 'Linux': + call(['xdg-open', pdf_filename], env=ENVIRON) else: - call(['open', pdf_filename], env=ENVIRON) + call(['open', pdf_filename], env=ENVIRON) except Exception as e: sublime.error_message('Graphviz: Could not open PDF, ' + str(e)) raise e