Can I have a desktop icon for creating new documents from a template?

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








up vote
1
down vote

favorite












Is it possible to have an icon on the desktop so that when you double-click it it will create a new document from a certain template (New Invoice.ots located at ~/Templates)? It would be a bit more visual than the right-click New Document -> New Invoice.










share|improve this question























  • You could enhance your question BT specifying an invoice directory name. When you right click it finds the last invoice filename and adds 1 to it. For example: Inv1001, Inv1002, etc. But of course only if you want to do this.
    – WinEunuuchs2Unix
    Apr 13 at 17:46














up vote
1
down vote

favorite












Is it possible to have an icon on the desktop so that when you double-click it it will create a new document from a certain template (New Invoice.ots located at ~/Templates)? It would be a bit more visual than the right-click New Document -> New Invoice.










share|improve this question























  • You could enhance your question BT specifying an invoice directory name. When you right click it finds the last invoice filename and adds 1 to it. For example: Inv1001, Inv1002, etc. But of course only if you want to do this.
    – WinEunuuchs2Unix
    Apr 13 at 17:46












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Is it possible to have an icon on the desktop so that when you double-click it it will create a new document from a certain template (New Invoice.ots located at ~/Templates)? It would be a bit more visual than the right-click New Document -> New Invoice.










share|improve this question















Is it possible to have an icon on the desktop so that when you double-click it it will create a new document from a certain template (New Invoice.ots located at ~/Templates)? It would be a bit more visual than the right-click New Document -> New Invoice.







templates






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 14 at 1:54









pomsky

22.9k77198




22.9k77198










asked Apr 13 at 15:46







user818050


















  • You could enhance your question BT specifying an invoice directory name. When you right click it finds the last invoice filename and adds 1 to it. For example: Inv1001, Inv1002, etc. But of course only if you want to do this.
    – WinEunuuchs2Unix
    Apr 13 at 17:46
















  • You could enhance your question BT specifying an invoice directory name. When you right click it finds the last invoice filename and adds 1 to it. For example: Inv1001, Inv1002, etc. But of course only if you want to do this.
    – WinEunuuchs2Unix
    Apr 13 at 17:46















You could enhance your question BT specifying an invoice directory name. When you right click it finds the last invoice filename and adds 1 to it. For example: Inv1001, Inv1002, etc. But of course only if you want to do this.
– WinEunuuchs2Unix
Apr 13 at 17:46




You could enhance your question BT specifying an invoice directory name. When you right click it finds the last invoice filename and adds 1 to it. For example: Inv1001, Inv1002, etc. But of course only if you want to do this.
– WinEunuuchs2Unix
Apr 13 at 17:46










2 Answers
2






active

oldest

votes

















up vote
2
down vote



accepted










You can create a new launcher in desktop which will help achieving your goal. To do that follow the steps below.



  1. Create a .desktop file (say template-generator.desktop) in ~/Desktop.

  2. Open the .desktop file with a text-editor.


  3. Add the following lines and save the file.



    [Desktop Entry]
    Comment=Launcher to create a file from a template
    Terminal=false
    Name=Create Invoice from Template
    Exec=/home/MyUsername/Templates/new_invoice.sh
    Type=Application
    Icon=/full/path/to/your/preferred/icon-file


    (Put your username in place of MyUsername.)




  4. Create the script new_invoice.sh in the Templates folder:



    template="$HOME/Templates/New Invoice.ots"
    filename="$HOME/Documents/Invoice from $(date).ods"
    cp "$template" "$filename"
    xdg-open "$filename"


  5. Right click on the file, open Properties > Permissions, and select "allow executing file as program". Do the same for the .desktop file.


  6. Double click on the file. A warning window may appear asking you to "Trust and Launch". Do it.






