[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gv] possible bug gv - won't open file

From: William Bader
Subject: Re: [bug-gv] possible bug gv - won't open file
Date: Sat, 25 Feb 2017 20:56:53 +0000

gv is only showing the error reported by gs.

You can experiment with commands like

  gs -sDEVICE=nullpage -dNOPAUSE -dSAFER test.ps -c quit

When gs blocks a file access due to -dSAFER, it should report /invalidfileaccess in --file--

When gs can not open a file, it should report Error: /undefinedfilename in --file--
Are you sure that you did not change anything else, for example, the search path that gs uses?
The command 'gs -h' shows the gs search path.
Also, your test file only loads a font. If you want to write text in the font, you should use a sequence like '/Times-Roman findfont 24 scalefont setfont'
Regards, William

From: bug-gv <bug-gv-bounces+address@hidden> on behalf of M B <address@hidden>
Sent: Saturday, February 25, 2017 1:01 PM
To: Markus Steinborn
Cc: address@hidden
Subject: Re: [bug-gv] possible bug gv - won't open file
Hello all,

thanks to all who replied about the "-dSAFER" feature, and how to defeat it.

It turns out that command-line switch "--nosafer" also works.

Attached are screenshot png images from my computer which detail the
behaviour of gv under various conditions.  The last attachment is the
file "test.ps".

Figure 1 shows the "standard" -dSAFER behaviour.

Figure 2 shows the "--nosafer" behaviour. "georgia.ttf" cannot be
found, but it is located in the CWD.  Note the difference in error
message content between Fig 1 and Fig 2.

Figure 3 shows the "--nosafer" behaviour with the PWD pre-pended to
the filename. Surprisingly, this works as expected.

Figure 4 shows the "--nosafer" behaviour with filename "./georgia.ttf"
as argument. It fails, just as in Fig 2.

I would argue that Figs 2 and 4 ought to be similar to Fig 3, and that
the behaviour is not a feature.

Thanks to any and all for the help.

On 2/23/17, Markus Steinborn <address@hidden> wrote:
> Hello,
> Nuno Silva wrote:
>> Hello,
>>  From what I can see, gv seems to have a gsSafer resource, so you can try
>> adding
>>      gv.gsSafer: False
>> to $HOME/.Xresources or $HOME/.Xdefaults
> Or add that line to an existing ~/.gv (can be created by saving settings
> either in GV options or ghostscript options.
> Greetings
> Markus Steinborn
> GNU gv maintainer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]