# The &kalarm; Handbook

## Introduction

&kalarm; is a personal alarm message, command and email scheduler. It lets you set up personal alarm messages which pop up on the screen at the chosen time, or you can schedule commands to be executed or emails to be sent.

In its default graphical mode, &kalarm; displays the list of pending alarms, showing their times and details. You can create new alarms, or you can select existing alarms for modification or deletion. You can also optionally view expired alarms.

When setting up or modifying an alarm, you may either type in the alarm message text, specify a text or image file to display, specify a command to execute, or enter an email to send. You can also choose the color of the alarm message, whether it should repeat, whether to play a sound, and whether the alarm should be canceled if it cannot be triggered at its scheduled time.

Alarms may also be scheduled from the command line, or via &DCOP; calls from programs.

When an alarm message is due, it is displayed on each &kde; desktop to ensure that you don't miss it. The message window shows the time for which the alarm was scheduled. It usually has a defer option to ask for the alarm to be displayed again later. An example of an alarm message:

Screenshot of the &kalarm; message window Alarm message

When the alarm specifies a command to execute or an email to send, &kalarm; displays nothing.

&kalarm; can run in either of two modes: continuous (the default) where it runs from the &kde; system tray, or on-demand where it runs as and when required (with the option of displaying an independent system tray icon).

This document makes various references to the alarm daemon. This is an application which runs in the background, checking pending alarms and telling &kalarm; to display them when they become due.

## Using &kalarm;

### Graphical mode

When it is run with no command line parameters, &kalarm; starts in graphical mode, and displays the current list of outstanding alarms.

When &kalarm; starts in graphical mode, it checks whether the alarm daemon is running. If it is not already running, &kalarm; starts it.

All spin boxes in &kalarm; have an acceleration facility. To make the value change by larger steps, hold down the Shift key while you click on the spin arrow buttons.

#### Alarm list

The main &kalarm; window displays the current list of pending alarms, showing their times, repetition intervals, colors, and message texts, names of files to display, commands to execute or email subjects. (For a recurring alarm or an alarm with a reminder, the time shown is its next scheduled trigger time.) An icon at the left of each alarm text/file/command/email subject indicates the type of alarm.

Screenshot of the &kalarm; main window Main window

For a repeated alarm, the list shows its next scheduled trigger time and its basic repetition interval (⪚ 1 Day for a daily recurrence, 3 Weeks for a recurrence which triggers on Monday and Wednesday every third week, Login for a repeat-at-login alarm).

The alarms may be ordered by date/time, repeat interval, color or text by clicking on the titlebar for the appropriate column. To reverse the sort order, click the column titlebar again.

You can optionally show the remaining time until each alarm is due, together with, or instead of, the alarm's scheduled time. To show or hide the alarm time column, select View Show Alarm Times. To show or hide the time-to-alarm column, select View Show Time To Alarms. At least one of these columns is always shown.

Expired alarms may be shown in the alarm list by selecting View Show Expired Alarms. To hide them again, repeat the action.

#### Adding a new alarm

To add a new alarm, do one of the following. This displays the alarm edit dialog as described below.

- Select Actions New.

- Right click on the system tray icon and choose New from the context menu.

- Double click on empty space below the last entry in the alarm list.

- Right click on empty space below the last entry in the alarm list and choose New from the context menu.

Alternatively, you can create new alarms preconfigured from various sources:

- To base your new alarm on an existing one, highlight the existing alarm in the list and select Actions Copy. This opens the alarm edit dialog already filled in with a copy of the selected alarm's details.

- To create a new alarm which displays an existing email message, drag the email from &kmail; onto &kalarm;'s main window or system tray icon. This opens the alarm edit dialog with the entire email message (including sender, recipient, etc.) as the alarm text.

- Dragging any piece of text onto &kalarm;'s main window or system tray icon opens the alarm edit dialog and sets the alarm text.

- To create a file display alarm, drag a file URL onto &kalarm;'s main window or system tray icon. This opens the alarm edit dialog and sets the file name.

- You can automatically create birthday alarms for people in &kaddressbook; as described in Importing birthdays from &kaddressbook;.

#### Modifying an existing alarm

To modify an existing pending alarm (expired alarms cannot be amended), do one of the following:

- Double click on its entry in the alarm list.

- Select it by clicking on its entry in the alarm list. Then choose Actions Modify.

- Right click on its entry in the alarm list and choose Modify from the context menu.

This displays the alarm edit dialog:

Screenshot of the alarm edit dialog Alarm edit dialog

In the Action group box, select the type of alarm:

- Text in order to enter an alarm message text (which may include newlines) in the edit box. Set the following options:

  - The Confirm acknowledgment checkbox lets you specify whether you will be prompted for confirmation when you close the alarm message window. This may be used as a safeguard against accidental acknowledgment of alarms.

  - Check the Sound checkbox if you want an audible alarm to sound when the alarm message is displayed. By default a beep is sounded; use the button on the right to select an audio file to play. To revert to a beep, click the button again. To see what your current sound selection is, hover the mouse above the button until a tooltip appears.

  - Check the Reminder checkbox if you want to display a reminder in advance of the main alarm and of each of its recurrences (if any). Enter how long in advance using the edit controls beside the checkbox.

  - Select the background color for the alarm message window. (The color selection list can be configured in the Preferences dialog.)

  - Use the Font & Color... button to select a font, or foreground or background color, for the alarm message. In the Choose Alarm Font & Color dialog, check Use default font to display the message in whatever font is configured as the default at the time the message is displayed. (The default font can be set in the Preferences dialog.) To choose a specific font for the message, uncheck Use default font.

- File to enter the name or &URL; of a text or image file whose contents are to be displayed in the alarm message. Use the button beside the edit box to display a file selection dialog. Set options as for text alarms above.

- Command to enter a shell command line to execute. The command is passed straight to the default shell (defined by the `SHELL` environment variable), and may include whatever options, parameters, piped commands, etc. are permitted by the shell in a single line command.

  This option is not available if &kde; is running in kiosk mode.

- Email to enter an email message to send. Fill in the recipients' addresses, the email subject line and the message body in the three edit fields. Use the button beside the addressee edit box to display your &kde; address book from which you can select email recipients. Attachments may be added using the Add... button. Note that attached files must still exist when the alarm is triggered; no copy is stored at the time the alarm is configured. To remove an attachment, highlight it in the drop-down list and click the Remove button.

  You can set your email address from which the email is sent, in the Preferences dialog, the default being your email address set in the &kde; Control Center.

  Set the following option:

  - Check the Copy email to self checkbox to send a blind copy of the email to yourself when the alarm is triggered. The email address to which the copy will be sent may be set in the Preferences dialog, the default being your email address set in the &kde; Control Center.

