• operator run not working

    From wolli@21:1/5 to All on Wed Aug 26 17:57:44 2020
    hello,

    I have some files (drawing flags, e.g. germany.ps) and a file (tools.ps), containing some helper functions (e.g. hex2dez, converting hex values to
    rgb values).
    These helper functions are included/imported in the flag files with
    "(tools.ps) run".
    Both files are in the same directory.

    Viewing such files with gv was possible some years ago (gs v. 9.24?),
    now with current ghostscript(v. 9.52) I get an error message
    "/ivalidfileaccess in --run--" [1].

    I tried parameters -dNOSAFE, -P with no effect.

    What can I do?

    Wolfgang

    --------------------
    [1] Error: /invalidfileaccess in --run--
    Operand stack:
    (tools.ps) (r)
    Execution stack:
    %interp_exit .runexec2 --nostringval-- run --nostringval--
    2 %stopped_push --nostringval-- run run false 1
    %stopped_push 1990 1 3 %oparray_pop 1989 1 3
    %oparray_pop 1988 1 3 %oparray_pop run 1977 1 3
    %oparray_pop 1833 1 3 %oparray_pop --nostringval--
    %errorexec_pop .runexec2 --nostringval-- run --nostringval-- 2
    %stopped_push --nostringval-- 1990 1 3 %oparray_pop run Dictionary stack:
    --dict:735/1123(ro)(G)-- --dict:0/20(G)-- --dict:79/200(L)--
    Current allocation mode is local
    Last OS error: Permission denied
    Current file position is 190
    GPL Ghostscript 9.52: Unrecoverable error, exit code 1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From luser droog@21:1/5 to wolli on Wed Aug 26 10:14:36 2020
    On Wednesday, August 26, 2020 at 10:58:08 AM UTC-5, wolli wrote:
    hello,

    I have some files (drawing flags, e.g. germany.ps) and a file (tools.ps), containing some helper functions (e.g. hex2dez, converting hex values to
    rgb values).
    These helper functions are included/imported in the flag files with "(tools.ps) run".
    Both files are in the same directory.

    Viewing such files with gv was possible some years ago (gs v. 9.24?),
    now with current ghostscript(v. 9.52) I get an error message "/ivalidfileaccess in --run--" [1].

    I tried parameters -dNOSAFE, -P with no effect.

    What can I do?


    Check spelling. "-dNOSAFER"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From luser droog@21:1/5 to luser droog on Wed Aug 26 10:21:14 2020
    On Wednesday, August 26, 2020 at 12:14:37 PM UTC-5, luser droog wrote:
    On Wednesday, August 26, 2020 at 10:58:08 AM UTC-5, wolli wrote:
    hello,

    I have some files (drawing flags, e.g. germany.ps) and a file (tools.ps), containing some helper functions (e.g. hex2dez, converting hex values to rgb values).
    These helper functions are included/imported in the flag files with "(tools.ps) run".
    Both files are in the same directory.

    Viewing such files with gv was possible some years ago (gs v. 9.24?),
    now with current ghostscript(v. 9.52) I get an error message "/ivalidfileaccess in --run--" [1].

    I tried parameters -dNOSAFE, -P with no effect.

    What can I do?


    Check spelling. "-dNOSAFER"

    Another option would be to pre-process the files with a tool like psinc
    from Bill Casselman.

    https://github.com/luser-dr00g/ibis.ps/blob/master/psinc

    It will replace any lines matching ^(.*)[ ]*run with the file contents, recursively for each included file.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolli@21:1/5 to All on Wed Aug 26 23:57:31 2020
    even -dNOSAFER not working. (I forget the last letter)

    I know Cassleman's perl script psinc.

    Let me ask my question more precisely: Is there any possibility (a
    parameter or any other thing) to view (with gv) directly, without
    intermediate tools, a file importing another with (file.ps) run? As it
    was possible before (gs v. 5.24)?

    Am 26.08.20 um 19:21 schrieb luser droog:
    On Wednesday, August 26, 2020 at 12:14:37 PM UTC-5, luser droog wrote:
    On Wednesday, August 26, 2020 at 10:58:08 AM UTC-5, wolli wrote:
    hello,

    I have some files (drawing flags, e.g. germany.ps) and a file (tools.ps), >>> containing some helper functions (e.g. hex2dez, converting hex values to >>> rgb values).
    These helper functions are included/imported in the flag files with
    "(tools.ps) run".
    Both files are in the same directory.

    Viewing such files with gv was possible some years ago (gs v. 9.24?),
    now with current ghostscript(v. 9.52) I get an error message
    "/ivalidfileaccess in --run--" [1].

    I tried parameters -dNOSAFE, -P with no effect.

    What can I do?


    Check spelling. "-dNOSAFER"

    Another option would be to pre-process the files with a tool like psinc
    from Bill Casselman.

    https://github.com/luser-dr00g/ibis.ps/blob/master/psinc

    It will replace any lines matching ^(.*)[ ]*run with the file contents, recursively for each included file.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ken@21:1/5 to All on Thu Aug 27 07:59:00 2020
    In article <ri6lsv$1onn$1@gioia.aioe.org>, wjb131@web.de says...

    Please don't top-post, this is generally regarded as bad form on UseNet
    as it makes threads very hard to follow.

    even -dNOSAFER not working. (I forget the last letter)

    Then I suggest you are still doing something wrong, its known to work
    properly. However, gv is not Ghostscript. While gv *uses* Ghostscript
    the two are not the same.


    Let me ask my question more precisely: Is there any possibility (a
    parameter or any other thing) to view (with gv) directly, without intermediate tools, a file importing another with (file.ps) run? As it
    was possible before (gs v. 5.24)?

    If there ever was a version 5.24 of Ghostscript it was more than 20
    years ago. I suspect you mean version 9.24.

    And the answer is yes; use -dNOSAFER. If that isn't working for you
    there are several possibilities, and you should start by checking
    Ghostscript itself.

    Take your PostScript program and run it through Ghostscript either to
    the display device or the nullpage device, does that work ?

    If not then you are in a position to open a bug report with the
    Ghostscript developers at bugs.ghostscript.com. Don't forget to attach
    the PostScript required to reproduce the problem and supply a complete Ghostscript command line.

    If it does work, then the problem is not Ghostscript, perhaps gv simply
    cannot pass the parameter correctly.

    Note that you don't say where you acquired the Ghostscript executable
    you are using (I'm assuming you are on a Linux system because you are
    using gv). It is also possible that the executable has been built
    incorrectly, causing your problem. Hence why you should start by
    determining whether you executable works correctly.


    Regards

    Ken

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From luser droog@21:1/5 to wolli on Thu Aug 27 03:02:54 2020
    On Wednesday, August 26, 2020 at 4:57:57 PM UTC-5, wolli wrote:
    even -dNOSAFER not working. (I forget the last letter)

    I know Cassleman's perl script psinc.

    Let me ask my question more precisely: Is there any possibility (a
    parameter or any other thing) to view (with gv) directly, without intermediate tools, a file importing another with (file.ps) run? As it
    was possible before (gs v. 5.24)?


    Can you open gv and go to State->Ghostscript Options and un-select
    "SAFER" there? (For me it's in the upper right hand corner next to
    QUIET.) You should be able to save the new setting for it to take
    effect on the next run.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolli@21:1/5 to All on Thu Aug 27 19:30:39 2020
    Am 27.08.20 um 12:02 schrieb luser droog:

    Can you open gv and go to State->Ghostscript Options and un-select
    "SAFER" there? (For me it's in the upper right hand corner next to
    QUIET.) You should be able to save the new setting for it to take
    effect on the next run.

    Yes, I can. But "SAFER" can be selected or unselected.

    It works for me (using manjaro linux) with this configuration (in a
    shell, in gv and in gsview):

    (1) declare the absolute path of the file to be included into the file flagXX.ps via:

    (/home/user/path/to/tools.inc) run,

    and

    (2) in gv, State->Ghostscript Options etc. write "-dNOSAFER" into the
    list of arguments for gs.

    Regards
    Wolfgang

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)