[Qgis-developer] PyQGIS standalone without x server

Alessandro Pasotti apasotti at gmail.com
Tue Oct 28 03:53:16 PDT 2014


2014-10-28 11:47 GMT+01:00 Ziegler Stefan <Stefan.Ziegler at bd.so.ch>:
> Hi
>
> Since I do not have access to a server w/o x server I cannot test it by myself. Does anybody know if a running x server is required to run pyqgis standalone apps? E.g. something like this:
>
> app = QApplication(sys.argv)
> QgsApplication.setPrefixPath("/home/stefan/Apps/qgis_master", True)
> QgsApplication.initQgis()
>
> QgsProject.instance().setFileName(os.path.join(current_dir,  "bpav5000sw.qgs"))
> QgsProject.instance().read():
>
> QgsApplication.exitQgis()
>
> Best regards
> Stefan
>
>

I'm not sure if an X server is *always* required, what I know for sure
is that if you are going to use any SVG symbol or HTML formatted text
in a widget, then your script will crash with an ugly segfault if X
(or fake X) is not running.

-- 
Alessandro Pasotti
w3:   www.itopen.it


More information about the Qgis-developer mailing list