Add Your Document Templates to GNOME

GNOME has a menu of document templates in its file browser. It seems to have been forgotten, unless you add some templates yourself the menu will only ever display “No templates installed”.

Document templates are available in the Create Document menu, which can be accessed by right-clicking in the Nautilus file browser or opening its File menu.

File templates menu

There’s not much too adding a new template, just add any files you want as templates to the ~/Templates folder. Give the files a descriptive name because the file extension is not displayed in the menu. If GNOME can recognize the template’s file type it will display the proper icon in the menu as well. Templates can also be organized into folders.

Unlike other operating systems Linux does not use file extensions to identify file types. So you if want your templates to open in the right application when double-clicked, you may have to open the application and save a blank document so Linux will recognize the file as the right type.

If you do HTML programming, one use for this feature is to have templates for HTML documents. Instead of typing up the basic tags or copying a template from every time you create a new HTML document, you can use a template.

Archived Comments


Interesting tip… thanks!


This is a great tip, and one that took me quite a while to figure out on my own. Thanks for giving the Ubuntu community a head start with all your great tips!


How does Gnome know that it has to look at the ~/Templates folder? I mean.. if you use another language it has a different name. So the question is: where does Gnome save this setting?

Dirk Gently

I like this tip, thanks alot.

Yes Linux uses mime types very very close to Mac OS 9 way of doing it (but alot better). This doesn’t seem quite in line with Gnome HIG though as system settings or in the case, local system settings should be able to be viewed. I personally believe that folder should be in ~/.templates or ~/.gnome2/templates.



gedit ~/.config/user-dirs.dirs

Edit this line: XDG_TEMPLATES_DIR=“$HOME/”


I think this is a freedesktop standard ?

so the gnome HIG wouldn’t matter because freedesktop takes precedence ?

right ?


Thanks for this article! I have used it on my website. I hope this is ok.
All the best,

Online gambling and betting casino

I’ll take this tip even further by saying that you can also categorize your templates by putting them in sub directories, like Office(for Open, Development(Shell scripts, C/C++, Python, etc), and Internet(HTML and XML).

Joe Marinaccio

Thank you! Getting ready to get the context menu set up right now. Thanks again.


Hi, great tip. Do you know how to expand the box? It shows no more then 30 items, I have 70 templates, and all for Writer.

Respond via email