Create “New Document” in Nautilus

In nautilus 3.63 the “New Document” has disappeared but you can easily add this option following these steps:

  1. Edit the file ~/.config/user-dirs.dirs
  2. You should set the XDG_TEMPLATES_DIR variable to “$HOME/Templates”. This is the content of my user-dirs.dirs file:

  3. Create an empty text file in ~/Templates. In a shell write:
  4. [user@mypc ~]$ touch ~/Templates/text.txt
  5. Open Nautilus and click with the right button inside a directory over a black space. You will find the option New Document->Text

You can create more templates, for example I have created one for html files. You just have to create a html file in “$HOME/Templates” with the following content:

<!DOCTYPE html>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s