<div dir="ltr"><div>Dear all,</div><div><br></div><div>What do you think about making the terminal window optional?<br></div><div><br></div><div>When you start GRASS GIS now, it always also starts with a system terminal window which has a shell which has modified prompt and history. What I'm proposing is to make this opt-in, i.e., a user will have to take an action in order to get this terminal.</div><div><br></div><div>If there is no terminal by default, only users who actually want that will get it which means that the users who don't ask for it don't have to wonder what that is or what is the relation between terminal and GUI. This may clarify some of the first-time user confusion such as "once i open the grass gis console...it opens another application called layer manager"
 [1]. For those who don't use the terminal, this would also simplify all the exit and switch mapset situations such as "Close GUI" versus "Quit GRASS GIS". Users starting GRASS GIS from a terminal won't be affected by it. Users who want to use GRASS GIS from terminal could just start GRASS GIS from terminal.<br></div><div><br></div><div>Up until recently, GRASS GIS was not able to start without a terminal. However, the current master branch can now do that [2]. This gives a new choice of starting without a terminal because now GRASS GIS detects presence of an interactive terminal and when it is started from or with that, it starts the shell otherwise it does not. This makes, for example, Atl+F2 on Linux desktops work - in that case there is no terminal, so GRASS GIS starts without that (as opposed to failing as in the past).<br></div><div><br></div><div>We now have these options:</div><div><br></div><div>1. Have terminal started when GRASS GIS is started from a desktop launcher such as the Start menu on Windows. This is the current behavior in 7.8 plus the fix of requiring a terminal if it is not present, i.e. in cases such as the Atl+F2 on Linux, you will get GRASS GIS without a terminal.<br></div><div><br></div><div>2. Remove the terminal from desktop launchers so that GRASS GIS starts without the terminal when started in the GUI way. When a user starts GRASS GIS using a command from an existing terminal, there is no change from the current behavior: a (sub-)shell is started and possibly GUI launches.<br></div><div><br></div><div>3. The same as option 2 (no terminal from desktop launchers, shell from terminal), but only when the GUI will allow to start a terminal application using a menu entry.<br></div><div><br></div><div>4. Make the shell start only in the text mode (grass --text) or with a new additional option (--shell), i.e., you get it, only when you actually ask for it. In other words, with --text, GRASS GIS would behave more like R or Octave, without that (with --gui), it would behave more like QGIS or any other GUI application. (This includes the no terminal from desktop launchers from option 2.)<br></div><div></div><div><br></div><div>5. The same as option 4 (shell only with --text or --shell), but only when the GUI will allow to start a terminal application using a menu entry as in option 3.</div><div><br></div><div>Option 1 does not require any further work. Option 2 is mostly a trivial distribution issue. On Linux it should be one line. I'm not sure about macOS and Windows. Option 3 is difficult (see below). Option 4 is relatively simple to implement. Option 5 adds the option 3 difficulties.<br></div><div><br></div><div>Option 3 is difficult to implement because a) there is no cross-platform way of starting the system terminal application and there is none even for just Linux (unlike, for example, system web browser for which we even have a Python package to do that) and b) starting a shell in the terminal with specific settings is then an additional challenge because a command must be passed through that terminal application. Hence, the solution needs to make this customizable so that each user can set whatever works with the given system, prefered terminal application and shell. Additionally, closing that newly created terminal or making the exit there close the GUI (as it is currently done with the shell) may not be even possible.<br></div><div><br></div><div>Let me know which option you like or if you have additional suggestions.<br></div><div><br></div><div>I'm sending this to grass-dev, but if you think this should be cross-posted on grass-user, feel free to do that.</div><div><br></div><div>Best,<br></div><div>Vaclav<br></div><div><br></div><div>[1] <a href="https://trac.osgeo.org/grass/ticket/3474">https://trac.osgeo.org/grass/ticket/3474</a></div><div>[2] <a href="https://github.com/OSGeo/grass/pull/768">https://github.com/OSGeo/grass/pull/768</a></div><div></div><div></div></div>