14

How can I add a right-click desktop menu entry to create a text file to Gnome 3 in Ubuntu 16.04.02?

dessert
  • 39,392
  • 12
  • 115
  • 163
Robert Sederholm
  • 750
  • 1
  • 10
  • 22
  • 4
    Possible duplicate of ["Create new document" - right-click option missing in Ubuntu GNOME](https://askubuntu.com/questions/777711/create-new-document-right-click-option-missing-in-ubuntu-gnome) – pomsky Nov 25 '18 at 06:51
  • This is not a duplicate, because the other question concerns the file explorer while this question concerns the desktop. Also, the accepted answer here no longer works for the desktop in the current version of Ubuntu. – Nick Alger Jul 27 '20 at 22:46

1 Answers1

16

Create a blank text file (you can create any type of file, not just text) in ~/Templates. Then in the right click menu under New document it will appear.

enter image description here


Note: If your system language is not English, "Templates" is probably not the correct folder name in your case. Look for a folder already there in your ~/ whose name is equivalent to the English word "Templates". You can also get the location of the template folder by running the following command:

xdg-user-dir TEMPLATES

For example, in French it should be "Modèles" (screenshot courtesy of atmon3r):
enter image description here

pomsky
  • 67,112
  • 21
  • 233
  • 243
  • 3
    works in Ubuntu 18.04 too – zwolin Sep 28 '18 at 16:15
  • 1
    kudos for the xdg-user-dir hint – denispyr Oct 07 '19 at 19:41
  • 1
    On my computer (Ubuntu 20.04), this works for right clicking in the file explorer, but does not work for right clicking on the desktop. – Nick Alger Jul 16 '20 at 21:20
  • @nick Yes, because the *file explorer* (Nautilus) doesn't handle the items on the desktop anymore on 20.04, see this: [Basic desktop actions are not available on Ubuntu 20.04](https://askubuntu.com/q/1231413/480481). – pomsky Jul 16 '20 at 23:46