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, cairo
  • stop=string β€” name of the monitor to stop. Options: wx0, wx1, wx2, wx3, wx4, wx5, wx6, wx7, png, ps, html, cairo
  • select=string β€” name of the monitor to select. Options: wx0, wx1, wx2, wx3, wx4, wx5, wx6, wx7, png, ps, html, cairo
  • width=value β€” width for the display monitor, if it's not set by GRASS_RENDER_WIDTH. Default value: 720
  • height=value β€” height for the display monitor, if it's not set by GRASS_RENDER_HEIGHT. Default value: 480
  • resolution=value β€” dimensions of the display monitor versus the current size. Example: resolution=2 enlarges the display monitor twice, to 1280x960
  • bgcolor=name β€” background color. Either a standard color name, an R:G:B triplet, or "none" Default: white
  • output=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