mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
提交译文: 20190805 How To Add ‘New Document- Option In Right Click Context Menu In Ubuntu 18.04.md
This commit is contained in:
parent
9010a2758f
commit
7adc4bd71a
@ -1,109 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (scvoet)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How To Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04)
|
||||
[#]: via: (https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-context-menu-in-ubuntu-18-04/)
|
||||
[#]: author: (sk https://www.ostechnix.com/author/sk/)
|
||||
|
||||
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][1]
|
||||
|
||||
The other day, I was collecting reference notes for [**Linux package managers**][2] 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.
|
||||
|
||||
![][3]
|
||||
|
||||
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"
|
||||
```
|
||||
|
||||
![][4]
|
||||
|
||||
Now open your Nautilus file manager and check if “New Doucment” option is added in context menu.
|
||||
|
||||
![][5]
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
![][6]
|
||||
|
||||
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.
|
||||
|
||||
![][7]
|
||||
|
||||
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.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-context-menu-in-ubuntu-18-04/
|
||||
|
||||
作者:[sk][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu-1-720x340.png
|
||||
[2]: https://www.ostechnix.com/linux-package-managers-compared-appimage-vs-snap-vs-flatpak/
|
||||
[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/new-document-option-missing.png
|
||||
[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/Create-empty-document-in-Templates-directory.png
|
||||
[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu-In-Ubuntu.png
|
||||
[6]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-options-for-different-files-types.png
|
||||
[7]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu.png
|
@ -0,0 +1,110 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (Scvoet)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How To Add ‘New Document’ Option In Right Click Context Menu In Ubuntu 18.04)
|
||||
[#]: via: ((https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-context-menu-in-ubuntu-18-04/)
|
||||
[#]: author: (sk https://www.ostechnix.com/author/sk/)
|
||||
|
||||
如何在 Ubuntu 18.04 的右键单击菜单中添加“新建文档”按钮
|
||||
======
|
||||
|
||||
![Add 'New Document' Option In Right Click Context Menu In Ubuntu 18.04 GNOME desktop][1]
|
||||
|
||||
前几天,我在各种在线资源站点上收集关于 [**Linux 包管理**][2] 的参考资料。在我想创建一个用于保存笔记的文件,我突然发现我的 Ubuntu 18.04 LTS 桌面并没有“创建文件”的按钮了,它好像离奇失踪了。在谷歌一下后,我发现原来“新建文档”按钮不再被集成在 Ubuntu GNOME 版本中了。庆幸的是,我找到了一个在 Ubuntu 18.04 LTS 桌面的右键单击菜单中添加“新建文档”按钮的简易解决方案。
|
||||
|
||||
就像你在下方截图中看到的一样,Nautilus 文件管理器的右键单击菜单中并没有“新建文件”按钮。
|
||||
|
||||
![][3]
|
||||
|
||||
Ubuntu 18.04 移除了右键点击菜单中的“新建文件”的选项。
|
||||
|
||||
如果你想添加此一按钮,请按照以下步骤进行操作。
|
||||
|
||||
### 在 Ubuntu 的右键单击菜单中添加“新建文件”按钮
|
||||
|
||||
首先,你需要确保您的系统中有 **~/Templates** 文件夹。如果没有的话,可以按照下面的命令进行创建。
|
||||
|
||||
```
|
||||
$ mkdir ~/Templates
|
||||
```
|
||||
|
||||
然后打开终端应用并使用 cd 命令进入 **~/Templates** 文件夹:
|
||||
|
||||
```
|
||||
$ cd ~/Templates
|
||||
```
|
||||
|
||||
创建一个空文件:
|
||||
|
||||
```
|
||||
$ touch Empty\ Document
|
||||
```
|
||||
|
||||
或
|
||||
|
||||
```
|
||||
$ touch "Empty Document"
|
||||
```
|
||||
|
||||
![][4]
|
||||
|
||||
新开一个 Nautilus 文件管理器,然后检查一下右键单击菜单中是否成功添加了“新建文档”按钮。
|
||||
|
||||
![][5]
|
||||
|
||||
在 Ubuntu 18.04 的右键单击菜单中添加“新建文件”按钮
|
||||
|
||||
如上图所示,我们重新启用了“新建文件”的按钮。
|
||||
|
||||
你还可以为不同文件类型添加按钮。
|
||||
|
||||
```
|
||||
$ cd ~/Templates
|
||||
|
||||
$ touch New\ Word\ Document.docx
|
||||
$ touch New\ PDF\ Document.pdf
|
||||
$ touch New\ Text\ Document.txt
|
||||
$ touch New\ PyScript.py
|
||||
```
|
||||
|
||||
![][6]
|
||||
|
||||
在“新建文件”子菜单中给不同的文件类型添加按钮
|
||||
|
||||
注意,所有文件都应该创建在 **~/Templates** 文件夹下。
|
||||
|
||||
现在,打开 Nautilus 并检查“新建文件” 菜单中是否有相应的新建文件按钮。
|
||||
|
||||
![][7]
|
||||
|
||||
如果你要从子菜单中删除任一文件类型,只需在 Templates 目录中移除相应的文件即可。
|
||||
|
||||
```
|
||||
$ rm ~/Templates/New\ Word\ Document.docx
|
||||
```
|
||||
|
||||
我十分好奇为什么最新的 Ubuntu GNOME 版本将这个常用选项移除了。不过,重新启用这个按钮也十分简单,只需要几分钟。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/how-to-add-new-document-option-in-right-click-context-menu-in-ubuntu-18-04/
|
||||
|
||||
作者:[sk][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID][c]
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[c]: https://github.com/scvoet
|
||||
[1]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu-1-720x340.png
|
||||
[2]: https://www.ostechnix.com/linux-package-managers-compared-appimage-vs-snap-vs-flatpak/
|
||||
[3]: https://www.ostechnix.com/wp-content/uploads/2019/07/new-document-option-missing.png
|
||||
[4]: https://www.ostechnix.com/wp-content/uploads/2019/07/Create-empty-document-in-Templates-directory.png
|
||||
[5]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu-In-Ubuntu.png
|
||||
[6]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-options-for-different-files-types.png
|
||||
[7]: https://www.ostechnix.com/wp-content/uploads/2019/07/Add-New-Document-Option-In-Right-Click-Context-Menu.png
|
Loading…
Reference in New Issue
Block a user