单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

单击文件右键资源管理器重启

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

Use Nautilus-Actions to easily and graphically create custom context menu options for Ubuntu’s Nautilus file manager. If you don’t want to create your own, you can install Nautilus-Actions-Extra to get a package of particularly useful user-created tools.

使用Nautilus-Actions可以轻松地以图形方式为Ubuntu的Nautilus文件管理器创建自定义上下文菜单选项。 如果您不想创建自己的工具,则可以安装Nautilus-Actions-Extra以获得一包特别有用的用户创建的工具。

Nautilus-Actions is simple to use – much simpler than editing the Windows registry to add Windows Explorer context menu options. All you really have to do is name your option and specify a command or script to run.

Nautilus-Actions易于使用–比编辑Windows注册表以添加Windows Explorer上下文菜单选项要简单得多。 您真正要做的就是命名选项并指定要运行的命令或脚本。

创建自己的动作 (Creating Your Own Actions)

Grab the Nautilus-Actions Configuration Tool from the Ubuntu Software Center or run this command to install it:

从Ubuntu软件中心获取Nautilus-Actions配置工具,或运行以下命令进行安装:

sudo apt-get install nautilus-actions

须藤apt-get install nautilus-actions

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

After installing it, quit and restart the Nautilus file manager with the following command. You can also press Alt+F2 and type this command instead of running it in a terminal.

安装后,请使用以下命令退出并重新启动Nautilus文件管理器。 您也可以按Alt + F2并键入此命令,而不是在终端中运行它。

nautilus -q

鹦鹉螺-q

Launch the Nautilus-Actions Configuration Tool from the Dash after installing it.

安装后,从Dash启动Nautilus-Actions配置工具。

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

一个示例动作 (An Example Action)

Nautilus-Actions has quite a few options to work with, but creating a basic action is pretty easy. For example, the Thunar file manager (install it from the Ubuntu Software Center or with sudo apt-get install thunar, if you like) has a pretty good Bulk Rename tool. Let’s create an action to open selected files in Thunar’s Bulk Rename tool, integrating it with Ubuntu’s file manager.

Nautilus-Actions可以使用很多选项,但是创建基本动作非常容易。 例如,Thunar文件管理器(如果需要,可以从Ubuntu软件中心安装,也可以使用sudo apt-get install thunar安装 )具有很好的批量重命名工具。 让我们创建一个动作,在Thunar的Bulk Rename工具中打开所选文件,并将其与Ubuntu的文件管理器集成。

First, click the New Action button on the toolbar and type the name of your action into the Context Label box.

首先,单击工具栏上的“新建操作”按钮,然后在“上下文标签”框中键入操作的名称。

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

Click the Command tab and enter the command or script you want to use into the Path box — thunar -B, in our example. You should also enter the appropriate parameter into the Parameters box — you can click the Legend button to see a list of parameters you can use. In this case, we want the %B parameter to feed the Bulk Rename tool a space-separated list of file names. Nautilus-Actions shows you a preview of the command it will run, so you’ll know you’re on the right track.

单击“命令”选项卡,然后在“路径”框中输入您要使用的命令或脚本—在我们的示例中为thunar -B 。 您还应该在“参数”框中输入适当的参数-您可以单击“图例”按钮以查看可以使用的参数列表。 在这种情况下,我们希望%B参数为批量重命名工具提供一个以空格分隔的文件名列表。 Nautilus-Actions向您显示了它将运行的命令的预览,因此您将知道自己处在正确的轨道上。

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

Nautilus-Actions offers quite a few more options we can play with, but they’re unnecessary in this case. Click the Save button on the toolbar and your action will immediately be added to Nautilus. Right-click some files in Nautilus and you’ll see your new action in the Nautilus-Actions submenu.

Nautilus-Actions提供了许多可供我们使用的选项,但是在这种情况下,它们是不必要的。 单击工具栏上的“保存”按钮,您的操作将立即添加到Nautilus。 右键单击Nautilus中的一些文件,您将在Nautilus-Actions子菜单中看到新操作。

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

