Home FAQ How To Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04
Add 'New Document' Option In Right Click Context Menu In Ubuntu 18.04 GNOME desktop

How To Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04

By sk
560 Views

The other day, I was collecting reference notes for Linux package managers on various online sources. When I tried to create a text file to save those notes, I noticed that the 'New document' option is missing in my Ubuntu 18.04 LTS desktop. I thought somehow the option is gone in my system. After googling a bit, It turns out to be the "new document" option is not included in Ubuntu GNOME editions. Luckily, I have found an easy solution to add 'New Document' option in right click context menu in Ubuntu 18.04 LTS desktop.

As you can see in the following screenshot, the "New Doucment" option is missing in the right-click context menu of Nautilus file manager.

new document option is missing in right-click context menu ubuntu 18.04

new document option is missing in right-click context menu ubuntu 18.04

If you want to add this option, just follow the steps given below.

Add 'New Document' Option In Right Click Context Menu In Ubuntu

First, make sure you have ~/Templates directory in your system. If it is not available create one like below.

$ mkdir ~/Templates

Next open the Terminal application and cd into the ~/Templates folder using command:

$ cd ~/Templates

Create an empty file:

$ touch Empty\ Document

Or,

$ touch "Empty Document"

Create empty document in Templates directory

Now open your Nautilus file manager and check if "New Doucment" option is added in context menu.

Add 'New Document' Option In Right Click Context Menu In Ubuntu

Add 'New Document' Option In Right Click Context Menu In Ubuntu 18.04

As you can see in the above screenshot, the "New Document" option is back again.

You can also additionally add options for different files types like below.

$ cd ~/Templates
$ touch New\ Word\ Document.docx
$ touch New\ PDF\ Document.pdf
$ touch New\ Text\ Document.txt
$ touch New\ PyScript.py
Add options for different files types in new Document sub-menu

Add options for different files types in New Document sub-menu

Please note that all files should be created inside the ~/Templates directory.

Now, open the Nautilus and check if the newly created file types are present in "New Document" sub-menu.

Add 'New Document' Option In Right Click Context Menu

If you want to remove any file type from the sub-menu, simply remove the appropriate file from the Templates directory.

$ rm ~/Templates/New\ Word\ Document.docx

I am wondering why this option has been removed in recent Ubuntu GNOME editions. I use it frequently. However, it is easy to re-enable this option in couple minutes.

Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like

5 comments

Sandor Teglasy August 1, 2019 - 12:26 am

works just fine for CentOS 7 as well (it did have the ~/Templates folder, but it was empty).
As for .docx, how do I make it open automatically in LibreOffice instead of gedit?
Also, while this is an advance over previous situation, would you have an idea, how to allow me to change the file name as part of the creation process, instead of leaving it as the name of the template file?

Reply
ABELARDO December 14, 2019 - 7:53 pm

Hi there!

For me, this trick didn’t work.

Ubuntu 18.04.3 LTS

Reply
sk December 16, 2019 - 1:52 pm

I just confirmed it. It works for me. I use Ubuntu 18.04.3 LTS too.

Reply
Mauro January 4, 2020 - 4:39 am

Doesn’t work for me on ubuntu 19.10

Reply
me February 26, 2020 - 2:34 pm

open LibreOffice and save an empty file anywhere then move it to ~/Templates folder

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More