Ubuntu 18.04 LTS (Bionic Beaver) remains a popular choice for its stability and performance, but long-time users often miss the classic “New Document” option in the right-click context menu. This feature, which allowed users to quickly create empty text files or other document types, was removed in later GNOME-based versions. Fortunately, restoring it is a straightforward process that leverages Ubuntu’s built-in Templates folder—a feature still present but not always enabled by default.
In this guide, you’ll learn how to bring back the “New Document” option, customize it for different file types, and troubleshoot common issues. Whether you’re a developer, writer, or casual user, this tweak will save you time and streamline your workflow.
Why the “New Document” Option Disappeared
With the transition to GNOME Shell in Ubuntu 17.10 and later, the default Nautilus (Files) context menu was simplified. The “New Document” option—previously a staple for quickly creating empty files—was removed to align with GNOME’s minimalist design philosophy. However, the underlying functionality still exists. Ubuntu uses the ~/Templates directory to generate new files from templates, but this folder is often empty or missing in fresh installations.
According to a 2024 report by OMG! Ubuntu!, many users continue to request this feature due to its convenience, especially for those migrating from Windows or older Ubuntu versions. The good news: you don’t need third-party tools or complex scripts. A single command or manual file creation is all it takes.
Step-by-Step: Restoring the “New Document” Option
Method 1: Using the Terminal (Recommended)
This method is the fastest and works for all Ubuntu 18.04 users, regardless of desktop environment.
- Open the Terminal: Press Ctrl+Alt+T or search for “Terminal” in the Activities overview.
- Create the Templates Directory: If it doesn’t exist, run:
mkdir -p ~/Templates - Add a Blank Text File Template: Run:
touch ~/Templates/”Untitled Document”The backslash before the space ensures the filename is treated as a single argument.
- Verify the Change: Open Nautilus (Files), right-click in any folder, and select New Document. You’ll see “Untitled Document” as an option.
Pro Tip: To create templates for other file types (e.g., Python scripts, spreadsheets), simply add files with the desired extensions to the ~/Templates folder. For example:
touch ~/Templates/”Untitled Script.py”
Method 2: Manual File Creation (GUI)
If you prefer not to use the terminal:
- Open your Home folder and check for a Templates directory. If it’s missing, create it.
- Create a blank text file inside Templates and name it “Untitled Document” (or your preferred default name).
- Log out and log back in to refresh the context menu.
Note: The filename you use in the Templates folder will appear as the default name for new files created via the right-click menu.
Customizing the “New Document” Menu
The Templates folder isn’t limited to text files. You can add templates for scripts, spreadsheets, or even custom project files. Here’s how:
Adding Multiple Document Types
1. Create a new file in the Templates folder with your desired extension (e.g., Untitled Script.sh, Untitled Sheet.ods).
2. Right-click in Nautilus to see the new options under the “New Document” submenu.
Example: To add a Python script template:
touch ~/Templates/”Untitled Script.py”
Now, when you right-click, you’ll see options for both “Untitled Document” and “Untitled Script.”
Renaming and Organizing Templates
By default, new files inherit the template’s name. To avoid renaming each file manually:
1. Use generic names like “Untitled Document” or “New Script.”
2. Add placeholders (e.g., “Document – YYYY-MM-DD.txt”) for dynamic naming.
Advanced users can automate this further with scripts in the Templates folder. For example, a script named “New Report” could generate a dated Markdown file.
Troubleshooting Common Issues
The “New Document” Option Doesn’t Appear
If the option is missing after following the steps:
1. Check the Templates folder location: Run xdg-user-dir TEMPLATES to confirm it points to ~/Templates. If not, reset it with:
xdg-user-dirs-update –set TEMPLATES ~/Templates
2. Restart Nautilus: Run nautilus -q to quit Nautilus, then reopen it.
3. Verify file permissions: Ensure the Templates folder and its contents are readable:
chmod -R 755 ~/Templates
Templates Don’t Show Up in the Menu
Nautilus only displays templates with valid extensions. If your template isn’t appearing:
1. Check the file extension: Hidden files (e.g., .hiddenfile) won’t appear.
2. Use standard extensions (e.g., .txt, .py, .ods).
3. Log out and back in to refresh the menu cache.
Frequently Asked Questions
Why was the “New Document” option removed?
The option was removed to simplify the context menu in GNOME Shell, which prioritizes minimalism. However, the underlying Templates feature remains intact, allowing users to restore the functionality manually.
Can I add custom icons to my templates?
Yes. Create a .desktop file in ~/Templates with the following structure:
[Desktop Entry] Name=New Python Script Exec=gedit %f Icon=utilities-terminal Type=Application
Place this file in ~/Templates and ensure it’s executable (chmod +x ~/Templates/”New Python Script.desktop”).
Will this work on Ubuntu 20.04 or 22.04?
Yes. The Templates folder method works on all GNOME-based Ubuntu versions, including 20.04, 22.04, and 24.04. The steps are identical.
How do I remove a template from the menu?
Simply delete the corresponding file from the ~/Templates folder. The change will reflect immediately after refreshing Nautilus.
Can I create folders using this method?
No. The Templates folder only supports file creation. To create folders, use the existing “New Folder” option in the right-click menu.
Is there a GUI tool to manage templates?
While no official GUI tool exists, you can use file managers like Nemo (from Linux Mint) or third-party extensions to enhance template management. However, the built-in Templates folder remains the most reliable method.
Pro Tips for Power Users
Use Scripts for Dynamic Templates: Place a script in ~/Templates that generates files with timestamps or user input. For example, a script named “New Meeting Notes” could create a Markdown file with the current date and a predefined structure.
Sync Templates Across Devices: Store your Templates folder in a cloud-sync directory (e.g., Dropbox or Nextcloud) and symlink it to ~/Templates:
ln -s ~/Dropbox/Templates ~/Templates
Keyboard Shortcuts: Combine this feature with Nautilus keyboard shortcuts (e.g., F2 to rename) for even faster file creation.
Template Versioning: Use Git to version-control your Templates folder, allowing you to track changes and revert to previous versions if needed.
Integrate with Productivity Tools: Create templates for common workflows, such as:
– “New Blog Post” (Markdown with frontmatter)
– “New Invoice” (ODT or PDF template)
– “New Code Project” (preconfigured README.md and license files)
Conclusion
Restoring the “New Document” option in Ubuntu 18.04 is a small change with a big impact on productivity. By leveraging the built-in Templates folder, you can customize your right-click menu to include any file type, from simple text documents to complex project templates. This method is not only efficient but also future-proof, as it relies on core GNOME functionality rather than third-party hacks.
For users upgrading from older Ubuntu versions or switching from Windows, this tweak bridges the gap between familiarity and efficiency. And with the ability to add scripts, sync templates, and integrate with cloud services, the possibilities extend far beyond the basic text file.
Next time you need to create a file quickly, skip the terminal or text editor—just right-click and go.