Opened 9 years ago
Closed 8 years ago
#2683 closed defect (fixed)
grass 7 doesn't start in text mode on CentOS 7
Reported by: | morenocomelli | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.5 |
Component: | Startup | Version: | svn-trunk |
Keywords: | centos | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
I'm trying to start grass 7 on CentOS 7 in text mode (Grass 6.4.4 installed via yum works correctly). On Centos with GUI:
# grass70 -text ERROR: Unable to start GRASS. You can: - Launch GRASS with '-gui' switch (`grass70 -gui`) - Create manually GISRC file (/root/.grass7/rc) - Launch GRASS with path to the location/mapset as an argument (`grass70 /path/to/location/mapset`) Exiting...
On CentOS without GUI:
# grass70 -text WARNING: Searched for a web browser, but none found ERROR: Unable to start GRASS. You can: - Launch GRASS with '-gui' switch (`grass70 -gui`) - Create manually GISRC file (/root/.grass7/rc) - Launch GRASS with path to the location/mapset as an argument (`grass70 /path/to/location/mapset`) Exiting...
#grass70 WARNING: Searched for a web browser, but none found Starting GRASS GIS... WARNING: It appears that the X Windows system is not active. A graphical based user interface is not supported. Switching to text based interface mode. Hit RETURN to continue ERROR: Path '/home/download/grass-7.0.0/<UNKNOWN>/<UNKNOWN>' doesn't exist Exiting...
Change History (23)
comment:1 by , 9 years ago
Component: | Default → Startup |
---|---|
Keywords: | centos added |
Version: | unspecified → 7.0.0 |
comment:2 by , 9 years ago
comment:5 by , 9 years ago
Same problem with GRASS 7.0.2 and GRASS 7.1.
GRASS looks for location and mapset, and since there are none defined when starting the first time, the error appears (in text mode only).
If mapset and location are created through gui, at next start in text mode they're the default settings. An other option is to create the /root/.grass7/rc file with proper parameters and the missing part of dir tree (the supposed dirs with database, location and mapset).
follow-up: 7 comment:6 by , 9 years ago
From a (new) user's point of view, the initial part of the message
"ERROR: Unable to start GRASS."
is a bit scary. It needs to be expanded and more friendly. Especially the word "ERROR" must be removed. Proposal, let's change it into something like
"Welcome - You seem to run GRASS GIS the first time. Some settings need to be defined first. For this you can:"
Any better suggestions?
comment:7 by , 9 years ago
Replying to neteler:
From a (new) user's point of view, the initial part of the message
"ERROR: Unable to start GRASS."
is a bit scary. It needs to be expanded and more friendly. Especially the word "ERROR" must be removed. Proposal, let's change it into something like
"Welcome - You seem to run GRASS GIS the first time. Some settings need to be defined first. For this you can:"
To be changed in
lib/init/grass.py" line 1791
comment:10 by , 8 years ago
Milestone: | 7.0.4 → 7.0.5 |
---|
follow-up: 12 comment:11 by , 8 years ago
Just wanted to note that I am trying to figure out how to use GRASS for the first time today. And I want to use it from the command line.
I am getting:
ERROR: Unable to start GRASS. You can: - Launch GRASS with '-gui' switch (`grass70 -gui`) - Create manually GISRC file (/home/my_user/.grass7/rc) - Launch GRASS with path to the location/mapset as an argument (`grass70 /path/to/location/mapset`) Exiting...
and, from this text, have absolutely no idea what to do. Searching the internet based on these phrases has brought me here.
Creating an empty rc file yields nothing. Trying to point GRASS at a directory results in it telling me that said directory (seemingly no matter what it is) is an invalid GRASS location.
comment:12 by , 8 years ago
Replying to rbarnes:
Just wanted to note that I am trying to figure out how to use GRASS for the first time today. And I want to use it from the command line.
I am getting:
ERROR: Unable to start GRASS. You can: - Launch GRASS with '-gui' switch (`grass70 -gui`)
... did you try this?
See also:
https://grass.osgeo.org/grass70/manuals/helptext.html
How should we modify the message?
follow-up: 14 comment:13 by , 8 years ago
I'm running GRASS on a headless machine, so it wasn't possible for me to use a GUI on it.
I ended up installing GRASS on a spare machine, installing all the GUI packages, using the GUI, and then copying the contents of the resultant RC file and the associated directory structure to the headless machine.
I have not found instructions for "Create manually GISRC file", but, if those existed somewhere and the help text referenced them, that would be ideal.
follow-up: 16 comment:14 by , 8 years ago
Replying to rbarnes:
I'm running GRASS on a headless machine, so it wasn't possible for me to use a GUI on it.
Right.
On headless machines, use
grass70 /path/to/location/mapset
and the rc file will be generated.
I ended up installing GRASS on a spare machine, installing all the GUI packages, using the GUI, and then copying the contents of the resultant RC file and the associated directory structure to the headless machine.
I have not found instructions for "Create manually GISRC file", but, if those existed somewhere and the help text referenced them, that would be ideal.
comment:15 by , 8 years ago
That resulted in:
ERROR: ERROR: </home/myuser> is not a valid GRASS location
comment:16 by , 8 years ago
Replying to neteler:
Replying to rbarnes:
I'm running GRASS on a headless machine, so it wasn't possible for me to use a GUI on it.
Right.
On headless machines, use
grass70 /path/to/location/mapset
and the rc file will be generated.
If you have no existing GRASS DATABASE, yet, on the machine, I would recommend starting by creating one:
mkdir GRASSDATA
Then, if you have no existing GRASS GIS data, you have to create a location and mapset first. Locations are defined by their projection system. Two options exist to define this projection: either you use an existing georeferenced file, or you use an EPSG code (see grass70 --help for details).
grass70 -c EPSG:32630 /home/myuser/GRASSDATA/mylocation
will create the location 'mylocation' (using WGS 84 / UTM zone 30N projection) and the mapset PERMANENT.
If you want to enter the same location, but in a newly created mapset:
grass70 -c /home/myuser/GRASSDATA/mylocation/mymapset
If you want to create a new location (which always needs a PERMANENT mapset) and immediately enter another newly created mapset, you can combine these two steps
grass70 -e -c EPSG:32630 /home/mlennert/gg/mylocation grass70 -c /home/myuser/GRASSDATA/mylocation/mymapset
The '-e' flag tells GRASS to just create the new location (with its PERMANENT mapset), and then exit. The second call then creates and enters the new mapset mymapset.
follow-up: 18 comment:17 by , 8 years ago
Thanks. But I'm not sure how someone new to GRASS is supposed to know the foregoing. Perhaps by searching they will find this info here.
comment:18 by , 8 years ago
Version: | 7.0.0 → svn-trunk |
---|
Replying to rbarnes:
Thanks. But I'm not sure how someone new to GRASS is supposed to know the foregoing. Perhaps by searching they will find this info here.
Sure, the idea is to improve the message. Now (r68795) it reads:
grass73 ERROR: Unable to start GRASS GIS. You have the choice to: - Launch the GRASS GIS interface with the '-gui' switch (`grass73 -gui`) - Launch GRASS GIS directly with path to the location/mapset as an argument (`grass73 /path/to/location/mapset`) - Create manually the GISRC file (/home/user/.grass7/rc) See also: https://grass.osgeo.org/grass73/manuals/helptext.html Exiting...
(manual page URL added).
Any missing text from comment:16 should be added to that manual page.
If this modified error message is ok, I'll backport it. Otherwise please suggest rephrasing.
follow-up: 21 comment:20 by , 8 years ago
In r68808 I've added a section on text-based startup with location creation.
comment:21 by , 8 years ago
follow-up: 23 comment:22 by , 8 years ago
These changes look quite reasonable to me. Thanks so much!
comment:23 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to rbarnes:
These changes look quite reasonable to me. Thanks so much!
Great. Thanks for your report. Closing.
The behavior should be same for system with and without GUI if
-text
is used. Except for the warnings about browser and X. It seems that this is true. Perhaps the warnings shouldn't be there in the text mode since they are useless and probably annoying. Would you like to have them removed when-text
? But note that the issue is that you can start with-text
and then open some GUI (quite common usage) and in this case the warnings are quite useful.In both cases it prints the same message with suggestion what can be done to start GRASS GIS. This is perhaps the important difference to GRASS GIS 6.4 where a text-based interface was started. There is none like this in 7.0. The
-text
interface means command line parameters ofgrass70
and command line inside GRASS session.I'm not sure with the other error you are getting. It seems that when you start for the second time on the same machine after unsuccessful first start, you get different error which does not have any suggestions how to fix it. I think this is wrong but I'm actually not sure how this happens. I'm not completely sure what is the purpose of
UNKNOWN
strings in the rc file and how they get there (there is a create_initial_gisrc() function but I though the created file conntent is always used only internally bygrass.py
).