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.
You can create a new launcher in desktop which will help achieving your goal. To do that follow the steps below.
.desktop
file (saytemplate-generator.desktop
) in~/Desktop
..desktop
file with a text-editor.Add the following lines and save the file.
(Put your username in place of
MyUsername
.)Create the script
new_invoice.sh
in the Templates folder:Right click on the file, open Properties > Permissions, and select "allow executing file as program". Do the same for the
.desktop
file.Double click on the file. A warning window may appear asking you to "Trust and Launch". Do it.
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.