It’s 2024 now! Ubuntu is still lacking the option to create new documents in the default Nautilus file manager. Though, the GNOME developer team is working on this function.
It’s easy to enable the option in Nautilus context menu. As it prompts in Templates folder, simply create an empty document under Templates folder, the file name will be displayed as sub-menu option of ‘New Document’ menu.
Meaning all you need to do is create an empty file and save it under user’s “Template” folder. The file-name will be displayed as sub-menu option of “New Documents” context menu.
Method 1: Use Text editor
First, press Super (the Windows logo) key on keyboard to open ‘Activities’ overview. Then search for and open text editor.
When the text editor opens, you don’t have to input anything, just leave it blank, then press Ctrl+Shift+S to open the “save as” dialog and do:
- Type filename, which will display as sub-menu option for ‘New Documents’ menu.
- Choose location – Templates folder.
- Finally, click Save.
Method 2: Run a single command
For those familiar with Linux command, this can also be done by running a single command.
Firstly, press Ctrl+Alt+T on keyboard to open a terminal window. When it opens, run command:
touch ~/Templates/Untitled\ Document
This command creates an empty file called ‘Untitled Document‘ in the Templates folder.
Tip: the backslash in the code tells that the space following it is part of the filename since the shell treats whatever comes after a space as a separate argument.
Finally, right-click on blank area in your file manager and see the magic!
謝謝
我自已用Gnome ubuntu時
發現在這問題
這樣不能創建新文件很不方便
感謝提供這樣的方法
明天我去辦公室試一下
再次感謝!
Thank you very much it is very helpful.
Very good tip, but, is there a way to do it for all users at once? I mean, not to do it inside the home folder?
By the way, in Spanish the word must be “Plantillas” instead of Templates. I guess that in other languages it will be different as well.
i just upgraded from 16.04 to 17.04, lost my ‘new document’ context menu option, and this method is not working for me, anyone else have a workaround?
this method didn’t quite work for me, items in the Templates folder weren’t showing up in the context menu. something needed to be restored about how the system identifies and uses the Templates folder.
to fix this, i installed ubuntu tweak like so:
wget -q -O – http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add –
sudo sh -c ‘echo “deb http://archive.getdeb.net/ubuntu xenial-getdeb apps” >> /etc/apt/sources.list.d/getdeb.list’
sudo apt-get update
sudo apt-get install ubuntu-tweak
and then used this method, namely, delete your Templates folder and then use this method to ‘restore’ the Templates folder, worked for me in 17.04 on a thinkpad t530:
https://askubuntu.com/questions/233550/how-can-i-restore-template-functionality-after-having-deleted-the-templates-fold
thank you it worked in 17.10 ubuntu
Thank you very much. it worked on 16.04
thank u vry much
Thanks a lot!!!
Using a template to recreate this functionality in 17.10 produces different results to the default behavior on 14.04/16.04. While this does exactly what you say and creates a new document with the name you specify as the template name, on 14.04/16.04 the context menu option was titled ‘Empty Document’ and the created file was titled ‘Untitled Document’, so there was some wizardry going on there beyond a simple template.
The filename was also editable upon creation, so you would right-click >> New Document >> Empty Document and the ‘Untitled Document’ would appear ready to be renamed.
While this workaround adds similar functionality, the document name is exactly as per the filename in the templates folder and it is not editable by default, so you then have to right-click the ‘Untitled Document’ and select ‘Rename’ to name it.
This is because renaming now opens an edit window whereas this was previously handled inline. I can’t see how the new file could appear with an editable name using this method, so that’s probably a lost feature.
This might not sound like a major issue to most, but it is frustrating if you were previously using this feature a lot as it’s more time consuming.
Thanks!
Thank you very much, it is very helpful.
Thank you so much…..
Cm its not working ubuntu 17.10.1