Nautilus是(Nautilus)Ubuntu中(Ubuntu)Gnome环境的默认文件浏览器。Nautilus Actions是 Nautilus 的一个工具,允许您将程序添加到(Nautilus)Gnome中的上下文或右键菜单中。这提供了右键单击文件(例如文本文件)并从弹出菜单中选择打开文件的程序的能力。
要安装Nautilus Actions,请打开终端(Terminal)窗口并输入以下内容:
sudo apt-get install nautilus-actions
安装Nautilus Actions(Nautilus Actions)后,选择Preferences | Nautilus Actions Configuration系统(System)菜单中的Nautilus 操作配置。
将显示Nautilus 操作(Nautilus Actions)对话框。要添加新操作,请单击添加(Add)。
将显示添加新操作(Add a New Action)对话框。
对于本例,我们在上下文菜单中添加了“使用 Amarok 打开(Open with Amarok)”选项,因此我们可以右键单击.mp3文件并在Amarok播放器中打开它。在标签(Label)编辑框中输入“使用 Amarok 打开(Open with Amarok)”作为菜单项的标签。
如果要显示工具提示,请在(Tooltip)工具提示(Tooltip)编辑框中输入所需的文本。我们把它留空。要选择图标,请单击浏览(Browse)按钮。显示nautilus-actions对话框,提供可供选择的像素图列表。向下滚动(Scroll)以找到如下图所示的Amarok图标并单击它。
单击打开(Open)以选择图标并返回到添加(Add a )新操作(new action)对话框。要选择Amarok程序,请单击Add a new action对话框中(new action)Path编辑框旁边的Browse(如上图所示)。在nautilus-actions对话框中,向下滚动以在右侧窗格的列表中找到amarok并单击它。
单击打开(Open)以选择程序并返回到添加新操作(Add a new action)对话框。
如果要指定要发送到所选程序的任何参数,请使用“参数(Parameters)”编辑框添加它们。单击图例(Legend)按钮以查看您可以使用的不同参数的格式列表。参数是调用应用程序时使用的命令行选项。
注意(NOTE):要找出您选择的应用程序的可用参数,打开终端(Terminal)窗口并运行“ [command] –help ”(例如,“ amarok –help ”),或者,要获得更详细的描述,请使用“ man [command ] '(例如,man amarok)。
没有我们想为Amarok添加的参数,所以我们将参数(Parameters)编辑框留空。单击确定(OK)接受您的更改并关闭添加(Add a )新操作(new action)对话框。
然后,单击Nautilus 操作(Nautilus Actions)对话框上的关闭。(Close )
我们从Places菜单中打开Music文件夹以访问我们的.mp3文件。
我们右键单击.mp3文件,可以使用Open with Amarok选项。
您可以为您经常使用的文件类型添加到其他应用程序的快捷方式。
通过洛里考夫曼
Add Shortcuts to the Right-Click Context Menu in Ubuntu
Nautilus is the default file browser for the Gnome environment in Ubuntu. Nautilus Actions is a tool for Nautilus that allows you to add programs to the context, or the right-click menu, in Gnome. This provides the ability to right-click on a file, such as a text file, and select the program with which to open the file from the pop-up menu.
To install Nautilus Actions, open a Terminal window and enter the following:
sudo apt-get install nautilus-actions
Once Nautilus Actions is installed, select Preferences | Nautilus Actions Configuration from the System menu.
The Nautilus Actions dialog box displays. To add a new action, click Add.
The Add a New Action dialog box displays.
For this example, we are adding an “Open with Amarok” option to the context menu, so we can right-click on an .mp3 file and open it in the Amarok player. Enter ‘Open with Amarok’ as the label for the menu item in the Label edit box.
If you want a Tooltip to display, enter the text you want in the Tooltip edit box. We left it blank. To select an icon, click the Browse button. The nautilus-actions dialog box displays, providing a list of pixmaps from which to select. Scroll down to find the icon for Amarok as pictured below and click on it.
Click Open to select the icon and return to the Add a new action dialog box. To select the Amarok program, click Browse next to the Path edit box on the Add a new action dialog box (pictured above). On the nautilus-actions dialog box, scroll down to find amarok in the list in the right pane and click on it.
Click Open to select the program and return to the Add a new action dialog box.
If you want to specify any parameters to send to the selected program add them using the Parameters edit box. Click the Legend button to view a list of formats for the different parameters you can use. Parameters are command-line options used when calling an application.
NOTE: To find out the available parameters for the application you selected, open a Terminal window and run ‘[command] –help’ (e.g., ‘amarok –help’), or, for a more detailed description, use ‘man [command]’ (e.g., man amarok).
There are no parameters we wanted to add for Amarok, so we left the Parameters edit box blank. Click OK to accept your changes and close the Add a new action dialog box.
Then, click Close on the Nautilus Actions dialog box.
We open the Music folder from the Places menu to access our .mp3 file.
We right-click on the .mp3 file and the Open with Amarok option is available.
You can add shortcuts to other applications for files types you use often.
by Lori Kaufman