How to set mupdf-gl as a default application with a fixed resolution

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















I am using Linux Mint Tara (xfce). I would like to use mupdf-gl as a default application for viewing pdf files and automatically set 150 dpi as the resolution, i.e. when I double click a pdf file, it should be opened in mupdf-gl with the resolution set to 150 dpi. Currently it opens in mupdf-gl with the default resolution of 72 dpi. The resolution can be set on the command line as follows: mupdf-gl -r 150 FileToOpen.pdf but I don't know how to set it for files which are to be opened using the mouse.



Note that since mupdf-gl is not available in the repositories, I have downloaded the source files from mupdf.com and built it on my machine.










share|improve this question
























  • how did you tell xfce (or whatever) to associated PDFs with mupdf?

    – thrig
    Jan 30 at 18:29











  • I right clicked on a pdf file in the file manager (thunar) -> open with another application -> use a custom command (in this case /usr/bin/mupdf-gl) and checked the box "use as default for this kind of file"

    – Salil S. Kulkarni
    Jan 30 at 18:54











  • @SalilS.Kulkarni you can edit the custom command given in thunar to include the -r 150 option itself and then check the box.

    – Prathu Baronia
    Jan 31 at 11:54











  • @PrathuBaronia Thanks for point it out. It works

    – Salil S. Kulkarni
    Jan 31 at 17:53















1















I am using Linux Mint Tara (xfce). I would like to use mupdf-gl as a default application for viewing pdf files and automatically set 150 dpi as the resolution, i.e. when I double click a pdf file, it should be opened in mupdf-gl with the resolution set to 150 dpi. Currently it opens in mupdf-gl with the default resolution of 72 dpi. The resolution can be set on the command line as follows: mupdf-gl -r 150 FileToOpen.pdf but I don't know how to set it for files which are to be opened using the mouse.



Note that since mupdf-gl is not available in the repositories, I have downloaded the source files from mupdf.com and built it on my machine.










share|improve this question
























  • how did you tell xfce (or whatever) to associated PDFs with mupdf?

    – thrig
    Jan 30 at 18:29











  • I right clicked on a pdf file in the file manager (thunar) -> open with another application -> use a custom command (in this case /usr/bin/mupdf-gl) and checked the box "use as default for this kind of file"

    – Salil S. Kulkarni
    Jan 30 at 18:54











  • @SalilS.Kulkarni you can edit the custom command given in thunar to include the -r 150 option itself and then check the box.

    – Prathu Baronia
    Jan 31 at 11:54











  • @PrathuBaronia Thanks for point it out. It works

    – Salil S. Kulkarni
    Jan 31 at 17:53













1












1








1








I am using Linux Mint Tara (xfce). I would like to use mupdf-gl as a default application for viewing pdf files and automatically set 150 dpi as the resolution, i.e. when I double click a pdf file, it should be opened in mupdf-gl with the resolution set to 150 dpi. Currently it opens in mupdf-gl with the default resolution of 72 dpi. The resolution can be set on the command line as follows: mupdf-gl -r 150 FileToOpen.pdf but I don't know how to set it for files which are to be opened using the mouse.



Note that since mupdf-gl is not available in the repositories, I have downloaded the source files from mupdf.com and built it on my machine.










share|improve this question
















I am using Linux Mint Tara (xfce). I would like to use mupdf-gl as a default application for viewing pdf files and automatically set 150 dpi as the resolution, i.e. when I double click a pdf file, it should be opened in mupdf-gl with the resolution set to 150 dpi. Currently it opens in mupdf-gl with the default resolution of 72 dpi. The resolution can be set on the command line as follows: mupdf-gl -r 150 FileToOpen.pdf but I don't know how to set it for files which are to be opened using the mouse.



Note that since mupdf-gl is not available in the repositories, I have downloaded the source files from mupdf.com and built it on my machine.







pdf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 30 at 18:40









Rui F Ribeiro

40.3k1479137




40.3k1479137










asked Jan 30 at 17:45









Salil S. KulkarniSalil S. Kulkarni

82




82












  • how did you tell xfce (or whatever) to associated PDFs with mupdf?

    – thrig
    Jan 30 at 18:29











  • I right clicked on a pdf file in the file manager (thunar) -> open with another application -> use a custom command (in this case /usr/bin/mupdf-gl) and checked the box "use as default for this kind of file"

    – Salil S. Kulkarni
    Jan 30 at 18:54











  • @SalilS.Kulkarni you can edit the custom command given in thunar to include the -r 150 option itself and then check the box.

    – Prathu Baronia
    Jan 31 at 11:54











  • @PrathuBaronia Thanks for point it out. It works

    – Salil S. Kulkarni
    Jan 31 at 17:53

















  • how did you tell xfce (or whatever) to associated PDFs with mupdf?

    – thrig
    Jan 30 at 18:29











  • I right clicked on a pdf file in the file manager (thunar) -> open with another application -> use a custom command (in this case /usr/bin/mupdf-gl) and checked the box "use as default for this kind of file"

    – Salil S. Kulkarni
    Jan 30 at 18:54











  • @SalilS.Kulkarni you can edit the custom command given in thunar to include the -r 150 option itself and then check the box.

    – Prathu Baronia
    Jan 31 at 11:54











  • @PrathuBaronia Thanks for point it out. It works

    – Salil S. Kulkarni
    Jan 31 at 17:53
















how did you tell xfce (or whatever) to associated PDFs with mupdf?

– thrig
Jan 30 at 18:29





how did you tell xfce (or whatever) to associated PDFs with mupdf?

– thrig
Jan 30 at 18:29













I right clicked on a pdf file in the file manager (thunar) -> open with another application -> use a custom command (in this case /usr/bin/mupdf-gl) and checked the box "use as default for this kind of file"

– Salil S. Kulkarni
Jan 30 at 18:54





I right clicked on a pdf file in the file manager (thunar) -> open with another application -> use a custom command (in this case /usr/bin/mupdf-gl) and checked the box "use as default for this kind of file"

– Salil S. Kulkarni
Jan 30 at 18:54













@SalilS.Kulkarni you can edit the custom command given in thunar to include the -r 150 option itself and then check the box.

– Prathu Baronia
Jan 31 at 11:54





@SalilS.Kulkarni you can edit the custom command given in thunar to include the -r 150 option itself and then check the box.

– Prathu Baronia
Jan 31 at 11:54













@PrathuBaronia Thanks for point it out. It works

– Salil S. Kulkarni
Jan 31 at 17:53





@PrathuBaronia Thanks for point it out. It works

– Salil S. Kulkarni
Jan 31 at 17:53










2 Answers
2






active

oldest

votes


















1














It sounds like you can simply make a little wrapper script that applies your desired arguments:



#!/bin/sh
exec /usr/bin/mupdf-gl -r 150 "$@"


and then save this code somewhere on the system (say to /usr/bin/my-mupdf), make it executable (chmod +x /usr/bin/my-mupdf), and then select the path to this wrapper script from the GUI (/usr/bin/my-mupdf instead of /usr/bin/mupdf-gl). This way the GUI calls your wrapper script which in turn replaces itself with mupdf-gl with the appropriate arguments.






share|improve this answer






























    0














    Just create an alias for mupdf-gl, like this:-



    $ alias mupdf-gl=mupdf-gl -r 150



    Be sure to include this line in your /home/.bash_aliases to avoid typing it again.






    share|improve this answer























    • Does this alias also applies to files which will be opened by double clicking in the file manager or will be useful only for opening the files using the command lines

      – Salil S. Kulkarni
      Jan 30 at 18:22











    • I checked, this does not work for mouse clicked files. Let me find a solution and update my answer.

      – Prathu Baronia
      Jan 31 at 9:31










    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f497745%2fhow-to-set-mupdf-gl-as-a-default-application-with-a-fixed-resolution%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    It sounds like you can simply make a little wrapper script that applies your desired arguments:



    #!/bin/sh
    exec /usr/bin/mupdf-gl -r 150 "$@"


    and then save this code somewhere on the system (say to /usr/bin/my-mupdf), make it executable (chmod +x /usr/bin/my-mupdf), and then select the path to this wrapper script from the GUI (/usr/bin/my-mupdf instead of /usr/bin/mupdf-gl). This way the GUI calls your wrapper script which in turn replaces itself with mupdf-gl with the appropriate arguments.






    share|improve this answer



























      1














      It sounds like you can simply make a little wrapper script that applies your desired arguments:



      #!/bin/sh
      exec /usr/bin/mupdf-gl -r 150 "$@"


      and then save this code somewhere on the system (say to /usr/bin/my-mupdf), make it executable (chmod +x /usr/bin/my-mupdf), and then select the path to this wrapper script from the GUI (/usr/bin/my-mupdf instead of /usr/bin/mupdf-gl). This way the GUI calls your wrapper script which in turn replaces itself with mupdf-gl with the appropriate arguments.






      share|improve this answer

























        1












        1








        1







        It sounds like you can simply make a little wrapper script that applies your desired arguments:



        #!/bin/sh
        exec /usr/bin/mupdf-gl -r 150 "$@"


        and then save this code somewhere on the system (say to /usr/bin/my-mupdf), make it executable (chmod +x /usr/bin/my-mupdf), and then select the path to this wrapper script from the GUI (/usr/bin/my-mupdf instead of /usr/bin/mupdf-gl). This way the GUI calls your wrapper script which in turn replaces itself with mupdf-gl with the appropriate arguments.






        share|improve this answer













        It sounds like you can simply make a little wrapper script that applies your desired arguments:



        #!/bin/sh
        exec /usr/bin/mupdf-gl -r 150 "$@"


        and then save this code somewhere on the system (say to /usr/bin/my-mupdf), make it executable (chmod +x /usr/bin/my-mupdf), and then select the path to this wrapper script from the GUI (/usr/bin/my-mupdf instead of /usr/bin/mupdf-gl). This way the GUI calls your wrapper script which in turn replaces itself with mupdf-gl with the appropriate arguments.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 30 at 19:01









        thrigthrig

        24.9k23157




        24.9k23157























            0














            Just create an alias for mupdf-gl, like this:-



            $ alias mupdf-gl=mupdf-gl -r 150



            Be sure to include this line in your /home/.bash_aliases to avoid typing it again.






            share|improve this answer























            • Does this alias also applies to files which will be opened by double clicking in the file manager or will be useful only for opening the files using the command lines

              – Salil S. Kulkarni
              Jan 30 at 18:22











            • I checked, this does not work for mouse clicked files. Let me find a solution and update my answer.

              – Prathu Baronia
              Jan 31 at 9:31















            0














            Just create an alias for mupdf-gl, like this:-



            $ alias mupdf-gl=mupdf-gl -r 150



            Be sure to include this line in your /home/.bash_aliases to avoid typing it again.






            share|improve this answer























            • Does this alias also applies to files which will be opened by double clicking in the file manager or will be useful only for opening the files using the command lines

              – Salil S. Kulkarni
              Jan 30 at 18:22











            • I checked, this does not work for mouse clicked files. Let me find a solution and update my answer.

              – Prathu Baronia
              Jan 31 at 9:31













            0












            0








            0







            Just create an alias for mupdf-gl, like this:-



            $ alias mupdf-gl=mupdf-gl -r 150



            Be sure to include this line in your /home/.bash_aliases to avoid typing it again.






            share|improve this answer













            Just create an alias for mupdf-gl, like this:-



            $ alias mupdf-gl=mupdf-gl -r 150



            Be sure to include this line in your /home/.bash_aliases to avoid typing it again.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 30 at 18:06









            Prathu BaroniaPrathu Baronia

            1012




            1012












            • Does this alias also applies to files which will be opened by double clicking in the file manager or will be useful only for opening the files using the command lines

              – Salil S. Kulkarni
              Jan 30 at 18:22











            • I checked, this does not work for mouse clicked files. Let me find a solution and update my answer.

              – Prathu Baronia
              Jan 31 at 9:31

















            • Does this alias also applies to files which will be opened by double clicking in the file manager or will be useful only for opening the files using the command lines

              – Salil S. Kulkarni
              Jan 30 at 18:22











            • I checked, this does not work for mouse clicked files. Let me find a solution and update my answer.

              – Prathu Baronia
              Jan 31 at 9:31
















            Does this alias also applies to files which will be opened by double clicking in the file manager or will be useful only for opening the files using the command lines

            – Salil S. Kulkarni
            Jan 30 at 18:22





            Does this alias also applies to files which will be opened by double clicking in the file manager or will be useful only for opening the files using the command lines

            – Salil S. Kulkarni
            Jan 30 at 18:22













            I checked, this does not work for mouse clicked files. Let me find a solution and update my answer.

            – Prathu Baronia
            Jan 31 at 9:31





            I checked, this does not work for mouse clicked files. Let me find a solution and update my answer.

            – Prathu Baronia
            Jan 31 at 9:31

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f497745%2fhow-to-set-mupdf-gl-as-a-default-application-with-a-fixed-resolution%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay