d.mon(1)
β¨ NAME β¨
d.mon(1) β literally the way you control graphics display monitors from the command line, bestie. This is the GRASS GIS User's Manual page for it and she is iconic π
π KEYWORDS π
display, graphics, monitors
π¦ SYNOPSIS π¦
d.mon
d.mon --help
d.mon [-lpcgsrtux] [start=string] [stop=string] [select=string]
[width=value] [height=value] [resolution=value] [bgcolor=name]
[output=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
πΈ Flags πΈ
-lβ list every monitor that's currently running, then dip out. That's it, that's the whole job.-pβ print the name of whichever monitor is currently selected, then exit. Your "who's the main character rn" check.-cβ print the commands for the currently selected monitor, then exit.-gβ print the path to the support files of the currently selected monitor, then exit.-sβ do not auto-select when starting. She starts, but she does not get picked, no cap.-rβ release <em>and</em> stop the currently selected monitor, then exit. Bye bestie π«Ά-tβ disable true colors.-uβ open the output file in update mode.
Heads up: this one requires the --overwrite flag.
-xβ launch the light-weight wx monitor with no toolbars and no statusbar.
Also requires start=wx0-7. Non-negotiable.
--overwriteβ allow output files to overwrite existing files. Chaotic but valid.--helpβ print the usage summary.--verboseβ verbose module output. She talks a lot, we love her for it.--quietβ quiet module output. She says nothing, also valid.--uiβ force launching the GUI dialog.
π Parameters π
start=stringβ name of the monitor to start. Options:wx0,wx1,wx2,wx3,wx4,wx5,wx6,wx7,png,ps,html,cairostop=stringβ name of the monitor to stop. Options:wx0,wx1,wx2,wx3,wx4,wx5,wx6,wx7,png,ps,html,cairoselect=stringβ name of the monitor to select. Options:wx0,wx1,wx2,wx3,wx4,wx5,wx6,wx7,png,ps,html,cairowidth=valueβ width for the display monitor, if it's not set byGRASS_RENDER_WIDTH. Default value:720height=valueβ height for the display monitor, if it's not set byGRASS_RENDER_HEIGHT. Default value:480resolution=valueβ dimensions of the display monitor versus the current size. Example:resolution=2enlarges the display monitor twice, to1280x960bgcolor=nameβ background color. Either a standard color name, anR:G:Btriplet, or"none"Default:whiteoutput=nameβ name for the output file (used when starting a new monitor). Ignored for'wx'monitors β they simply do not care.
π DESCRIPTION π
d.mon lets you start, select, list, release, and stop the available graphics monitors. Five verbs, one command, endless vibes.
π Starting a monitor
To display on-screen GRASS graphics, you literally have to start <em>and</em> select a graphics monitor. By default, the start command actually runs two commands, so it both starts <em>and</em> selects whatever monitor you named. You can get a list of running monitors by setting the -l flag on the command line. Note that some monitor drivers use environment variables, or the specific driver documentation β so check those if something's acting mysterious π
So when a monitor is started, it's therefore also (automatically) selected for output β unless you set the -s flag. You can also explicitly select a monitor that's already been started, if you're feeling decisive.
The desired monitor should be started once and does <em>not</em> need to be restarted unless it's stopped for some reason. A monitor may keep running for any length of time, even when no GRASS session is being run. She's independent. She's thriving. Periodt.
π Stopping a monitor
A graphics monitor has two different types of status: monitor program not running, and monitor running. A monitor that's been started and/or selected gets listed as running; a monitor that's been stopped (or never started) gets listed as not running. The -l flag will list all currently running monitors.
π¦ Selecting a monitor
When you start a monitor, it's also (automatically) selected for graphics output unless you set the -s flag. To use a monitor β like, to actually direct graphics output to it β you must select it for use, either by simply starting it without the -s flag, or by explicitly selecting it for output. Only running monitors can be selected for graphics output. Can't select a ghost, bestie.
You can run multiple graphics monitors by simply starting each of the graphics monitors you wish to direct output to.
π Releasing (unselecting) a monitor
A currently selected monitor can be released with the -r flag. Let her go, she's free β¨
β NOTES β
d.mon is designed for interactive use. If you need non-interactive use (say, in a script), set GRASS_RENDER_IMMEDIATE=png (or =cairo) and use the related environment variables to control output size and all that. That's the move for script girlies.
πΈ EXAMPLES πΈ
π wx0 monitor
To start the interactive wxGUI map display, run:
d.mon start=wx0
Figure: The initialization of display monitor wx0 All subsequently displayed data will be rendered on monitor wx0.
g.region raster=elevation -p
d.rast map=elevation
Figure: The display wx0 showing an elevation raster map
π CAIRO file renderer monitor
A CAIRO monitor can be started (and selected) by:
d.mon start=cairo output=out.pdf
From this moment on, all displayed data will be rendered into file output.pdf. Not to be dramatic but that's kind of everything.
π§ List running monitors
To list the currently running monitors, use:
d.mon -l
List of running monitors:
wx0
cairo
π Show currently selected monitor
To identify the currently selected monitor, use:
d.mon -p
cairo
β¨ Switching between monitors
To switch back to interactive display mode β here, to an earlier started and still running wxGUI monitor β use:
d.mon select=wx0
π₯ Stopping a monitor
To close the wxGUI monitor, run:
d.mon stop=wx0
π«Ά SEE ALSO π«Ά
d.erase, d.redraw, d.rast, d.vect, d.frame
See also list of variables for rendering, display drivers
π AUTHOR π
Martin Landa, OSGeoREL, Czech Technical University in Prague, Czech Republic
π SOURCE CODE π
Available at: d.mon source code (history)
Accessed: Saturday Jan 17 05:40:36 2026
Main index | Display index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
And that's the whole page bestie, no cap β shoutout to GRASS 8.4.2, and yeah, that Accessed date is literally Saturday Jan 17 05:40:36 2026 because we're thorough like that π
β¨
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms