displaydrivers(1grass)
🌈 Display drivers 🌈
okay so bestie, welcome to the displaydrivers page of the GRASS User's Manual — yes, that's the actual name of the manual page, displaydrivers, no cap, and we're gonna get through it together 💖
The current command line rendering mechanism is direct rendering into a file. The driver is selected by setting the GRASS_RENDER_IMMEDIATE variable, or by running the d.mon module. That's it, that's the whole vibe check 👑
List of available display drivers:
- Cairo driver
- PNG driver
- PS driver (Postscript)
- HTMLMAP driver
📝 NOTES
🐍 GRASS_RENDER_COMMAND
If the environmental variable GRASS_RENDER_COMMAND is defined, rendering is redirected by the display library to the given external command defined by this variable. Currently only Python scripts are supported — so don't come at it with your Bash script and expect it to slay, it will not 🙈
Let's start with a simple example of a Python script called render.py:
#!/usr/bin/env python3
import os
import sys
import grass.script as gs
from grass.script import task as gtask
os.environ[’GRASS_RENDER_IMMEDIATE’] = ’default’
os.environ[’GRASS_RENDER_FILE’] = ’output.png’
cmd, dcmd = gtask.cmdstring_to_tuple(sys.argv[1])
gs.run_command(’d.text’, text="Test of GRASS_RENDER_COMMAND redirection")
os.environ[’GRASS_RENDER_FILE_READ’] = ’TRUE’
gs.run_command(cmd, **dcmd)
After defining the GRASS_RENDER_COMMAND variable (example for Bash):
export GRASS_RENDER_COMMAND=render.py
Display GRASS modules like d.rast or d.vect will be executed by the render.py program. For example, the command
d.vect roadsmajor
produces output PNG file output.png which will contain rendered features from vector map roadsmajor and sample text "Test of GRASS_RENDER_COMMAND redirection". literally the script is the middle-manager of your rendering pipeline and honestly? it's iconic for that 🫶
👀 SEE ALSO
d.mon, variables
📦 SOURCE CODE
Available at: Display drivers source code (history)
Accessed: Friday May 08 10:38:23 2026
Main index | Display index | Topics index | Keywords index | Graphical index | Full index
© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's a wrap on displaydrivers(1grass) for GRASS 8.5.0 — go forth and render directly into a file, bestie, you've got the main character energy for it 💅✨🦋
📦 where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 · GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 · 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