If the alarm is a recurring alarm and it was deferred after it was last displayed, the Deferred Alarm group box shows the time the alarm was deferred to. Change... displays a dialog which allows you to change the deferred time or to cancel the deferral.

In the Time group box, select either

- At date/time to enter the date and time when the alarm is to be triggered. Check the Any time checkbox if you want to specify only a date for the alarm: in this case the alarm will be displayed at the first opportunity on or after the configured start-of-day time, on the specified date. (Configuring &kalarm; describes how to set the start-of-day time.)

  For a non-recurring alarm, the date/time which you enter must be in the future, or if you enter only a date it must be today or later. For a recurring alarm, there are no such restrictions since the start date/time will be automatically adjusted to the first recurrence due after the current time.

- Time from now to enter how long after now (in hours and minutes) the alarm should be triggered.

The alarm's basic repetition characteristic is displayed for convenience in the Alarm tab. Specify whether or how the alarm should be repeated in the Recurrence tab:

- In the Recurrence Rule group box, set the recurrence type or time period as follows:

  - To trigger the alarm once only, select No recurrence.

  - Select At login to trigger the alarm whenever you log in, until its scheduled end time. Then, at its scheduled end time it will finally be triggered one last time. (Note that an alarm repeated at login will also be triggered any time you enable alarms, or restart or reset the alarm daemon.)

  - To make the alarm recur at regular intervals, select one of the time period types and then enter in the Recur every box how many time periods should elapse between recurrences. For example, to repeat every fortnight, you could select Daily and enter a value of 14, or select Weekly and enter a value of 2. Depending on the time period type selected, you may have further options:

    - For a weekly recurrence, check each day in the week on which you wish to trigger the alarm.

    - For a monthly recurrence, you may select either a fixed date, or a position (⪚ the second Tuesday).

    - For a yearly recurrence, you may select either a fixed day in the month, or a position in a month (⪚ the last Saturday in May). Check each month of the year in which you wish to trigger the alarm.

    To set a daily alarm to occur only on weekdays, use a weekly recurrence and check each weekday.

- In the Recurrence End group box, set the overall recurrence time span as follows:

  - Select No end to continue the repetitions indefinitely.

  - Select End after to specify the total number of occurrences of the alarm.

  - Select End by to specify the date/time until which the alarm will be repeated.

- If you wish to exclude certain date/times from the recurrence which you have set up, specify them in the Exceptions group box. The list of exceptions (&ie; excluded date/times) is shown on the left. To add a new exception, enter a date on the right and press Add. To change an exception, highlight it in the list, enter the new date on the right and press Change. To delete an exception, highlight it in the list and press Delete.

The Cancel if late checkbox determines what happens if the alarm cannot be triggered at its scheduled time. Check this box to cancel the alarm if it cannot be triggered within one minute after the right time. Leave the box unchecked to trigger the alarm at the first opportunity starting at the scheduled time. Date-only alarms, &ie; ones for which the Any time option is selected, will be canceled if they cannot be displayed within 24 hours of the start-of-day time on the date scheduled.

An alarm can only be triggered while you are logged in, and while both X and the alarm daemon are running.

Press the OK button when all details are correct, to add the alarm to the scheduled list.

#### Deleting an alarm

To delete an existing alarm, do one of the following:

- Select it by clicking on its entry in the alarm list. Then choose Actions Delete .

- Right click on its entry in the alarm list and choose Delete from the context menu.

#### Viewing an alarm

To view an existing alarm without the ability to modify it, do one of the following:

- Select it by clicking on its entry in the alarm list. Then choose Actions View .

- Right click on its entry in the alarm list and choose View from the context menu.

This displays the alarm edit dialog in read-only mode.

#### Acknowledging an alarm

See Alarm message window for how to acknowledge alarms.

#### Importing birthdays from &kaddressbook;

You can set up display alarms for birthdays stored in &kaddressbook;, by File Import Birthdays.... This displays a dialog which allows you to select which birthdays to create alarms for.

- In the Alarm Text group box, you can set up the text to be displayed in the birthday alarm messages. The message text is created by combining the Prefix text followed by the person's name followed by the Suffix text. No spaces are added, so remember to include any necessary trailing space in Prefix and leading space in Suffix.

  If you change the alarm text, the birthday selection list will be re-evaluated.

- In the Select Birthdays list, select the birthdays which you want to create alarms for. Note that the list shows only those entries in &kaddressbook; which contain a birthday and which do not already have a birthday alarm in format currently defined in the Alarm Text group box.

- The remaining controls are the same as for Text alarms in the Alarm Edit dialog.

#### Displaying &kalarm; in the system tray

You must be running the &kde; desktop in order to display &kalarm; in the system tray. If &kalarm; is running in continuous mode, the system tray icon is always displayed. These instructions apply only to on-demand mode. (See Configuring &kalarm; for a description of run modes.)

To display &kalarm; in the &kde; system tray, select View Show in System Tray .

To remove &kalarm; from the &kde; system tray, do one of the following:

- Select View Hide from System Tray.

- Right click on the system tray icon and choose Quit from the context menu.

Use of the system tray icon is described below.

#### Enabling/disabling alarm monitoring

##### Enabling alarm monitoring

First, if &kalarm;'s run mode is continuous and you have selected Disable alarms while not running in the Preferences dialog, you must ensure that &kalarm; is running in order for alarm monitoring to take place.

Then if alarm monitoring is currently disabled, do one of the following:

- Select Actions Enable Alarms.

- Right click on the system tray icon and choose Enable Alarms from the context menu.

The alarm daemon is started if necessary and alarms will be monitored for when they become due.

Starting the alarm daemon will affect any other applications which use the alarm daemon.

##### Disabling alarm monitoring

There are several ways to disable alarm monitoring, which prevents &kalarm; from displaying any further alarms either until you re-enable alarms, or - assuming that the alarm daemon is configured to start at login - until the next time you log in.

To disable alarms without stopping the alarm daemon (and therefore without affecting any other applications which use the alarm daemon), do one of the following:

- Select Actions Alarms Enabled.

- Right click on the system tray icon and choose Alarms Enabled from the context menu.

- If &kalarm;'s run mode is continuous and you have selected Disable alarms while not running in the Preferences dialog, quit &kalarm;.

To disable alarms by stopping the alarm daemon:

- Select Settings Control Alarm Daemon.... This displays the Service Manager dialog which enables you to stop the alarm daemon.

This will affect any other applications which use the alarm daemon.

#### Refreshing alarms

