[Qgis-developer] PyQGIS standalone without x server

Ziegler Stefan Stefan.Ziegler at bd.so.ch
Tue Oct 28 05:41:14 PDT 2014


Thanks!

Regards
Stefan 

> -----Ursprüngliche Nachricht-----
> Von: Martin Dobias [mailto:wonder.sk at gmail.com]
> Gesendet: Dienstag, 28. Oktober 2014 11:56
> An: Ziegler Stefan
> Cc: qgis-developer at lists.osgeo.org
> Betreff: Re: [Qgis-developer] PyQGIS standalone without x server
> 
> Hi Stefan
> 
> On Tue, Oct 28, 2014 at 5:47 PM, Ziegler Stefan <Stefan.Ziegler at bd.so.ch> wrote:
> >
> > 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)
> 
> The X server is required here. QApplication will try to make a connection to it.
> QCoreApplication does not - but it brings other limitations.
> 
> Actually there is an easy way to try it out - just set DISPLAY env variable to nothing:
> 
> martin at zenbook:~$ DISPLAY="" python
> Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type "help",
> "copyright", "credits" or "license" for more information.
> >>> from PyQt4 import QtGui
> >>> app = QtGui.QApplication([])
> : cannot connect to X server
> 
> (the process is aborted)
> 
> Cheers
> Martin


More information about the Qgis-developer mailing list