Copyright © 2001, 2002 David Jarvie
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
KAlarm is an alarm/reminder message scheduler for KDE.
Table of Contents
KAlarm is an alarm/reminder message scheduler. It lets you set up personal alarm/reminder messages which pop up on the screen at the time you specify.
In its default graphical mode, KAlarm displays a list of pending alarms, showing their times and message texts. You can create new alarms, or alternatively you can select existing alarms in order to modify or delete them.
When setting up or modifying an alarm, you may either type in the alarm message text or specify a text file to display. You can also choose the colour of the alarm message, whether it should repeat, whether to sound an audible beep, and whether the alarm should be cancelled if it can't be displayed at its scheduled time.
Alarms may also be scheduled on 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 should you happen to be switching desktops just at that moment. The message window shows the time for which the alarm was scheduled, which could be useful to know if it was displayed late or if you were away from the computer when it popped up. It usually has a defer option to ask for the alarm to be displayed again later. An example of an alarm message:
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.
When it is run with no command line parameters, KAlarm starts in graphical mode. It displays the current list of outstanding alarms, showing their times, repetition counts, colours, and message texts or names of files to display.
For a repeated alarm, the list shows its next scheduled time for display and the number of times which it is due to repeat after that.
The alarms may be ordered by date/time, repeat count, colour or message text by clicking on the title bar for the appropriate column. To reverse the sort order, click the column title bar again.
When KAlarm starts in graphical mode, it checks whether the alarm daemon is running. If it is not already running, KAlarm starts it.
To add a new alarm message, select Actions->New. This displays the alarm message edit window:
In the Message group box, select either Text in order to enter the message text (which may include newlines) in the edit box, or File to enter the name or URL of a text file whose contents are to be displayed in the alarm message. When File is selected, Browse... may be used to display a file selection dialog.
In the Time group box, select At date/time: to enter the date and time when the message is to be displayed, or select Time from now: to enter how long after now (in hours and minutes) the message should be displayed.
If you want the alarm to be repeated, enter in the Repetition group box the number of repetitions (after the initial display) and the interval (in hours and minutes, in the range 1 minute to 99 hours) between repetitions. Check Repeat at login if you want the alarm to be displayed whenever you log in, in addition to its other scheduled times. (Note that an alarm repeated at login will also be displayed any time you enable alarms, or restart or reset the alarm daemon.)
The Cancel if late checkbox determines what happens if the alarm can't be displayed at its scheduled time. Check this box to cancel the alarm if it can't be displayed within 1 minute after the right time. Leave the box unchecked to display the alarm at the first opportunity starting at the scheduled time.
An alarm can only be displayed while you are logged in, and while both X and the alarm daemon are running.
Check the Beep checkbox if you want an audible alarm to sound when the alarm message is displayed.
Select the background colour for the alarm message window.
Press the OK button when all details are correct, to add the alarm to the scheduled list.
To modify an existing alarm message, do one of the following:
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 message edit window as described above.
To delete an existing alarm message, 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.
When an alarm message window is displayed, do one of the following:
Acknowledge it by clicking the Close button.
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 Defer... button is not available for alarms which are displayed at login due to the Repeat at login option having been selected.
The button with the KAlarm icon provides a convenient way to activate KAlarm. Clicking it has no effect on the alarm message window.
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 default options 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.
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.
To disable alarm monitoring when it is currently enabled, 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.
The alarm daemon stops monitoring KAlarm's alarms. KAlarm will not display any further alarms until alarms are re-enabled.
The alarm daemon is not stopped by this operation: it simply stops monitoring KAlarm's alarms. So there will be no effect on the functioning of any other applications which use the alarm daemon.
To reset the alarm daemon, select Actions->Reset Daemon.
See the Alarm daemon section for a discussion about resetting the alarm daemon.
To set default options for KAlarm, select Settings->Configure KAlarm.... This displays the configuration dialog. Here, you can:
Specify KAlarm's run mode. You can choose either to run it continuously in the KDE system tray, or to run it only on demand. This selection does not affect the display of alarms when they become due, since it is the alarm daemon and not KAlarm which monitors the alarm list. Running KAlarm in the system tray makes the application more accessible and displays an alarm-enabled indication, but running an application continuously does consume some system resources. So if system performance is of concern, the ‘on-demand’ option may be preferable.
When running in ‘on-demand’ mode, the system tray icon can still be displayed. The main difference in operation between the two modes is the effect of closing the system tray icon: in ‘on-demand’ mode, closing it has no effect on any KAlarm windows, while in ‘continuous’ mode, closing it also closes all KAlarm main windows.
If you specified that KAlarm should run in ‘continuous’ mode, you can disable all alarms due for display while KAlarm is not running.
Specify that the KAlarm system tray icon should be displayed at KDE session login.
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.
Set the default font and background colour to use for alarm message display.
To set options for the alarm daemon, select Settings->Configure Alarm Daemon.... This displays the alarm daemon configuration dialog.
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.
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 (unless you have selected Disable alarms while not running in the Preferences dialog).
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 red cross through the icon indicates that alarms are not being monitored.
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:
Enables monitoring of alarms.
See Enabling/disabling alarm monitoring for details.
Disables monitoring of alarms.
See Enabling/disabling alarm monitoring for details.
Displays the KAlarm preferences dialog.
The preferences dialog is described in Configuring default options. It includes options relating to the KAlarm system tray icon.
Displays the alarm daemon's configuration dialog.
Restores or minimises the main KAlarm window.
This option is only available if the run mode is 'continuous'. (See Configuring default options for a description of run modes.)
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 (unless you have selected Disable alarms while not running in the Preferences dialog).
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 message
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.
The following options are used to schedule an alarm message for display by KAlarm:
Option | Description |
---|---|
-b, --beep | Make an audible beep when the message is displayed. |
-c, --color, --colour colour | Set the message background colour to the specified Qt™ colour name or hex code 0xRRGGBB. |
-f, --file URL | Specify the name or URL of a text file whose contents are to form the alarm message. message must not be present if this option is specified. |
-i, --interval minutes | Set the interval between repetitions of the alarm to the specified number of minutes. Mandatory if --repeat is specified. |
-l, --late-cancel | Cancel the message if it cannot be displayed at the correct time. |
-L, --login | Display the message every time you log in. |
-r, --repeat minutes | The number of times the alarm should be repeated, after its initial display. Mandatory if --interval is specified. |
-t, --time time | Display message at 'time' [[[yyyy-]mm-]dd-]hh:mm (default is immediately). |
message | Message text to display. |
Either a message text or --file must be specified; except as noted, 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"
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
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 licence information. |
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 it, or to cancel it if it is late and late display was not selected for that alarm message.
Under KDE3, the alarm daemon may also be used by other applications, including KOrganizer.
The alarm daemon runs in the background, with no user interface. Its configuration dialog may be accessed either via the KDE control centre, or via the KAlarm menu option Settings->Configure Alarm Daemon....
The alarm daemon is normally started at KDE session login (unless you use its configuration 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 any alarms.
To start the alarm daemon, you can either run KAlarm in its default graphical mode (i.e. without any command line parameters), enable alarms using KAlarm's system tray icon menu, reset the daemon as described below, or you can run the alarm daemon directly from the command line:
% kalarmd
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-initialise 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 output a message, that message will never be output 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->Reset Daemon or type the following command:
% kalarm --reset
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, type the following command:
% kalarm --stop
KAlarm provides an interface to allow other applications to request the following functions:
schedule a new alarm message
display or cancel an already scheduled alarm message
cancel an already scheduled alarm message
display an already scheduled alarm message
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.
Table of Contents
cancelMessage — cancel an already scheduled alarm message.
void cancelMessage(const QString& calendarFile, const QString& eventID)
Specifies the URL of the calendar file containing the event to be cancelled.
Specifies the unique ID of the event to be cancelled, as stored in calendarFile.
cancelMessage() is a DCOP call to cancel the specified alarm message. KAlarm deletes the alarm message from the calendar file without displaying 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.
displayMessage — display an already scheduled alarm message.
void displayMessage(const QString& calendarFile, const QString& eventID)
Specifies the URL of the calendar file containing the event to be displayed.
Specifies the unique ID of the event to be displayed, as stored in calendarFile.
displayMessage() is a DCOP call to display the specified alarm message. KAlarm retrieves the alarm message from the calendar file and then displays it.
If no repetitions of the alarm are still scheduled, KAlarm then deletes the alarm message 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.
handleEvent — display or cancel an already scheduled alarm message.
void handleEvent(const QString& calendarFile, const QString& eventID)
Specifies the URL of the calendar file containing the event to be displayed or cancelled.
Specifies the unique ID of the event to be displayed or cancelled, as stored in calendarFile.
handleEvent() is a DCOP call to display or cancel the specified alarm message. KAlarm retrieves the alarm message from the calendar file and then determines what action to take. If the late-cancel flag is set and the alarm is late, i.e. the scheduled time of display was more than a minute ago, KAlarm does not display the message; otherwise, KAlarm displays the alarm message. If no repetitions of the alarm are still scheduled, KAlarm then deletes the alarm message 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 — schedule a new alarm message.
bool scheduleMessage(const QString& message, const QDateTime* dateTime, const QColor& bg, int flags)
bool scheduleMessage(const QString& message, const QDateTime* dateTime, const QColor& bg, int flags, int repeat_count, int interval)
Specifies the text of the message to be scheduled.
Specifies the scheduled date and time at which the message should be displayed.
Specifies the background colour for displaying the message.
Specifies the logical OR of the desired alarm message flags. The flag bits are those defined in msgevent.h
Specifies the number of times that the alarm message should be repeated, after its initial display.
Specifies the interval in minutes between repetitions of the alarm message.
scheduleMessage() is a DCOP call to schedule the specified alarm message for display at the specified date and time. It has two forms: one for a non-repeating alarm, and another for a repeating alarm.
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 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-repeating alarm:
QString message; QDateTime dateTime; QColor bgColour; Q_UINT32 flags; . . . QByteArray data; QDataStream arg(data, IO_WriteOnly); arg << message; arg.writeRawBytes((char*)&dateTime, sizeof(QDateTime)); arg.writeRawBytes((char*)&bgColour, sizeof(QColor)); arg << flags;
Use a code sequence similar to the following to set up the parameter data for the DCOP call to scheduleMessage() for a repeating alarm:
QString message; QDateTime dateTime; QColor bgColour; Q_UINT32 flags; Q_INT32 repeatCount, repeatInterval; . . . QByteArray data; QDataStream arg(data, IO_WriteOnly); arg << message; arg.writeRawBytes((char*)&dateTime, sizeof(QDateTime)); arg.writeRawBytes((char*)&bgColour, sizeof(QColor)); arg << flags << repeatCount << repeatInterval;
scheduleFile — schedule a new alarm message which displays the contents of a text file.
bool scheduleFile(const QString& URL, const QDateTime* dateTime, const QColor& bg, int flags)
bool scheduleFile(const QString& URL, const QDateTime* dateTime, const QColor& bg, int flags, int repeat_count, int interval)
Specifies the name or URL of a text file whose contents are to be displayed in the message to be scheduled.
Specifies the scheduled date and time at which the message should be displayed.
Specifies the background colour for displaying the message.
Specifies the logical OR of the desired alarm message flags. The flag bits are those defined in msgevent.h
Specifies the number of times that the alarm message should be repeated, after its initial display.
Specifies the interval in minutes between repetitions of the alarm message.
scheduleFile() is a DCOP call to schedule the specified text file for display at the specified date and time. Apart from specifying a file name or URL, its usage is identical to the scheduleMessage - see the description of that function for further details.
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 display or cancel scheduled messages, or schedule new messages. 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 message are as described in the chapter Using KAlarm. The options for displaying and cancelling scheduled messages 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. |
--displayEvent eventID | Display the event with the specified event ID. |
--handleEvent eventID | Display 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, --displayEvent and --handleEvent are mutually exclusive. --calendarURL is optional, but can only be used with one of the other three options.
Examples are:
% kalarm --displayEvent KAlarm-387486299.702 --calendarURL file:/home/zaphod/hydra.ics % kalarm --cancelEvent KAlarm-388886299.793
KAlarm
Program copyright 2001, 2002 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 David Jarvie <software@astrojar.org.uk>
Thanks go to the author of the KDE1 KAlarm application, Stefan Nikolaus <stefan.nikolaus@stuco.uni-oldenburg.de>, who kindly agreed to allow the name KAlarm to be used by this KDE2/KDE3 application.
This documentation is licensed under the terms of the GNU Free Documentation License.
This program is licensed under the terms of the GNU General Public License.
KAlarm is part of the KDE project http://www.kde.org/.
KAlarm can be found in the kdepim package on ftp://ftp.kde.org/pub/kde/, the main FTP site of the KDE project.
KAlarm is available for KDE2 and as a standalone package for KDE3 from http://www.astrojar.org.uk/linux
KAlarm requires the libraries libkcal, libical and libicalss from the KDE package kdepim.
If you install a version of kdepim which includes KAlarm, KAlarm's requirements are automatically met.
For the standalone version of KAlarm, you need to run KDE 2.0 or later. KAlarm comes in different standalone versions which include the appropriate sets of kdepim libraries depending on which version, if any, of kdepim you have installed. The standalone versions of KAlarm 0.5 contain copies of the libraries from kdepim 2.2.2 (including a slightly updated libkcal).
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.
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.gz or kalarm-x.x.tar.gz (or similar), depending on whether you want to install kdepim or just KAlarm. Unpack it in a new directory using a command similar to tar xvfz package.tar.gz, and change to the directory which has been created.
In order to compile and install KAlarm on your system, type the following in the base directory of the KAlarm distribution:
% ./configure % make % make install
Since KAlarm uses autoconf and automake you should have no trouble compiling it. Should you run into problems please report them to the KDE mailing lists.
If you have more than one version of KDE installed (e.g. KDE1 and KDE2), this may possibly install KAlarm into the wrong KDE directory. If necessary, you can give the KDE directory as a parameter to ./configure . For example, if your KDE is installed in /opt/kde2:
./configure --prefix=/opt/kde2
If you install KAlarm as a standalone package along with kdepim 2.2.x, you must install kdepim first and KAlarm last to ensure that the correct library versions are installed.
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.