2

Recently, I tried to open a QGIS project on Ubuntu, but I can only use Ubuntu's terminal for that which gives me the following error:

    QGIS starting in non-interactive mode not supported.
You are seeing this message most likely because you have no DISPLAY environment variable set.

So I understand QGIS can't be used without a graphic device.

Is there any (Open Source) GIS software that allows you to work only through Ubuntu's terminal or at least one that lets you open projects only using Ubuntu's terminal (where the project could have been made through a graphic device)?

closed as unclear what you're asking by HeikkiVesanto, nmtoken, Richard Law, xunilk, BERA Nov 24 '18 at 18:20

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    You can work with QGIS through Python in the terminal. You really need to specify what you want to do with the GIS to get an answer. – HeikkiVesanto Nov 22 '18 at 17:53
  • I can't work only through Python in the terminal since I can't use a graphic device. I just want to open a QGIS project I made using two plugins (RefFunctions and qgis2web), but since I don't know if that's possible, a GIS that can export its map to html would be fine. – Ignacio dt Nov 23 '18 at 11:45
  • But you don't need a graphic device to use Python. – Richard Law Nov 23 '18 at 23:31
  • Sorry if I have been unclear. So to put it simply, how do I use QGIS through Python in the terminal without a graphic device on Ubuntu? – Ignacio dt Nov 26 '18 at 13:05
3

@AndreJ already mentioned GRASS, which is definitely avaliable in Ubuntu.

The GRASS startup program has explecit options to start without a graphical user interface. From the manual page:

grass74 [-h | -help | --help] [-v | --version] [-c | -c geofile | -c EPSG:code[:datum_trans]] [-text | -gtext | -gui] [[[<GISDBASE>/]<LOCATION_NAME>/] <MAPSET>]

Flags:

-text Indicates that Text-based User Interface should be used (skip welcome screen)

-gtext Indicates that Text-based User Interface should be used (show welcome screen)

Here some relevant links about its use without a GUI:

  • Thanks for answering. I'm not really experienced with GRASS GIS, so would I be able to create a map with rule based layer fields and export it to html with it? – Ignacio dt Nov 23 '18 at 12:28
  • 1
    Unfortunately, GRASS is not the most friendly thing, Grass was born when everything was done in a terminal, so your task if feasible, but it does not mean easy. – Marco Nov 26 '18 at 22:24
3

The standard GIS tools GDAL, GRASS, SAGA CMD and Orfeo Toolbox work on the command line.

If you want to write your own code, you can use GDAL and some QGIS tools in Python without the need of a GUI.

Not the answer you're looking for? Browse other questions tagged or ask your own question.