I am trying to add a new file extension to cinnamon's new file menu

  1. right click

  2. create new document

  3. I would like to add entries in this list

I remember that I have done this before based on a tutorial, but it seems to have disappeared from the web since.

I can remember that the source is a directory, but can't recall the path from which it fetches the file types and default contents.

Where can I find this directory?

  • OS: Linux Mint 18.3
  • desktop: cinnamon
  • file manager: nemo

Update/Research: According to this article's 7th point, the directory I'm looking for is ~/Templates, which doesn't exist on my system. Since my context menu already has custom file templates I suspect it has been moved to another location between versions. which exists but is a bit tricky, see answer.

  • if using nemo you should find some hint in: ~/.local/share/nemo/actions and /usr/share/nemo/actions/ but I really don't how it works. Welcom on SE Unix&Linux
    – Kiwy
    Sep 19, 2018 at 13:14
  • @Kiwy Yes, I indeed use nemo, and I'll add that to the question (it seems relevant after a bit of reading on different file managers) despite having an answer since.
    – sisisisi
    Sep 19, 2018 at 13:24

2 Answers 2


The Templates directory for your locale can be found by typing on the terminal:

xdg-user-dir TEMPLATES

Any files stored in that directory appear as menu entries of the new file context menu. The menu entry text is derived from the filename by removing the file extension, if that file has one.

For example, the following command creates a menu entry Testfile which creates a file containing just the word “test”:

echo test >$(xdg-user-dir TEMPLATES)/Testfile.txt

Ok, after a bit more research I found the answer to my problem.

  • the template directory is indeed at ~/Templatesbut its name is translated to the language of the desktop environment
  • the translation is not "cosmetic", Nemo and the terminal can both access ~/Sablonok ([hu] locale version of "templates"), and they both fail to locate ~/Templates
  • viewed in Nemo, the directory has an icon with a paper in a standing position, the letter 'a' written on it, a visible thin solid grey margin around the letter, and a triangular ruler in the bottom left corner. This is in Nemo 3.6.5, Linux Mint 18.3, Cinnamon desktop environment, every possible theme setting on default. Anyone else's icon might differ with different software, software version, or custom themes.
  • according to this forum post, specifically altair4's answer, it is possible that the directory doesn't exist and you need to manually create it. This information might be outdated as it's from 2009.

I don't have sources on names for any other locale besides [en] and [hu] as I have found the directory accidentally, not through systematic searching on the web.

  • you might want to explain what you've done, you could find this question in a year or two and find nice that you put a good explanation on how to ;-) Glad you find your solution.
    – Kiwy
    Sep 19, 2018 at 13:26
  • @Kiwy Ok, I have to admit "research" is a strong word for what I have done, I have browsed my system's directory structure until I have accidentally stumbled upon a directory which's name translates to "Templates", looked in it and found the custom templates my context menu already had. I think the answer is clear enough that someone finding it will be able to locate this directory, but I'll try to add as many details as I can.
    – sisisisi
    Sep 20, 2018 at 20:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .