KAlarm Installation
===================

Requirements
============

KAlarm for KDE 4 requires kdelibs 4.2 or higher to be installed. In order to
build it from source, the following development packages also need to be
installed:

   - cmake
   - Qt development package
   - kdelibs and kdepimlibs development packages

The following optional packages enhance KAlarm if they are installed:

   - kttsd (from kdeaccessibility package): if installed and configured
           (together with compatible speech synthesiser packages), it allows
	   KAlarm to speak alarm messages when alarms are displayed.


Quick Guide
===========

KAlarm is built and installed as follows. The use of the obj/ directory for
building is only a suggestion; you can use any other directory you choose.


   cd kalarm-2.5.1
   mkdir obj
   cd obj
   cmake ..
   make
   [ Log in as root ]
   cd /path/kalarm-2.5.1/obj
   make install

Options for cmake which may be of particular use are:

   -DCMAKE_INSTALL_PREFIX=[KDE-dir]

          If you have more than one version of KDE installed, or sometimes if
          KDE is not in /usr, you may need this to specify where to
          install the application.

          Example - to install into /opt/kde4:
             cmake -DCMAKE_INSTALL_PREFIX=/opt/kde4

          WARNING: If you install into a different directory than the KDE
          installation, you must prefix your installation directory path to the
          run-time environment variable KDEDIRS, and restart KDE. Otherwise
          KAlarm will not run correctly. If you don't understand what this
          means, you should install into the standard KDE directory.

   -DCMAKE_BUILD_TYPE=Debugfull

          To build a debug version of KAlarm.

Setting up on non-KDE desktops
==============================

Although KAlarm is a KDE application and requires the KDE libraries to be
installed on your system, you can still use it while running other desktops or
window managers.

In order to have alarms monitored and displayed automatically from one login
session to the next, KAlarm must be run automatically when you graphically log
in or otherwise start X. If you are running the KDE desktop, the KAlarm
installation process sets this up for you.

- GNOME 2
  =======
  Run Desktop Preferences -> Advanced -> Sessions. In the Sessions dialog,
  select the Startup Programs tab and click Add. Enter
  'kalarmautostart kalarm --tray' as the Startup Command. This will run KAlarm
  in the system tray every time you start up.

- Other Window Managers
  =====================
  If you want to use KAlarm with a non-KDE window manager:

  1) If your desktop environment/window manager performs session restoration,
     ensure that the kalarm is included in the session restoration, and that
     after login or restarting X kalarm is running with a '-session' command
     line option, e.g.

         kalarm -session 117f000002000100176495700000008340018

     You can use the 'ps' command to check this.

     Using session restoration will ensure that alarm message windows which
     were displayed at the time of logout will be redisplayed when you log in
     again.

  2) To ensure that KAlarm is always started when you log in, even if it was
     not running at logout (so that it wouldn't be included in session
     restoration), you should configure one of the following commands to be run
     whenever you graphically log in or start X:

     a) If you cannot use session restoration to start KAlarm, run:

            kalarm --tray

     b) If you use session restoration, you MUST NOT use the above command, but
        instead run:

            kalarmautostart kalarm --tray

        The reason for using this command instead is that if 'kalarm --tray' is
        executed while session restoration is already underway, KAlarm will
        fail to start. This is an unavoidable consequence of how a KDE
        application interacts with session restoration.

     If your desktop environment or window manager has a facility to configure
     programs to be run at login, you can use that facility. Otherwise, you need
     to add the command to an appropriate script which is run after X is started.

  If you can send me details on how to set up KAlarm for any particular window
  manager, I will include these in the next version of KAlarm.


Accessing language translations
===============================

KAlarm will automatically use whatever language you have configured your KDE
desktop to use (provided of course that the KAlarm package includes that
language translation!). To set up KDE to use a particular language, first
install the relevant 'i18n' language package which is part of the KDE release,
and then use KDE System Settings to select your country and language.
