<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 06-09-2020 05:05, Vaclav Petras
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CABo5uVuT07edJtqwdU0bKcFkPd-4Y_EgRn8-MMDJbJ8wjv-O1g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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>
</blockquote>
On my Windows computer, I have installed GRASS using OSGeo4W.
OSGeo4W comes with a shell from which I can start grass. Is that
true for the stand alone installer as well?<br>
<blockquote type="cite"
cite="mid:CABo5uVuT07edJtqwdU0bKcFkPd-4Y_EgRn8-MMDJbJ8wjv-O1g@mail.gmail.com">
<div dir="ltr">
<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>
</blockquote>
<p><br>
</p>
<p>This would be my (strong) preference, serves both experienced
users who like to work from the terminal and novices well. The
fact that it doesn't take much work is a bonus <br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CABo5uVuT07edJtqwdU0bKcFkPd-4Y_EgRn8-MMDJbJ8wjv-O1g@mail.gmail.com">
<div dir="ltr">
<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>
</blockquote>
<p><br>
</p>
<p>Not sure I understand this option - you mean to say that one can
only start the terminal from the GUI? If so, I don't see the
advantage of this option. <br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CABo5uVuT07edJtqwdU0bKcFkPd-4Y_EgRn8-MMDJbJ8wjv-O1g@mail.gmail.com">
<div dir="ltr">
<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>
</blockquote>
<p><br>
</p>
<p>I am not sure I fully understand this option, but if it means one
has to choose, terminal <u>or</u> GUI, I would be very much
against this option. I very often use both (and often enough in
combination with R starting from the command line). I know I could
use the console, but I don't find that near as convenient as
working from the terminal. And what would be the added value of
this option?<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CABo5uVuT07edJtqwdU0bKcFkPd-4Y_EgRn8-MMDJbJ8wjv-O1g@mail.gmail.com">
<div dir="ltr">
<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>
</blockquote>
<p><br>
</p>
<p>Idem to above<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CABo5uVuT07edJtqwdU0bKcFkPd-4Y_EgRn8-MMDJbJ8wjv-O1g@mail.gmail.com">
<div dir="ltr">
<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"
moz-do-not-send="true">https://trac.osgeo.org/grass/ticket/3474</a></div>
<div>[2] <a href="https://github.com/OSGeo/grass/pull/768"
moz-do-not-send="true">https://github.com/OSGeo/grass/pull/768</a></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
grass-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/grass-dev">https://lists.osgeo.org/mailman/listinfo/grass-dev</a></pre>
</blockquote>
</body>
</html>