If in the unlikely event that any alarm was not triggered when it should have been, you can refresh the alarm list and trigger any missed alarms by selecting Actions Refresh Alarms .

&kalarm; retriggers missed alarms by resetting the alarm daemon, which is discussed in the Alarm daemon section.

#### Controlling the alarm daemon

To control the alarm daemon, select Settings Control Alarm Daemon.... This displays the Service Manager dialog which allows you to stop or start the alarm daemon and configure whether it runs automatically at login. See Controlling the alarm daemon with the Service Manager for details.

#### Quitting the program

Quit &kalarm; by closing all its windows and the system tray icon, or if it is running in continuous mode, by closing any message windows and selecting Quit in the system tray icon context menu.

File Quit closes only the window concerned. The effect of the system tray icon context menu item Quit depends on the run mode: in on-demand mode it hides the system tray icon, while in continuous mode it quits the program.

If you have deselected Disable alarms while not running in the Preferences dialog, quitting &kalarm; has no effect on the alarm daemon which if already active will continue to monitor scheduled alarms and request their display when they become due.

### Alarm message window

When an alarm message is due, it is displayed on each &kde; desktop and cannot be covered by ordinary windows, to ensure that you see it. The message window shows the time for which the alarm was scheduled, so that you can see when it popped up if you were away from the computer at the time. (For reminder messages, however, the date/time shown is that for the main alarm or its recurrence, not the reminder message time, and the window title is Reminder).

In the case of a recurring alarm, if an unacknowledged message window remains from a previous occurrence of the alarm, the existing window is simply popped up when the alarm recurs. This avoids having to acknowledge multiple copies of the same message should you not wish, or be unable, to acknowledge a message at the time it appears.

When an alarm message window is displayed, do one of the following:

- Acknowledge it by clicking the Close button. This closes the window (after a prompt for confirmation, if you selected Confirm acknowledgment).

- Display options to defer the alarm by clicking the Defer... button. Then select Defer to date/time to enter the date and time when the message is to be redisplayed, or select Defer for time interval to enter how long after now (in hours and minutes) the message should be redisplayed. Then click Defer to defer the alarm message.

  The time the alarm is deferred to must be earlier than its next scheduled occurrence or next reminder.

  The Defer... button is not available for alarms which are displayed at login due to the Repeat at login option having been selected.

The button showing the &kalarm; icon provides a convenient way to activate &kalarm;. Clicking it has no effect on the alarm message window.

The alarm message window may be displayed in two different modes, depending on your preferences. You can choose the mode in the Preferences dialog.

- As a normal window. In this mode, the keyboard focus is taken by the alarm message window when it appears, so if you are typing at the time your keystrokes will be diverted to it rather than your original application.

- As a non-modal window. In this mode, the keyboard focus is unaffected when the alarm message window appears, so it will not interfere with your typing. However in this mode the window has no titlebar, so you cannot move it.

### System tray icon

&kalarm; may be run as an icon in the &kde; system tray. This icon allows one-click activation of &kalarm;, and provides both control and status indication of alarm monitoring. A normal &kalarm; icon indicates that alarms are being monitored, while a gray icon indicates that alarms are not being monitored.

If you hover the mouse cursor over the system tray icon, a summary of the first few message alarms due in the next 24 hours are displayed as a tooltip. You can switch this feature off, or configure the number of alarms to display and their format, in the Preferences dialog.

Left click on the system tray icon to toggle between displaying and hiding the &kalarm; main window.

Right click on the system tray icon to display its context menu:

Enable Alarms

- Enables monitoring of alarms.

  See Enabling/disabling alarm monitoring for details.

Alarms Enabled

- Disables monitoring of alarms.

  See Enabling/disabling alarm monitoring for details.

New Alarm...

- Opens the alarm edit dialog to create a new alarm.

  The alarm edit dialog is described in Modifying an existing alarm.

Configure &kalarm;...

- Displays the &kalarm; preferences dialog.

  The preferences dialog is described in Configuring &kalarm;. It includes options relating to the &kalarm; system tray icon.

Control Alarm Daemon...

- Displays the Service Manager dialog which allows you to control the alarm daemon.

  See Controlling the alarm daemon with the Service Manager for details.

Restore / Minimize

- Restores or minimizes the main &kalarm; window.

  This option is only available if the run mode is continuous. (See Configuring &kalarm; for a description of run modes.)

Quit

- Closes the &kalarm; system tray icon.

  In continuous run mode only, it also closes all &kalarm; main windows. It has no effect on the monitoring of alarms by the alarm daemon, if you have deselected Disable alarms while not running in the Preferences dialog.

### Command line operation

When command line parameters are supplied, &kalarm; does not display the list of scheduled alarms as described in Graphical mode above. Command line options specific to &kalarm; may be used to perform the following operations:

- schedule a new alarm

- control the alarm daemon

- control &kalarm;'s display mode

- obtain help

Additional command line options are provided primarily to enable other programs to interface to &kalarm;. They are described in the chapter Developer's Guide to &kalarm;.

The command line must only contain options applicable to one &kalarm; operation. If you want to perform multiple operations, you must invoke &kalarm; multiple times with a single set of options each time.

#### Schedule a new alarm

The following options are used to schedule a new alarm:

Option | Description
`-a`, `--ack-confirm` | Prompt for confirmation when the alarm message is acknowledged.
`-A`, `--attach `URL`` | Specify the name or &URL; of a file which is to be attached to the email. This option may be repeated as necessary. `--mail` must be specified with this option.
`-b`, `--beep` | Make an audible beep when the message is displayed. `--sound` must not be present if this option is specified.
`--bcc` | Blind copy the email to yourself. `--mail` must be specified with this option.
`-c`, `--color`, `--colour `color`` | Set the message background color to the specified &Qt; color name or hex code 0xRRGGBB.
`-C`, `--colorfg`, `--colourfg `color`` | Set the message foreground color to the specified &Qt; color name or hex code 0xRRGGBB.
`-e`, `--exec `commandline`` | Specify a shell command to execute. If specified, this option must be the last &kalarm; option in &kalarm;'s command line. All subsequent command parameters and options are interpreted as forming the command line to execute. `--file` and `--mail` cannot be specified with this option. `--ack-confirm`, `--beep`, `--color` and `--colorfg` are ignored with this option.
`-f`, `--file `URL`` | Specify the name or &URL; of a text or image file whose contents are to form the alarm message. `--exec` and `--mail` cannot be specified, and `message` must not be present with this option.
`-i`, `--interval `period`` | Set the interval between repetitions of the alarm. Hours/minutes are specified in the format `nHnM`, where `n` is a number, ⪚ 3H30M. Other time periods are specified in the format `nX`, where `n` is a number and `X` is one of the following letters: Y (years), M (months), W (weeks), D (days). Mandatory if `--repeat` or `--until` is specified. `--recurrence` cannot be specified with this option.
`-l`, `--late-cancel` | Cancel the alarm if it cannot be triggered at the correct time.
`-L`, `--login` | Trigger the alarm every time you log in. `--interval`, `--repeat` and `--until` cannot be specified with this option.
`-m`, `--mail `address`` | Send an email to the specified address. This option may be repeated as necessary. `--exec` and `--file` cannot be specified with this option. `--ack-confirm`, `--beep`, `--color` and `--colorfg` are ignored with this option.
`--recurrence `spec`` | Set the alarm to recur. Specify the recurrence using iCalendar syntax (defined in RFC2445), ⪚ FREQ=MONTHLY;COUNT=4;INTERVAL=3;BYDAY=-1MO. `--repeat`, `--interval`, and `--until` cannot be specified with this option.
`-r`, `--repeat `count`` | Set the number of times the alarm should be triggered. Specify -1 to repeat the alarm indefinitely. `--interval` must be, and `--until` and `--recurrence` cannot be, specified with this option.
`-R`, `--reminder `period`` | Output a reminder alarm the specified length of time before the main alarm and each of its recurrences (if any). Hours/minutes are specified in the format `nHnM`, where `n` is a number, ⪚ 3H30M. Other time periods are specified in the format `nX`, where `n` is a number and `X` is one of the following letters: W (weeks), D (days). This option cannot be specified with `--exec` or `--mail`.
`-s`, `--sound `URL`` | Specify the name or &URL; of an audio file to be played when the alarm message is displayed. `--beep` must not be present if this option is specified.
`-S`, `--subject `subject`` | The subject line of the email. `--mail` must be specified with this option.
`-t`, `--time `date/time`` | Trigger alarm on the date or at the date/time specified. Specify a date without a time in the format `yyyy-mm-dd`; specify a date and time by `[[[yyyy-]mm-]dd-]hh:mm` (where omitted, date fields default to the values for today).
`-u`, `--until `date/time`` | Repeat the alarm until the date or date/time specified. Specify a date without a time in the same format as for `--time`. `--interval` must be, and `--repeat` and `--recurrence` cannot be, specified with this option.
`message` | Message text to display or, if `--mail` is specified, the body of the email message.

Either a message text, `--file` or `--exec` must be specified; except as noted above, all the options are optional.

Two alternative examples which display a multi-line message with a red background at 10 p.m. on the 27th of this month are:

    % kalarm -c red -t 27-22:00 "Remember to\nSTOP"
    % kalarm -c 0xFF0000 -t 27-22:00 "Remember to\nSTOP"

#### Other options

The following options are used to reset or halt the alarm daemon, or to control &kalarm;'s display mode.

See the Alarm daemon section for a discussion about resetting and stopping the alarm daemon.

Option | Description
`--reset` | Reset the alarm daemon.
`--stop` | Stop the alarm daemon.
`--tray` | Display &kalarm; as an icon in the &kde; system tray.

For example, to reset the alarm daemon:

    % kalarm --reset

#### Help options

The following help options are common to all &kde; programs:

Option | Description
`--help` | Shows a brief options help text.
`--help-qt` | Shows numerous generic &Qt;-specific options.
`--help-kde` | Shows numerous generic &kde;-specific options.
`--help-all` | Shows all options.
`--author` | Shows the names and email addresses of &kalarm; authors.
`-v`, `--version` | Shows the running versions of the &Qt; library , &kde; and &kalarm;.
`--license` | Show license information.

### Alarm daemon

The alarm daemon, &kalarmd;, monitors &kalarm;'s calendar file for alarms becoming due. When it determines that an alarm is due, it tells &kalarm; to display or execute it, or to cancel it if it is late and late trigger was not selected for that alarm.

Under &kde;3, the alarm daemon may also be used by other applications, including KOrganizer.

The alarm daemon runs in the background, with no user interface. It may be controlled as described below.

#### Starting, resetting and stopping the alarm daemon

The alarm daemon is normally started at &kde; session login (unless you use the Service Manager dialog to disable auto start), and runs continuously until logout. If for any reason it is not running, alarm monitoring will not occur and &kalarm; will not display or execute any alarms.

##### Starting the alarm daemon

To start the alarm daemon, you can either run &kalarm; in its default graphical mode (&ie; without any command line parameters), enable alarms using &kalarm;'s system tray icon menu, reset the daemon as described below, start it using the Service Manager dialog (see Controlling the alarm daemon with the Service Manager) or you can run the alarm daemon directly from the command line:

    % kalarmd

##### Resetting the alarm daemon

It is also possible to reset the alarm daemon without stopping it. Resetting causes the alarm daemon to re-read the list of scheduled messages from the calendar file and re-initialize its &kalarm;-related data.

Why might you want to reset the alarm daemon? It isn't a very likely occurrence, but if for any reason &kalarm; was not able to run when the alarm daemon told it to trigger an alarm, that alarm will never be displayed or executed until the alarm daemon is either reset or restarted. Resetting is preferable to stopping the alarm daemon and restarting it, since resetting the daemon will not affect any other applications which use the alarm daemon.

Resetting starts the alarm daemon if it is not currently running.

To reset the alarm daemon, either use the menu command Actions Refresh Alarms or type the following command:

    % kalarm --reset

##### Stopping the alarm daemon

Stopping the alarm daemon will prevent any further monitoring of scheduled alarm messages until the daemon is restarted.

Stopping it will affect the functioning of any other applications which also use the alarm daemon. Consider resetting the daemon instead.

To stop the alarm daemon, either use the Service Manager dialog (see Controlling the alarm daemon with the Service Manager), or type the following command:

    % kalarm --stop

#### Controlling the alarm daemon with the Service Manager

The Service Manager dialog allows you to configure and control the alarm daemon. You can:

- Configure whether it runs automatically at login.

  If neither the alarm daemon nor &kalarm; is configured to run at login, alarm monitoring will not occur and &kalarm; will not display or execute any alarms.

- Stop and start the alarm daemon.

  Starting or stopping the alarm daemon will affect any other applications which use the alarm daemon.

The Service Manager dialog can be accessed either via the menu option Settings Control Alarm Daemon..., or via the &kde; Control Center.

## Configuring &kalarm;

To configure &kalarm;'s operation to suit your system and your personal preferences, select Settings Configure &kalarm;.... This displays the configuration dialog.

### General

The General section lets you control &kalarm;'s overall behavior:

- Run Mode group box: These options control &kalarm;'s system tray icon, and also allow some control over &kalarm;'s use of system resources by specifying whether or not to run it continuously. If system performance is of concern, running it on demand without displaying the system tray icon may be desirable; running it continuously in the system tray uses more system resources but gives the benefits of displaying an alarm-enabled indication and making the application more accessible. Running &kalarm; on demand does not affect the execution of alarms, since it is the alarm daemon and not &kalarm; which monitors the alarm list and triggers alarms.

  - Run continuously in system tray: &kalarm; runs continuously and the system tray icon is always displayed while it is running. In this mode, closing the system tray icon closes all &kalarm; main windows, and if no message windows are visible, quits the application. The options available in this mode are:

    - Autostart at login: This starts &kalarm; at &kde; session login, ensuring that &kalarm; runs at all times unless you manually quit.

    - Disable alarms while not running: Selecting this option has the effect that alarms will be disabled whenever &kalarm;'s system tray icon is not visible.

      - Warn before quitting: When alarms are disabled while &kalarm; is not running, selecting this option prompts you for confirmation if you attempt to terminate &kalarm; using the system tray icon's Quit option. This prevents accidental disabling of alarms. For safety, this option is automatically re-enabled by default whenever you change run mode.

    In this mode, if no &kde; system tray exists, &kalarm; runs continuously in the background and alarms are always enabled.

  - Run only on demand: &kalarm; is run only when an alarm is triggered, if you run it manually, or while its system tray icon is displayed. In this mode the system tray icon can still be displayed, but closing the system tray icon has no effect on any &kalarm; windows.

    - Autostart system tray icon at login: This displays &kalarm;'s system tray icon at login. &kalarm; will run until the system tray icon is closed.

- Start of day for date-only alarms: Set the start-of-day time for the purposes of triggering date-only alarms, &ie; ones for which the Any time option was selected. On the date when they are due, such alarms will be output at the earliest opportunity during the 24 hours starting from the start-of-day time.

- If you set up yearly recurrences for February 29th, specify how these are to be handled in non-leap years by selecting one of the following options:

  - February 28th: the alarm will occur on February 29th in leap years, and on February 28th in non-leap years.

  - March 1st: the alarm will occur on February 29th in leap years, and on March 1st in non-leap years.

  - Do not repeat: the alarm will occur on February 29th in leap years, but will be suppressed in non-leap years.

  Changing this option will not cause the next scheduled recurrence of any existing alarms to be re-evaluated. It will only affect new alarms, or existing alarms after they are next triggered.

- Confirm alarm deletions: Specify whether you should be prompted for confirmation each time you delete an alarm.

- Expired Alarms group box: These options control the storage of expired alarms.

  - Keep alarms after expiry: Select this option to store expired alarms. Deselect it to keep no record of alarms once they have expired.

  - Discard expired alarms after: Set the number of days to store expired alarms after their last activation.

  - Clear expired alarms: This button discards all currently stored expired alarms. This has no effect on alarms which subsequently expire; they will continue to be stored according to the selected options.

### Email

The Email section lets you choose options for sending and addressing email alarms:

- Email client: Specify the email client to be used to send email alarms:

  - KMail: When an email alarm is triggered, the email is added to &kmail;'s `outbox` folder, provided that &kmail; is running at the time. If it is not running, a &kmail; composer window is displayed filled in with the email details, to enable you to send the email manually.

  - Sendmail: When an email alarm is triggered, the email is sent automatically using sendmail. This option will only work if your system is configured to use sendmail, or a sendmail compatible mail transport agent such as postfix or qmail.

- The From email address specifies your email address to be used as the sender's address in email alarms. Select Use address from Control Center to use the email address which is configured in the &kde; Control Center.

- The Bcc email address specifies your email address to be used for sending blind copies of email alarms to yourself when the Copy email to self option is selected. If blind copies are to be sent to your account on the computer which &kalarm; runs on, you could simply enter your user login name here. Select Use address from Control Center to use the email address which is configured in the &kde; Control Center.

- Notify when remote emails are queued: Select this option to display a notification whenever an email alarm queues an email for sending to a remote system. This may be useful if, for example, you have a dial-up connection, so that you can ensure that you do whatever is needed to actually transmit the email.

### View

The View section lets you control some aspects of &kalarm;'s appearance:

- Alarm List group box: These options control what information is initially shown in the alarm list, when &kalarm; starts up. (Once &kalarm; has started, use the View menu to change what is displayed.)

  - Show alarm time: Select this option to show the date and time at which each alarm is next scheduled.

  - Show time until alarm: Select this option to show the length of time remaining before each alarm's next scheduled occurrence. The length of time is shown in days (if applicable), hours and minutes.

- System Tray Tooltip group box: These options control what information is shown in the tooltip which appears when the mouse cursor hovers over &kalarm;'s system tray icon.

  - Show next 24 hours' alarms: When selected, a summary of the first few alarms due in the next 24 hours is displayed.

  - Maximum number of alarms to show: Deselect this option to display all of the next 24 hours' alarms. Select it to set the maximum number of alarms which will be displayed.

  - Show alarm time: Select this option to show the time at which each alarm is scheduled.

  - Show time until alarm: Select this option to show the length of time remaining before each alarm's next scheduled occurrence. The length of time is shown in hours and minutes.

    - Prefix: Specify a symbol or text to show in front of the length of time until the alarm, to distinguish it from the time at which the alarm is scheduled.

- Modal message windows: This option controls whether alarm message windows are modal or not, &ie; whether they grab the keyboard focus when they appear. See the Alarm message window section for details.

- Show expired alarms: Select this option to initially show expired alarms in the alarm list, when &kalarm; starts up. (Once &kalarm; has started, use the View Show Expired Alarms menu option to change what is displayed.)

- System tray update interval: Set the frequency at which the &kalarm; system tray icon is updated to reflect whether alarms are currently being monitored. This involves checking whether the alarm daemon is running.

### Appearance

The Appearance section lets you set the default appearance of alarm messages:

- Select the default font and background color to use for alarm message display.

- Edit the color selection list which is displayed when you click on the background color combo box:

  - New color: Displays a color selection dialog which lets you choose a color to add to the list.

  - Remove color: Removes the color currently displayed in the Background color combo box from the list. The Custom color item cannot be removed from the list, and when it is displayed, this button is disabled.

### Edit

The Edit section lets you choose default values for the options in the alarm edit dialog:

- Set the text color used to show expired alarms in the alarm list.

- Set the default states for the Cancel if late, Confirm acknowledgment and Copy email to self checkboxes.

- Set beep as the default for the Sound option.

- Set the default recurrence type.

- Set the default reminder period units.

## Developer's Guide to &kalarm;

&kalarm; provides an interface to allow other applications to request the following functions:

- schedule a new alarm

- trigger or cancel an already scheduled alarm

- cancel an already scheduled alarm

- trigger an already scheduled alarm

Each of the above functions is implemented both by a &DCOP; call and by the command line. &DCOP; calls should be used in preference if &kalarm; is already running.

### &DCOP; interface

cancelEvent

cancelEvent

cancel an already scheduled alarm.

    void cancelEvent(const QString& calendarFile, const QString& eventID)

##### Parameters

`calendarFile`

- Specifies the &URL; of the calendar file containing the event to be canceled.

`eventID`

- Specifies the unique ID of the event to be canceled, as stored in `calendarFile`.

##### Description

`cancelEvent()` is a &DCOP; call to cancel the specified alarm. &kalarm; deletes the alarm from the calendar file without displaying or executing it.

The `calendarFile` parameter is only used for integrity checking: if the &URL; does not specify &kalarm;'s current default calendar file, the request will be ignored.

The old name for this function, `cancelMessage`, has been retained for compatibility, but all new applications should use `cancelEvent`.

triggerEvent

triggerEvent

trigger an already scheduled alarm.

    void triggerEvent(const QString& calendarFile, const QString& eventID)

##### Parameters

`calendarFile`

- Specifies the &URL; of the calendar file containing the event to be triggered.

`eventID`

- Specifies the unique ID of the event to be triggered, as stored in `calendarFile`.

##### Description

`triggerEvent()` is a &DCOP; call to trigger the immediate display or execution of the specified alarm (regardless of what time it is scheduled for). &kalarm; retrieves the alarm from the calendar file and then displays or executes it.

If the alarm is already due, &kalarm; then deletes all scheduled occurrences of the alarm up to the current time, and if no repetitions of the alarm still remain, the alarm is deleted from the calendar file. If the alarm is not due yet, its scheduled occurrences are left unchanged.

The `calendarFile` parameter is only used for integrity checking: if the &URL; does not specify &kalarm;'s current default calendar file, the request will be ignored.

The old name for this function, `displayMessage`, has been retained for compatibility, but all new applications should use `triggerEvent`.

handleEvent

handleEvent

trigger or cancel an already scheduled alarm.

    void handleEvent(const QString& calendarFile, const QString& eventID)

##### Parameters

`calendarFile`

- Specifies the &URL; of the calendar file containing the event to be displayed/executed or canceled.

`eventID`

- Specifies the unique ID of the event to be displayed/executed or canceled, as stored in `calendarFile`.

##### Description

`handleEvent()` is a &DCOP; call to display/execute or cancel the specified alarm. &kalarm; retrieves the alarm from the calendar file and then determines what action to take depending on when the alarm is due.

- If the alarm is not yet due, nothing happens.

- If the alarm is due, it acts as follows. If the late-cancel flag is set and the alarm is late, &ie; the scheduled trigger time was longer than one minute ago, &kalarm; does not display or execute the alarm; otherwise, &kalarm; displays or executes the alarm. If no repetitions of the alarm are still scheduled, &kalarm; then deletes the alarm from the calendar file.

The `calendarFile` parameter is only used for integrity checking: if the &URL; does not specify &kalarm;'s current default calendar file, the request will be ignored.

scheduleMessage

scheduleMessage

schedule a new alarm message.

    bool scheduleMessage(const QString& message, const QDateTime& dateTime, const QColor& bg, const QColor& fg, int flags, const QString& audioURL, int reminder, const QString& recurrence)

    bool scheduleMessage(const QString& message, const QDateTime& dateTime, const QColor& bg, const QColor& fg, const QFont& font, int flags, const QString& audioURL, int reminder, const QString& recurrence)

    bool scheduleMessage(const QString& message, const QDateTime& dateTime, const QColor& bg, const QColor& fg, int flags, const QString& audioURL, int reminder, int simpleRepeatType, int interval, int repeatCount)

    bool scheduleMessage(const QString& message, const QDateTime& dateTime, const QColor& bg, const QColor& fg, int flags, const QString& audioURL, int reminder, int simpleRepeatType, int interval, const QDateTime& endTime)

##### Parameters

`message`

- Specifies the text of the message to be scheduled.

`dateTime`

- Specifies the scheduled date and time at which the message should be displayed.

`bg`

- Specifies the background color for displaying the message.

`fg`

- Specifies the foreground color for displaying the message.

`font`

- Specifies the font for displaying the message.

`flags`

- Specifies the logical OR of the desired alarm message flags. The flag bits are those defined in class KAlarmEvent in `alarmevent.h`

`audioURL`

- Specifies the name or &URL; of an audio file which is to be played when the message is displayed.

`reminder`

- Specifies the number of minutes in advance of the main alarm and of each of its recurrences (if any) at which a reminder alarm should be displayed. Specify 0 if no reminder is required.

`recurrence`

- Specifies a regular recurrence for the alarm, using iCalendar syntax as defined in RFC2445. For example, FREQ=MONTHLY;COUNT=4;INTERVAL=3;BYDAY=-1MO would specify 4 repetitions at 3-monthly intervals on the last Monday of the month. For a non-recurring alarm, specify an empty string.

`simpleRepeatType`

- Specifies the recurrence type for the alarm. The permissible values are MINUTELY, DAILY, WEEKLY, MONTHLY_DAY, ANNUAL_DATE. These are defined in class KAlarmEvent in `alarmevent.h`.

`interval`

- Specifies the number of periods (minutes/days/weeks/months/years) between repetitions of the alarm message.

`repeatCount`

- Specifies the number of times that the alarm message should be displayed. Specify -1 to repeat the alarm indefinitely.

##### Description

`scheduleMessage()` is a &DCOP; call to schedule the specified alarm message for display at the specified date and time. It has several forms. The two most general forms allow an arbitrary recurrence to be specified - use these also for non-repeating alarms. Either specify a font parameter, or none to use &kalarm;'s default font. The other forms provide convenient access to a restricted set of alarm recurrence types, one specifying a repetition count and the other an end time; both of these use the default font.

If the scheduled time (including any repetitions) has already passed, &kalarm; immediately displays the message or, if the LATE_CANCEL flag bit is set, ignores the request. If the scheduled time (or a repetition) is in the future, &kalarm; adds the alarm message to the calendar file for later display.