If you created the Bulk Rename With Thunar action, you can click it and Thunar’s Bulk Rename interface will open (assuming you installed it) with the files automatically selected.

如果创建了“使用Thunar进行批量重命名”操作,则可以单击它,然后Thunar的“批量重命名”界面将打开(假定已安装),并自动选择文件。

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

If you don’t like the submenu, click the Preferences button in the Nautilus-Actions Configuration Tool window and uncheck the “Create a root ‘Nautilus-Actions’ menu” option.

如果您不喜欢该子菜单,请在Nautilus-Actions配置工具窗口中单击“首选项”按钮,然后取消选中“创建根'Nautilus-Actions”菜单”选项。

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

After running nautilus -q again to restart Nautilus, the submenu will disappear and you’ll see your new option in Nautilus’ main menu.

再次运行nautilus -q重新启动Nautilus后,该子菜单将消失,您将在Nautilus的主菜单中看到新选项。

高级选项 (Advanced Options)

Nautilus-Actions offers many more configuration options on its other tabs. For example, you can tell Nautilus-Actions to launch the specified command in a terminal.

Nautilus-Actions在其其他选项卡上提供了更多配置选项。 例如,您可以告诉Nautilus-Actions在终端中启动指定的命令。

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

Your action will appear for all files and folders by default, but you can match specific mimetypes (file types), file names, folders, and more.

默认情况下,您的操作将针对所有文件和文件夹显示,但您可以匹配特定的模仿类型(文件类型),文件名,文件夹等。

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

安装和使用预创建的动作 (Installing & Using Pre-Created Actions)

To download some particularly useful actions that have been created by other users, install the nautilus-actions-extra package on your system:

要下载其他用户创建的一些特别有用的操作,请在系统上安装nautilus-actions-extra软件包:

sudo apt-add-repository ppa:nae-team/ppa sudo apt-get update sudo apt-get install nautilus-actions nautilus-actions-extra

sudo apt-add-repository ppa:nae-team / ppa sudo apt-get更新sudo apt-get安装nautilus-actions nautilus-actions-extra

If you only want specific actions, you can install them from the PPA instead of installing the entire nautilus-actions-extra package.

如果只需要特定的操作,则可以从PPA安装它们,而不必安装整个nautilus-actions-extra软件包。

Quit and restart Nautilus after installing the actions:

安装操作后退出并重新启动Nautilus:

nautilus -q

鹦鹉螺-q

After installing Nautilus-Actions-Extra, you’ll find quite a few new options in the file manager’s right-click context menus. Some actions appear when you right-click any file or group of files — for example, a mass rename option — while some actions only appear when you right-click a certain type of file — for example, an image or multimedia conversion option.

安装Nautilus-Actions-Extra之后,您将在文件管理器的右键单击上下文菜单中找到许多新选项。 右键单击任何文件或文件组时,会出现某些操作(例如,批量重命名选项),而当您右键单击某种类型的文件时,例如,图像或多媒体转换选项,则会显示某些操作。

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

For example, the Set Emblem action, also known as Emblemizer, allows you to apply emblems to your folders and files. This feature was removed from Nautilus’ Properties dialog in Nautilus version 3.

例如,“设置标志”动作(也称为“标志器”)允许您将标志应用于文件夹和文件。 此功能已从Nautilus版本3中的Nautilus的“属性”对话框中删除。

单击文件右键资源管理器重启_如何轻松地将自定义右键单击选项添加到Ubuntu的文件管理器...

Nautilus-Actions-Extra includes many more tools for everything from advanced search, editing text files as root, and mounting ISO files. If you want to do something from Nautilus’s right-click menu, there’s a good chance this package includes an option for it.

Nautilus-Actions-Extra包括许多其他工具,可用于从高级搜索,以root身份编辑文本文件以及安装ISO文件的所有操作。 如果您想通过Nautilus的右键菜单执行某项操作,则该软件包很有可能包含一个选项。

翻译自: https://www.howtogeek.com/116807/how-to-easily-add-custom-right-click-options-to-ubuntus-file-manager/

单击文件右键资源管理器重启