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)?

4
  • 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
    Commented Nov 22, 2018 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
    Commented Nov 23, 2018 at 11:45
  • But you don't need a graphic device to use Python. Commented Nov 23, 2018 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
    Commented Nov 26, 2018 at 13:05

2 Answers 2

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:

2
  • 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
    Commented Nov 23, 2018 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
    Commented Nov 26, 2018 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.