# Starting &appname;

You can start &appname; in the following ways:

System menu

  Choose Preferences Look and Feel Nautilus-Actions Configuration Tool .

Command line

  To start &appname; from a command line, type the following command:

  ``nautilus-actions-config-tool``

  then press Return.

  To view available command line options, type:

  ``nautilus-actions-config-tool` `--help-all``

  then press Return.

# The first run

When you start &appname;, the following window is displayed.

## &appname; Start Up Window

Shows &appname; main window. Contains menubar, toolbar, display area, an empty items list in the left, several disabled properties tabs, and statusbar.

The empty &appname; main window

The &appname; main window contains the following elements:

Menubar.

  The menus on the menubar contain all of the commands you need to use in &appname;.

  Shortcuts are available for some commands:

  Ctrl N

    Create a new action.

  Ctrl S

    Save modified actions and menus.

  Ctrl Q

    Quit the application.

  Ctrl X

    Cut the current selection, keeping it in the clipboard.

  Ctrl C

    Copy the current selection to the clipboard.

  Ctrl V

    Insert the content of the clipboard before the current item.

  Shift Ctrl V

    Insert the content of the clipboard as subitem(s) of the current item.

  Delete

    Delete the current selection.

  F5

    Reload the actions and menus.

  F1

    Display the help.

Toolbar.

  Several toolbars may be displayed below the menubar, depending of your choices in the View Toolbars submenu.

Items list.

  The list on the left of the main window contains all items, whether they are actions or menus, currently available for edition in &appname;.

  Items may be sorted in ascending or descending alphabetical order, or not sorted at all, being directly organized and managed by the user.

  Invalid items are displayed in red color.

  Modified items are displayed in italic characters.

Sort buttons

  Three buttons allow you to toggle between sort modes.

Properties tabs.

  The right part of the main window displays all is needed to define how, when and where actions and menus should be displayed.

  Action/Menu

    Define in which &nautilus; menus the item should appear, and how it will be displayed.

  Command

    Specify which command to execute, and which parameters pass to it.

  Execution

    Specify how the command should be executed.

  Basenames

    Define the basename filters the &nautilus; selection must satisfy in order the action or menu be candidate for display.

  Mimetypes

    Define the mimetype filters the &nautilus; selection must satisfy in order the action or menu be candidate for display.

  Folders

    Define the folder filters the &nautilus; selection must satisfy in order the action or menu be candidate for display.

  Schemes

    Define the scheme filters the &nautilus; selection must satisfy in order the action or menu be candidate for display.

  Capabilities

    Define the capability filters the &nautilus; selection must satisfy in order the action or menu be candidate for display.

  Environment

    Define some environment conditions the &nautilus; selection must satisfy in order the action or menu be candidate for display.

  Properties

    Display item properties.

Statusbar.

  The statusbar displays some status informations about the currently selected row in the items list.

  When no relevant information is to be displayed, the statusbar displays the count of loaded menus, actions and profiles.

  The &laquosp;read-only&spraquo; icon is displayed in the right of the statusbar when appropriate.

# Creating your first action

In this example, we are going to create an action which displays some pretty informations about the current selection.

## Checking for prerequisites

This action will require &zenity;.

&zenity; is a program which will allow you to create a graphical user interface from a command-line.

You should check that this program is installed on your system, by example by typing the following command in a terminal:

``zenity``

then press Return.

## Creating the action

To create a new action, choose Ctrl N File New action .

A new action is inserted in the items list, and its properties are displayed in the tabs on the right pane.

The label of the currently edited action (this one) is added to the application name in the title bar.

## Default properties of a new action

Shows the default properties of a newly created action.

Default properties of a new action

In the Items list, the new action is displayed in italic characters.

Italics are used as a reminder that the item has not yet been saved.

As another reminder that there is some pending modifications, an asterisk (&laquosp;`*`&spraquo;) comes to prefix the application name in the title bar.

## Qualifying your new action

It merely consists of choosing how your action will be displayed in the file manager context menu.

- Enter `My first action` in the Context label entry box.

  The Context label entry box contains the label of the action as you want it to be displayed in the file manager context menu.

  The label is a mandatory property of your action. If it happens to be empty, then your action will be considered as invalid by &prodname;: it will be displayed in red in Items list and will never be candidate to be displayed in the file manager context menus.

- Enter `This will execute an action with some parameters` in the Tooltip entry box.

  The Tooltip entry box contains the text you want to be displayed as a short help to your action.

- Select in the Icon drop-down list.

  The Icon selection defines the icon which will be associated with your action in file manager context menus and in the toolbar.

  You have two ways of choosing the icon associated to your action:

  - Click on the Icon drop-down list to select an icon.

  - Click on Browse to search for an image in the filesystem.

## Specifying the command to be executed

When you will select your action in the file manager context menu, this command will be executed, with arguments of your choice.

Click on the Command tab to show the page which will permit you to enter the command.

## Command page

Shows the Command tab. This tab contains the name of the profile, the command to be executed along with its parameters, and the configuration of the starting working directory.

Command page

- Enter `zenity` in the Path entry box.

  The Path entry box defines the command which will be executed when you will select your action in the file manager context menu.

  You have two ways of defining the command to be executed:

  - Enter it in the Path entry box.

  - Click on Browse to select the executable file on the filesystem.

  If the command you enter does not have an absolute path, then it will be searched for in the `PATH` variable at execution time.

- Enter `--info --text='%c selected item(s): %U'` in the Parameters entry box.

  The Parameters contains the arguments which will be passed to your command when it will be executed. These arguments may embed parameters which will be expanded at runtime.

  If both Path and Parameters are empty, then this action will be considered as invalid: it will be displayed in red in Items list and will never be candidate to be displayed in the file manager context menus.

## Saving

To save all pending modifications, choose Ctrl S File Save .

&nautilus; automatically takes into account your new action, and displays it in its context menu.

## Your first action in the &nautilus; context menu

Shows the first action in the &nautilus; context menu.

Your first action in the &nautilus; context menu

Cliking of the item in the &nautilus; context menu activates it, and executes the corresponding command.

## The result of the execution of your first action

Shows the result of the execution of your first action. This is &zenity; dialog box, displaying the URI of the selected item.

The result of the execution of your first action