share|improve this answer





























    up vote
    0
    down vote













    What you need to know first is where templates are stored and recognize their extensions. Eg LibreOffice has its main template extension as .ott and stores its built-in document templates in /usr/lib/libreoffice/share/template/common/, and from there it's split under various folders according to the type of template - /usr/lib/libreoffice/share/template/common/personal/CV.ott as one example. So any personal templates created by yourself could be stored there, or kept under your Home folder, eg Home/Templates already exists. But I prefer to keep all templates under one roof rather than scattering them around.



    So if you want to put a template onto your desktop, simply copy it (in our example CV.ott) and paste it to Home/Desktop. You can rename it, eg, MyCV. Just remember, once it's opened to save as a text document, eg .odt Job done.






    share|improve this answer






















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      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',
      convertImagesToLinks: true,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1024701%2fcan-i-have-a-desktop-icon-for-creating-new-documents-from-a-template%23new-answer', 'question_page');

      );

      Post as a guest





























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      2
      down vote



      accepted










      You can create a new launcher in desktop which will help achieving your goal. To do that follow the steps below.



      1. Create a .desktop file (say template-generator.desktop) in ~/Desktop.

      2. Open the .desktop file with a text-editor.


      3. Add the following lines and save the file.



        [Desktop Entry]
        Comment=Launcher to create a file from a template
        Terminal=false
        Name=Create Invoice from Template
        Exec=/home/MyUsername/Templates/new_invoice.sh
        Type=Application
        Icon=/full/path/to/your/preferred/icon-file


        (Put your username in place of MyUsername.)




      4. Create the script new_invoice.sh in the Templates folder:



        template="$HOME/Templates/New Invoice.ots"
        filename="$HOME/Documents/Invoice from $(date).ods"
        cp "$template" "$filename"
        xdg-open "$filename"


      5. Right click on the file, open Properties > Permissions, and select "allow executing file as program". Do the same for the .desktop file.


      6. Double click on the file. A warning window may appear asking you to "Trust and Launch". Do it.






      share|improve this answer


























        up vote
        2
        down vote



        accepted










        You can create a new launcher in desktop which will help achieving your goal. To do that follow the steps below.



        1. Create a .desktop file (say template-generator.desktop) in ~/Desktop.

        2. Open the .desktop file with a text-editor.


        3. Add the following lines and save the file.



          [Desktop Entry]
          Comment=Launcher to create a file from a template
          Terminal=false
          Name=Create Invoice from Template
          Exec=/home/MyUsername/Templates/new_invoice.sh
          Type=Application
          Icon=/full/path/to/your/preferred/icon-file


          (Put your username in place of MyUsername.)




        4. Create the script new_invoice.sh in the Templates folder:



          template="$HOME/Templates/New Invoice.ots"
          filename="$HOME/Documents/Invoice from $(date).ods"
          cp "$template" "$filename"
          xdg-open "$filename"


        5. Right click on the file, open Properties > Permissions, and select "allow executing file as program". Do the same for the .desktop file.


        6. Double click on the file. A warning window may appear asking you to "Trust and Launch". Do it.






        share|improve this answer
























          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          You can create a new launcher in desktop which will help achieving your goal. To do that follow the steps below.



          1. Create a .desktop file (say template-generator.desktop) in ~/Desktop.

          2. Open the .desktop file with a text-editor.


          3. Add the following lines and save the file.



            [Desktop Entry]
            Comment=Launcher to create a file from a template
            Terminal=false
            Name=Create Invoice from Template
            Exec=/home/MyUsername/Templates/new_invoice.sh
            Type=Application
            Icon=/full/path/to/your/preferred/icon-file


            (Put your username in place of MyUsername.)




          4. Create the script new_invoice.sh in the Templates folder:



            template="$HOME/Templates/New Invoice.ots"
            filename="$HOME/Documents/Invoice from $(date).ods"
            cp "$template" "$filename"
            xdg-open "$filename"


          5. Right click on the file, open Properties > Permissions, and select "allow executing file as program". Do the same for the .desktop file.


          6. Double click on the file. A warning window may appear asking you to "Trust and Launch". Do it.






          share|improve this answer














          You can create a new launcher in desktop which will help achieving your goal. To do that follow the steps below.



          1. Create a .desktop file (say template-generator.desktop) in ~/Desktop.

          2. Open the .desktop file with a text-editor.


          3. Add the following lines and save the file.



            [Desktop Entry]
            Comment=Launcher to create a file from a template
            Terminal=false
            Name=Create Invoice from Template
            Exec=/home/MyUsername/Templates/new_invoice.sh
            Type=Application
            Icon=/full/path/to/your/preferred/icon-file


            (Put your username in place of MyUsername.)




          4. Create the script new_invoice.sh in the Templates folder:



            template="$HOME/Templates/New Invoice.ots"
            filename="$HOME/Documents/Invoice from $(date).ods"
            cp "$template" "$filename"
            xdg-open "$filename"


          5. Right click on the file, open Properties > Permissions, and select "allow executing file as program". Do the same for the .desktop file.


          6. Double click on the file. A warning window may appear asking you to "Trust and Launch". Do it.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 13 at 19:27

























          answered Apr 13 at 16:28









          pomsky

          22.9k77198




          22.9k77198






















              up vote
              0
              down vote













              What you need to know first is where templates are stored and recognize their extensions. Eg LibreOffice has its main template extension as .ott and stores its built-in document templates in /usr/lib/libreoffice/share/template/common/, and from there it's split under various folders according to the type of template - /usr/lib/libreoffice/share/template/common/personal/CV.ott as one example. So any personal templates created by yourself could be stored there, or kept under your Home folder, eg Home/Templates already exists. But I prefer to keep all templates under one roof rather than scattering them around.



              So if you want to put a template onto your desktop, simply copy it (in our example CV.ott) and paste it to Home/Desktop. You can rename it, eg, MyCV. Just remember, once it's opened to save as a text document, eg .odt Job done.






              share|improve this answer


























                up vote
                0
                down vote













                What you need to know first is where templates are stored and recognize their extensions. Eg LibreOffice has its main template extension as .ott and stores its built-in document templates in /usr/lib/libreoffice/share/template/common/, and from there it's split under various folders according to the type of template - /usr/lib/libreoffice/share/template/common/personal/CV.ott as one example. So any personal templates created by yourself could be stored there, or kept under your Home folder, eg Home/Templates already exists. But I prefer to keep all templates under one roof rather than scattering them around.



                So if you want to put a template onto your desktop, simply copy it (in our example CV.ott) and paste it to Home/Desktop. You can rename it, eg, MyCV. Just remember, once it's opened to save as a text document, eg .odt Job done.






                share|improve this answer
























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  What you need to know first is where templates are stored and recognize their extensions. Eg LibreOffice has its main template extension as .ott and stores its built-in document templates in /usr/lib/libreoffice/share/template/common/, and from there it's split under various folders according to the type of template - /usr/lib/libreoffice/share/template/common/personal/CV.ott as one example. So any personal templates created by yourself could be stored there, or kept under your Home folder, eg Home/Templates already exists. But I prefer to keep all templates under one roof rather than scattering them around.



                  So if you want to put a template onto your desktop, simply copy it (in our example CV.ott) and paste it to Home/Desktop. You can rename it, eg, MyCV. Just remember, once it's opened to save as a text document, eg .odt Job done.






                  share|improve this answer














                  What you need to know first is where templates are stored and recognize their extensions. Eg LibreOffice has its main template extension as .ott and stores its built-in document templates in /usr/lib/libreoffice/share/template/common/, and from there it's split under various folders according to the type of template - /usr/lib/libreoffice/share/template/common/personal/CV.ott as one example. So any personal templates created by yourself could be stored there, or kept under your Home folder, eg Home/Templates already exists. But I prefer to keep all templates under one roof rather than scattering them around.



                  So if you want to put a template onto your desktop, simply copy it (in our example CV.ott) and paste it to Home/Desktop. You can rename it, eg, MyCV. Just remember, once it's opened to save as a text document, eg .odt Job done.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Apr 13 at 18:36

























                  answered Apr 13 at 17:34









                  Paul Benson

                  403117




                  403117



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1024701%2fcan-i-have-a-desktop-icon-for-creating-new-documents-from-a-template%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      pylint3 and pip3 broken

                      Missing snmpget and snmpwalk

                      How to enroll fingerprints to Ubuntu 17.10 with VFS491