Use a code sequence similar to the following to set up the parameter data for the &DCOP; call to `scheduleMessage()` for a non-recurring alarm, or for a regularly recurring alarm using iCalendar syntax to specify its recurrence:

    QString message, audioFile, recurrence;
    QDateTime dateTime;
    QColor bgColor, fgColor;
    Q_UINT32 flags;
    Q_INT32 reminder;
    . . .
    QByteArray data;
    QDataStream arg(data, IO_WriteOnly);
    arg << message;
    arg.writeRawBytes((char*)&dateTime, sizeof(QDateTime));
    arg.writeRawBytes((char*)&bgColor, sizeof(QColor));
    arg.writeRawBytes((char*)&fgColor, sizeof(QColor));
    arg << flags << audioFile << reminder << recurrence;

Use a code sequence similar to the following to set up the parameter data for the &DCOP; call to `scheduleMessage()` for a regularly recurring alarm without using iCalendar syntax:

    QString message, audioFile;
    QDateTime dateTime;
    QColor bgColor, fgColor;
    Q_UINT32 flags;
    Q_INT32 reminder, repeatType, repeatCount, repeatInterval;
    . . .
    QByteArray data;
    QDataStream arg(data, IO_WriteOnly);
    arg << message;
    arg.writeRawBytes((char*)&dateTime, sizeof(QDateTime));
    arg.writeRawBytes((char*)&bgColor, sizeof(QColor));
    arg.writeRawBytes((char*)&fgColor, sizeof(QColor));
    arg << flags << audioFile << reminder << repeatType << repeatCount << repeatInterval;

scheduleFile

scheduleFile

schedule a new alarm which displays the contents of a text or image file.

    bool scheduleFile(const QString& URL, const QDateTime& dateTime, const QColor& bg, int flags, const QString& audioURL, int reminder, const QString& recurrence)

    bool scheduleFile(const QString& URL, const QDateTime& dateTime, const QColor& bg, int flags, const QString& audioURL, int reminder, int simpleRepeatType, int interval, int repeatCount)

    bool scheduleFile(const QString& URL, const QDateTime& dateTime, const QColor& bg, int flags, const QString& audioURL, int reminder, int simpleRepeatType, int interval, const QDateTime& endTime)

##### Parameters

`URL`

- Specifies the name or &URL; of a text or image file whose contents are to be displayed in the message to be scheduled.

`dateTime`

- Specifies the scheduled date and time at which the file should be displayed.

`bg`

- Specifies the background color for displaying the file.

`flags`

- Specifies the logical OR of the desired alarm flags. The flag bits are those defined in class KAlarmEvent in `alarmevent.h`

`audioURL`

- Specifies the name or &URL; of an audio file which is to be played when the message is displayed.

`reminder`

- Specifies the number of minutes in advance of the main alarm and of each of its recurrences (if any) at which a reminder alarm should be displayed. Specify 0 if no reminder is required.

`recurrence`

- Specifies a regular recurrence for the alarm, using iCalendar syntax as defined in RFC2445. For example, FREQ=MONTHLY;COUNT=4;INTERVAL=3;BYDAY=-1MO would specify 4 repetitions at 3-monthly intervals on the last Monday of the month. For a non-recurring alarm, specify an empty string.

`simpleRepeatType`

- Specifies the recurrence type for the alarm. The permissible values are MINUTELY, DAILY, WEEKLY, MONTHLY_DAY, ANNUAL_DATE. These are defined in class KAlarmEvent in `alarmevent.h`.

`interval`

- Specifies the number of periods (minutes/days/weeks/months/years) between repetitions of the alarm.

`repeatCount`

- Specifies the number of times that the file should be displayed. Specify -1 to repeat the alarm indefinitely.

##### Description

`scheduleFile()` is a &DCOP; call to schedule the specified text or image file for display at the specified date and time. Apart from specifying a file name or &URL; and omitting the foreground color, its usage is identical to `scheduleMessage` - see the description of that function for further details.

scheduleCommand

scheduleCommand

schedule a new alarm which executes a shell command.

    bool scheduleCommand(const QString& commandLine, const QDateTime& dateTime, int flags, const QString& recurrence)

    bool scheduleCommand(const QString& commandLine, const QDateTime& dateTime, int flags, int simpleRepeatType, int interval, int repeatCount)

    bool scheduleCommand(const QString& commandLine, const QDateTime& dateTime, int flags, int simpleRepeatType, int interval, const QDateTime& endTime)

##### Parameters

`commandLine`

- Specifies the shell command line whose execution is to be scheduled.

`dateTime`

- Specifies the scheduled date and time at which the command should be executed.

`flags`

- Specifies the logical OR of the desired alarm flags. The flag bits are those defined in class KAlarmEvent in `alarmevent.h` except that the BEEP flag bit is ignored.

`recurrence`

- Specifies a regular recurrence for the alarm, using iCalendar syntax as defined in RFC2445. For example, FREQ=MONTHLY;COUNT=4;INTERVAL=3;BYDAY=-1MO would specify 4 repetitions at 3-monthly intervals on the last Monday of the month. For a non-recurring alarm, specify an empty string.

`simpleRepeatType`

- Specifies the recurrence type for the alarm. The permissible values are MINUTELY, DAILY, WEEKLY, MONTHLY_DAY, ANNUAL_DATE. These are defined in class KAlarmEvent in `alarmevent.h`.

`interval`

- Specifies the number of periods (minutes/days/weeks/months/years) between repetitions of the alarm.

`repeatCount`

- Specifies the number of times that the alarm should be repeated. Specify -1 to repeat the alarm indefinitely.

##### Description

`scheduleCommand()` is a &DCOP; call to schedule the specified shell command line for execution at the specified date and time. Apart from specifying a command line and omitting the message color and audio file parameters, its usage is identical to `scheduleMessage` - see the description of that function for further details.

scheduleEmail

scheduleEmail

schedule a new alarm which sends an email.

    bool scheduleEmail(const QString& addresses, const QString& subject, const QString& message, const QString& attachments, const QDateTime& dateTime, int flags, const QString& recurrence)

    bool scheduleEmail(const QString& addresses, const QString& subject, const QString& message, const QString& attachments, const QDateTime& dateTime, int flags, int simpleRepeatType, int interval, int repeatCount)

    bool scheduleEmail(const QString& addresses, const QString& subject, const QString& message, const QString& attachments, const QDateTime& dateTime, int flags, int simpleRepeatType, int interval, const QDateTime& endTime)

##### Parameters

`addresses`

- Specifies the recipient's email address. Specify multiple addresses by separating them with commas.

`subject`

- Specifies the subject line of the email.

`message`

- Specifies the email message body.

`attachments`

- Specifies the &URL;s of files to attach to the email. Separate multiple &URL;s by commas.

`dateTime`

- Specifies the scheduled date and time at which the email should be sent.

`flags`

- Specifies the logical OR of the desired alarm flags. The flag bits are those defined in class KAlarmEvent in `alarmevent.h`

`recurrence`

