d.mon2
Starts a graphics display monitor which can be controlled from the command line.
d.mon2 [-cbd] [width=integer] [height=integer] [handler=string] [tempfile=string] [percent=integer] [color=string] [--verbose] [--quiet] [--qq] [--ui]
Example:
d.mon2
grass.script.run_command("d.mon2", width=800, height=600, handler="wximgview", tempfile=None, percent=10, color="white", flags=None, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("d.mon2")
Parameters
width=integer
Width for display monitor if not set by GRASS_RENDER_WIDTH
Default: 800
height=integer
Height for display monitor if not set by GRASS_RENDER_HEIGHT
Default: 600
handler=string
Window program to use
Allowed values: ximgview, wximgview, wxpyimgview, qiv, none
Default: wximgview
tempfile=string
Name and location of temp file
percent=integer
Percentage of CPU time to use
Default: 10
color=string
Background color, either a standard GRASS color or R:G:B triplet (separated by colons)
Default: white
-c
Use the Cario driver to render images
-b
output Bourne shell code to set up display
-d
output DOS code to set up display
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
width : int, optional
Width for display monitor if not set by GRASS_RENDER_WIDTH
Default: 800
height : int, optional
Height for display monitor if not set by GRASS_RENDER_HEIGHT
Default: 600
handler : str, optional
Window program to use
Allowed values: ximgview, wximgview, wxpyimgview, qiv, none
Default: wximgview
tempfile : str, optional
Name and location of temp file
Used as: input
percent : int, optional
Percentage of CPU time to use
Default: 10
color : str, optional
Background color, either a standard GRASS color or R:G:B triplet (separated by colons)
Used as: color
Default: white
flags : str, optional
Allowed values: c, b, d
c
Use the Cario driver to render images
b
output Bourne shell code to set up display
d
output DOS code to set up display
verbose: bool, optional
Verbose module output
Default: False
quiet: bool, optional
Quiet module output
Default: False
superquiet: bool, optional
Very quiet module output
Default: False
DESCRIPTION
This is just a little experiment to see if we can make the ximgview, wximgview, and wxpyimgview programs a bit simpler to start up.
Add this to your ~/.grass.bashrc
file:
if [ `echo "$GRASS_VERSION" | cut -f1 -d.` -eq 7 ] ; then
alias d.mon='eval `d.mon.py -b`'
fi
By default the temporary file will be stored in $MAPSET/.tmp/ and cleared at the end of the session. You can put it somewhere else with the tempfile option. For example, when working remotely with PuTTY (ssh without tunnelled X) + Apache:
alias d.mon='eval `d.mon.py -b handler=none tempfile=/var/www/grassmap.png`'
then just hit reload in your web browser whenever a refresh is needed.
AUTHOR
Hamish Bowman
Dunedin, New Zealand
SOURCE CODE
Available at: d.mon2 source code
(history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819