• jPV
  • Yokemate of Keyboards
    Yokemate of Keyboards
    jPV
    Posts: 2026 from 2003/2/24
    From: po-RNO
    Quote:

    Robdel wrote:
    When I click on a pdf file the mime type for it automatically ensures that it opens via vpdf, because the mime type command reads vpdf %sp.

    I am trying to do something similar for ghostscript, but have so far failed. The longwinded way which does work perfectly is as follows:

    Place the relevant file, called file.ps say, into ram. Launch ghostscript via sys:applications/ghostscript/bin/gs. This brings up the gs window into which I next type (ram:file.ps) run Everything works fine then.

    My question is how to implement that through a ps mime type? What commands do I need to enter? The problem seems to be the brackets surrounding the filename and the extra run command. Does anyone know the solution or correct syntax?



    If you try to launch "gs:bin/gs -h" in the shell (or with -help or --help argument), you get a description of the command line arguments. It appears that you don't need to use brackets when giving a file as an argument, so simple "gs:bin/gs ram:file.ps" will work.

    Also if you want that program quits automatically after viewing a file and want to disable the text output to see just the graphical output, I'd use this kind of line in the mime settings for the already existing postscript mimetype:
    Run >NIL: gs:bin/gs -dBATCH -dNOPAUSE %sp


    [ Edited by jPV 26.05.2017 - 16:27 ]
  • »26.05.17 - 14:23
    Profile Visit Website