- Specifies a regular recurrence for the alarm, using iCalendar syntax as defined in RFC2445. For example, FREQ=MONTHLY;COUNT=4;INTERVAL=3;BYDAY=-1MO would specify 4 repetitions at 3-monthly intervals on the last Monday of the month. For a non-recurring alarm, specify an empty string.

`simpleRepeatType`

- Specifies the recurrence type for the alarm. The permissible values are MINUTELY, DAILY, WEEKLY, MONTHLY_DAY, ANNUAL_DATE. These are defined in class KAlarmEvent in `alarmevent.h`.

`interval`

- Specifies the number of periods (minutes/days/weeks/months/years) between repetitions of the alarm.

`repeatCount`

- Specifies the number of times that the email should be sent. Specify -1 to repeat the alarm indefinitely.

##### Description

`scheduleEmail()` is a &DCOP; call to schedule the specified email for sending at the specified date and time. Apart from specifying the email header and contents and omitting the message color and audio file parameters, its usage is identical to `scheduleMessage` - see the description of that function for further details.

### Command line interface

Command line options are provided to enable other programs (such as the alarm daemon) to start up &kalarm; if it is not already running, in order to trigger or cancel scheduled alarms, or schedule new alarms. The reason for using command line options for this purpose is that if &kalarm; were started without any command line parameters and then sent &DCOP; requests, it would start in its default graphical mode, which is clearly undesirable for an inter-program request.

Programs should first check whether &kalarm; is already running; if it is, they should instead use &DCOP; calls to request these operations.

The command line options for scheduling a new alarm are as described in the chapter Using &kalarm;. The options for triggering and canceling scheduled alarms are as follows:

Normal users may also if they wish use these command line options (assuming that they can supply the necessary parameter information).

Option | Description
`--calendarURL `url`` | Use the calendar file with the specified &URL;. This option is only used for integrity checking: if the &URL; doesn't specify &kalarm;'s current default calendar file, the request will be ignored.
`--cancelEvent `eventID`` | Cancel the event with the specified event ID.
`--triggerEvent `eventID`` | Trigger the event with the specified event ID. The action taken is the same as for the triggerEvent() &DCOP; call.
`--handleEvent `eventID`` | Trigger or cancel the event with the specified event ID. &kalarm; determines which action to take in the same way as for the handleEvent() &DCOP; call.

`--cancelEvent`, `--triggerEvent` and `--handleEvent` are mutually exclusive. `--calendarURL` is optional, but can only be used with one of the other three options.

Examples are:

    % kalarm --triggerEvent &kalarm;-387486299.702 --calendarURL file:/home/zaphod/hydra.ics
    % kalarm --cancelEvent &kalarm;-388886299.793

## Questions and Answers

&reporting.bugs; &updating.documentation;

What configuration files does &kalarm; use?

The file `$KDEHOME/share/config/kalarmrc` holds your &kalarm; preferences.

The calendar file which stores your pending alarms is `$KDEHOME/share/apps/kalarm/calendar.ics`, unless a different calendar file is specified in the preferences file by a `Calendar` entry in the `General` section.

If you change this calendar file in the preferences file, you should also edit the alarm daemon's `clients` configuration file to remove the old calendar file reference. This should be done while the alarm daemon is not running to avoid it overwriting your change.

The calendar file which stores your expired alarms is `$KDEHOME/share/apps/kalarm/expired.ics`, unless a different calendar file is specified in the preferences file.

Details of alarms currently being displayed are stored in the calendar file `$KDEHOME/share/apps/kalarm/displaying.ics`.

What configuration files does the alarm daemon use?

The file `$KDEHOME/share/config/kalarmdrc` holds your alarm daemon preferences.

The file `$KDEHOME/share/apps/kalarmd/clients` holds details of client applications which have previously been registered with the alarm daemon, and their calendar files.

What are the application names of &kalarm; and the alarm daemon?

&kalarm;'s application name is kalarm, and the alarm daemon's application name is kalarmd. In addition, in &kde; versions previous to 3.1, there is a small application kalarmautostart whose function is to start &kalarm;'s system tray icon at login.

## Credits and License

&kalarm;

Program copyright 2001, 2002, 2003 David Jarvie software@astrojar.org.uk

Alarm daemon authors:

- Preston Brown pbrown@kde.org

- David Jarvie software@astrojar.org.uk

- Cornelius Schumacher schumacher@kde.org

Documentation copyright 2001, 2002, 2003 David Jarvie software@astrojar.org.uk

Thanks go to the author of the &kde;1 KAlarm application, Stefan Nikolaus stefan.nikolaus@stuco.uni-oldenburg.de, who kindly agreed to allow the name &kalarm; to be used by this &kde;2/&kde;3 application.

&underFDL; &underGPL;

## Installation

### How to obtain &kalarm;

&install.intro.documentation;

&kalarm; is available for &kde;2 and as a standalone package for &kde;3 from http://www.astrojar.org.uk/linux/kalarm.html

### Requirements

&kalarm; requires the standard &kde; libraries to be installed (the `kdelibs` package). To compile from source, you also need the &Qt; and `kdelibs` development packages. The X11 development package, if present, is used to improve &kalarm;'s ability to function under &kde; without a system tray.

&kalarm; uses about 12 Mb and the alarm daemon uses about 2.5 Mb of memory to run, but this may vary depending on your platform and configuration.

You can find a list of changes in the `ChangeLog` file, or at http://www.astrojar.org.uk/linux/kalarm.html.

### Compilation and installation

If you cannot obtain a suitable precompiled binary package, you need to compile &kalarm; yourself from source files. Get the source package file `kdepim-x.x.tar.bz2` or `kalarm-x.x.tar.bz2` (or similar), depending on whether you want to install &package; or just &kalarm;. Unpack it in a new folder using a command similar to ``tar` `xvfj `package.tar.bz2```, and change to the folder which has been created.

&install.compile.documentation;

If you have more than one version of &kde; installed (e.g. &kde;2 and &kde;3), this may possibly install &kalarm; into the wrong &kde; folder. If necessary, you can give the &kde; folder as a parameter to ``./configure`` . For example, if your &kde; is installed in `/opt/kde2`:

``./configure` --prefix=`/opt/kde2``

### Configuration

No special configuration is required to set up &kalarm; to run on the &kde; desktop. Once you have run &kalarm; for the first time, the alarm daemon will start every time you log in, in order to monitor scheduled alarms.

To run &kalarm; on a non-&kde; desktop, the main requirement is to ensure that the alarm daemon is run automatically whenever you log in. More detailed instructions are contained in the `INSTALL` file which is distributed with &kalarm;.

&documentation.index;