[GRASS-dev] 6.3.0 release - need to set default font

Glynn Clements glynn at gclements.plus.com
Mon Nov 26 05:33:29 EST 2007


Hamish wrote:

> > Michael Barton wrote:
> > > What about making GRASS_FONT a GRASS variable rather than a shell variable?
> > > I assume that it then could be set by g.gisenv (ending up in .grassrc6) and
> > > consequently would then persist across working sessions.
> 
> Glynn Clements wrote:
> > It should go into the user's environment, via ~/.grass.bashrc or one
> > of the standard shell initialisation scripts, like any other user
> > preference.
> 
> 
> my guess here is that Michael is not seeing the GRASS_FONT set in .grass.bashrc
> as he is working in a GIS.m lauched by init.sh *before* the grass terminal
> session (and thus .grass.bashrc) is run. If gis.m is run from the grass
> terminal prompt it should see it.

That makes sense.

> If that is the case a previously mooted solution is to have a ~/.grassrc file
> which is sourced earlier in the game, before GUI subprocesses are spawned.

Agreed. Also, such a file only needs to be implemented for Bourne
shell (we don't need csh/zsh versions), as it would be sourced
directly by Init.sh rather than by the spawned shell.

Beyond that, the GUI should be handling fonts itself, both the default
font and command-specific fonts (you can't use d.font for GUI layers). 
Similarly for other preferences (e.g. GRASS_PAGER=less may be
appropriate for a shell, but not for commands run from the GUI).

> If we do add that, an idea of what a possible GRASS 7 ~/.grass/ dir might
> contain could help reduce migration issues later.

A straightforward grassrc file should suffice for all preferences. 
grass.bashrc (and grass.cshrc etc) should be reserved for commands
which have to be sourced by the interactive shell. We should really
rename the grassrc6 file; it isn't an "rc" (run commands) file. 
grass.save would be more appropriate.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list