Opened 4 years ago

Last modified 3 years ago

#3721 new defect

d.title with d.text does not insert title

Reported by: micha Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Display Version: 7.4.0
Keywords: title map display Cc:
CPU: Unspecified Platform: Linux


When using d.title combined directly with d.text, no title appears on the map display. The d.title flag -d does not create the tmp file with title text, and piping the output of d.title into d.text does not create any title.


GRASS 7.4.0 (WGS84):~ > d.title -d map=srtm_negev_3arc color=red     #
GRASS 7.4.0 (WGS84):~ > ERROR: Failed to run command 'd.text
        at=50,50'. Details:

        GRASS_INFO_ERROR(11330,1): Unable to open input file


GRASS 7.4.0 (WGS84):~ > d.title map=srtm_negev_3arc color=red size=10 |
d.text align=cc
GRASS 7.4.0 (WGS84):~ >             # No error but NO title appears

The only option that works is to redirect d.title into a text file, then run d.text:

GRASS 7.4.0 (WGS84):~ > d.title map=srtm_negev_3arc > my_title2.txt
GRASS 7.4.0 (WGS84):~ > d.text input=my_title2.txt color=red at=75,75
# Text appears as expected

Change History (7)

comment:1 by neteler, 4 years ago

Can you try

d.title map=srtm_negev_3arc color=red size=10 |
 d.text align=cc input=-

? I'm on mobile and cannot test at time

comment:2 by micha, 4 years ago

No difference on my setup. Using input=- does not give any error, but No title on the map display.

What works is redirecting d.title into a text file, then pointing to that file with d.text input=...

comment:3 by hcho, 4 years ago

There are two problems:

  1. d.title spawns d.text, but its input file gets deleted. d.text only creates a temp file for input=-, but not when a file is given. Please check r73883.
  1. d.text input=- doesn't work. Looking into it.

comment:4 by hcho, 4 years ago

One more problem:

d.mon start=wx0
d.text input=file

in one directory and change to another directory that has a different "file" and run

d.text input=file

The monitor always picks up the file in the same directory where it got started.

I think this problem is GRASS_RENDER_IMMEDIATE vs. delegated rendering by, but display modules should not care which renderer is being used.

Last edited 4 years ago by hcho (previous) (diff)

comment:5 by hcho, 4 years ago

For d.text input=-, please check r73884.

The last problem can be fixed by always creating a temporary file just like for stdin, but other display modules may have the same issue.

comment:6 by neteler, 4 years ago


Ticket retargeted after milestone closed

comment:7 by micha, 3 years ago


Checked on 7.6, the prob persists.

Note: See TracTickets for help on using tickets.