[GRASS-dev] [GRASS GIS] #3573: Save current working directory in wxGUI workspace and use it

GRASS GIS trac at osgeo.org
Thu Jun 7 09:11:15 PDT 2018

#3573: Save current working directory in wxGUI workspace and use it
  Reporter:  wenzeslaus   |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  8.0.0
 Component:  Startup      |    Version:  unspecified
Resolution:               |   Keywords:  workspace, recent, startup, wxGUI
       CPU:  Unspecified  |   Platform:  Unspecified

Comment (by wenzeslaus):

 Replying to [comment:4 mlennert]:
 > Replying to [comment:2 wenzeslaus]:
 > > Replying to [comment:1 mlennert]:
 > > > I have to admin that I never even noticed that we had this option.
 > >
 > > Accessible from Setting or using cd command in the Console tab (you
 basically get some consistency between terminal and Console tab).
 > I don't know what you mean by consistency, but when I cd in the console
 this (obviously) has no impact on the terminal pwd.

 Consistency in that the directory can be changed both for terminal and for
 the Console in GUI.

 > > > I find this a bit weird, first of all because I don't know what the
 "current working directory" actually means in GRASS GIS?
 > >
 > > It means just the same thing it means in the command line. Every
 program has current working directory (or whatever we want to call it).
 `cd` and `$PWD` or `pwd` in Linux command line, `os.getcwd()` and
 `os.chdir()` in Python.
 > Yes, but here we have to be careful to be clear that when we say
 "program", we mean the GUI, not any GRASS module launched from anywhere.

 That's definitively something we could improve: putting it to a better
 place in menu, giving a better message when the change happens, ...

 > > > Does it have any other effect?
 > >
 > > You can put all your files for import and all color tables for one
 project into one directory (and perhaps subdirs) and then just cd there
 and you don't need to use full path just a relative one. I guess that's
 clear, but the point is that it applies for terminal as well as the GUI
 Console tab.
 > I don't know what you mean by "it applies" ? How ? IIUC your ticket, you
 are pleading for that it should ? But this would only be for the situation
 where the pwd is stored in a workspace, or ?

 The functionality to change the directory is already in GUI, so the
 benefits of it apply to GUI Console as well as terminal (where is it

 This ticket is just for the storing and loading from workspace.

 > >It is also advantageous when people are following commands in a list of
 instructions - you need to deal with specifying the path just once (and
 the exported files will be in the directory set at the beginning).
 > But you have to be very careful to make sure that all commands are
 executed either only in the console/GUI or only in the terminal...

 I switch between them all the time, but I don't see beginners doing that.

Ticket URL: <https://trac.osgeo.org/grass/ticket/3573#comment:5>
GRASS GIS <https://grass.osgeo.org>

More information about the grass-dev mailing list