"Create new document" - right-click option missing in Ubuntu GNOME
Solution 1
This functionality has been removed from Nautilus 3.20 (either by error or on purpose). There is a bug report on it here. If it turns out to be a bug it will be fixed upstream and then will either be back in 3.22 or backported into 3.20, or if this has been done on purpose then as you can see from the LP bug report they are wanting to make it a distro specific patch.
Solution 2
-
See if you have
~/Templates
folder2. Create one if it is missing using command:mkdir ~/Templates
-
Now create an empty file from command prompt:1
touch ~/Templates/Text\ File.txt
The "Create Document" option is back again and you can create a new text file or a new document.
1 The backslash is used to tell the shell that the space following it is part of the filename. Since the shell recognizes spaces as delimiters between commands/options/arguments, unless you "quote it"
, 'quote it'
, or quote\ it
, the shell will treat whatever comes after the space as a separate argument.
2 The ~/Templates
folder is localized, change his name accordingly to your localization (ex: ~/Modèles
for French localization).
Solution 3
You can go into your ~/Templates folder and create templates yourself, then they will appear in the right-click menu. For example:
cd Templates
touch Filename.txt
Solution 4
It seems like when the templates folder is empty this option is disabled. The simplest fix for this problem is to create a file in the templates folder:
touch `xdg-user-dir TEMPLATES`/Empty\ Text\ File.txt
It's definitely a bug as stated.
Solution 5
In the case you are using an ubuntu with a different language that english, first check where your Templates
folder is.
vi ~/.config/user-dirs.dirs
And in this file, check for XDG_TEMPLATES_DIR=
. In spanish for example you will have something like:
XDG_DESKTOP_DIR="$HOME/Escritorio"
XDG_DOWNLOAD_DIR="$HOME/Descargas"
XDG_TEMPLATES_DIR="$HOME/Plantillas"
XDG_PUBLICSHARE_DIR="$HOME/Público"
XDG_DOCUMENTS_DIR="$HOME/Documentos"
XDG_MUSIC_DIR="$HOME/Música"
XDG_PICTURES_DIR="$HOME/Imágenes"
XDG_VIDEOS_DIR="$HOME/Vídeos"
Then you can apply the solution listed in the other answers:
mkdir ~/Plantillas (or the name listed before)
touch ~/Plantillas/Documento\ de\ Texto.txt
And that is all.
Related videos on Youtube
![Severus Tux](https://i.stack.imgur.com/aaqfZ.png?s=256&g=1)
Comments
-
Severus Tux almost 2 years
I would like to to have a "create new document" option in the right-click menu.
Currently it looks like this :
I am using Ubuntu GNOME 16.04 LTS with GNOME 3.20.
-
gsxruk about 8 yearsMarked as a possible duplicate of this answered question
-
pavel_orekhov about 5 yearsMaybe Gnome is trying to be like Mac OS? Because Mac OS also just has "Create folder" and not "Create file/document". Here's Mac OS: imgur.com/a/Hc9aQbX
-
Pe Dro about 4 yearsThe simplest solution is to use the single command:
$ touch ~/Templates/"New Document"
and this brings back the feature of add a New Document named empty file to the directory. -
Shihab Shahriar Khan about 4 yearsubuntu 20.04 user here, any way to enable this option in desktop? the solutions here only work for file manager
-
-
bobo over 7 yearswhat is the purpose of the \ after Text?
-
HMagdy over 7 years\ this is because of file name contains space you can use ""
-
Luka about 7 yearsI had no problems with 16.04, recently I upgraded to 17.04 and option is GONE. help.
-
Matteo about 7 yearsThis should be the correct answer
-
Roey over 6 yearsIs there a way to edit the file's name upon creation ? currently it creates a text file with a default name "Text File.txt"
-
HMagdy over 6 years@Roey yes it's peace of cake. Just rename ~/Templates/whateveryouwant.txt or after creation, you can rename the created file.
-
Roey over 6 years@HassanMagdySaad Upon creation for every file without needing to manually rename it afterwards. This is how it works on MS Windows for any new file or folder with the right-click-menu. Thanks
-
Dan M. over 5 years@Roey you can press F2 immediately, but yeah, there must be some knob to turn to turn it into "rename mode after creation" by default. At least it works that way on CentOS 7, so it should be doable on ubuntu.
-
Axel Werner over 5 yearsI have the ~/Templates folder and created a newFile.txt there via CLI. still no new file entry in context menu. still does not work for me somehow on ubuntu 18.10
-
Axel Werner over 5 yearsnice hint about that "xdg-user-dir" tool. it showed me, that my TEMPLATE Variable/Folder/Setting was set to my $HOME only somehow. NOT to my Template folder. However even if i reset this setting to $HOME/Templates it didnt worked for me so far on Ubuntu 18.10 .
-
Axel Werner over 5 yearsAs the remarks in this configuration file states, these entries are set/updated by the ''xdg-user-dirs-update'' cli tool. So i did a ''xdg-user-dirs-update --set TEMPLATES ~/Templates'' to reset my Templates setting to the $HOME/Templates folder within my homedirectory. However... it still does not work for me somehow on ubuntu 18.10 . still no "new document" on my context menu.
-
Naveen over 5 yearsPlease change the permission for this folder and file
-
arsho about 5 years
touch ~/Templates/New\ File
if you do not want any extension. -
Garrett almost 5 yearsIt also wasn't working for me after deleting (and recreating) the
Templates
folder. A simpler solution than installing Ubuntu-Tweak that worked for me was this one. -
Namphibian over 4 yearsIt is now 2020 and Ubuntu 18.04 still has this. This still works just cant believe they are not fixing this in the release.
-
Shihab Shahriar Khan about 4 yearsdoes this work in desktop? ubuntu 20.04
-
Vadim Kotov almost 4 years@ShihabShahriarKhan It works, but not on the Desktop. See this answer for more info.
-
Hans Deragon over 3 yearsThe reported bug report above has been marked as duplicate of Launchpad #1632027. Please vote on #1632027.
-
Nav about 3 yearsWow! This is impressive. Could anyone provide a link to explain how this works? Does the OS look at the Templates folder and search for
File.txt
somewhere? -
HMagdy about 3 years@Nav youtube.com/watch?v=967yhGf1JbQ and help.ubuntu.com/stable/ubuntu-help/files-templates.html.en give you good details about that
-
user643722 almost 3 yearsSame for me. I wonder if GNOME needs to be informed of the update.