  How to install the KDE-1.1 RPM packages on Red Hat Linux
  systems:
  The KDE Packaging Team, kde-packager@kde.org
  v1.15, 26 January 1999

  Installation notes for the "rh42", "rh50egcs", "rh5x", and
  "rh5xegcs11" series of RPM packages for KDE-1.1 on Red Hat Linux 4.2,
  5.0. 5.1, and 5.2.
  ______________________________________________________________________

  Table of Contents























































  1. Introduction.

     1.1 Supported Red Hat Linux releases.
     1.2 Free Software License issues; no Red Hat support for KDE.
     1.3 RPM packages in this KDE release.
     1.4 The four RPM families: "rh42", "rh50egcs", "rh5x", and "rh5xegcs11."

  2. Things to do before beginning the installation.

     2.1 Check if your X Window system works; is it customized?
     2.2 Login as the superuser
     2.3 Installation to /opt/kde and disk space requirements.
     2.4 Which release of Red Hat Linux do you have?

  3. Installing the RPM packages.

     3.1 Installing the QT RPM packages.
     3.2 If you already have an older version of KDE installed:
     3.3 Rebuilding the RPM source packages
     3.4 Installing the binary KDE RPM packages.

  4. Post Installation instructions

     4.1 Overview
     4.2 Using the "usekde" script to make KDE a user's desktop..
     4.3 Customising the default Desktop
     4.4 Starting KDE by opening an X Window session.

  5. Using kdm,  the KDE X Display Manager (optional).

     5.1 Replacing xdm with kdm: the "kdm_on" script.
     5.2 The kdm "shutdown" screen.
     5.3 Configuring the login screen background (optional).
     5.4 Configuring kde's PAM service (optional)

  6. What users should do when they first run the  KDE Desktop.

     6.1 Using the KDE Control Center to customize the desktop.
     6.2 Automatic configuration of non-KDE applications for KDE.
     6.3 Using the KDE Help system.
     6.4 Desktop icons for floppy and cdrom drives, and printers.

  7. Adding KDE applications not included with  KDE-1.1.

     7.1 Compiler issues.

  8. Troubleshooting problems with  KDE installation :

     8.1 "I could not install the packages:
     8.2 "I typed "startkde" and KDE did not start!"
     8.3 "I typed "startx" and the  X Window system  would not start"
     8.4 "KDE tries to start, but doesn't succeed".
     8.5 "xdm or kdm is running.  I login, but some other window manager starts."
     8.6 "I run startx  but some other window manager starts."
     8.7 "kdm won't let me login".
     8.8 "I can't shut down xdm or kdm"
     8.9 The "usekde" or "kdm_on" commands were not found
     8.10 rpm version issues.
     8.11 "host type not found" error messages when compiling KDE.

  9. Where to send comments, corrections, etc.



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn..


  11..11..  SSuuppppoorrtteedd RReedd HHaatt LLiinnuuxx rreelleeaasseess..

  These notes are intended to provide detailed information about
  installation of the KK DDeesskkttoopp EEnnvviirroonnmmeenntt (KDE) on RReedd HHaatt LLiinnuuxx
  releases 44..22, 55..00, 55..11 or 55..22.  The packages are "RPM" packages made
  to be installed with the Red Hat Package Manager, rpm.


  11..22..  FFrreeee SSooffttwwaarree LLiicceennssee iissssuueess;; nnoo RReedd HHaatt ssuuppppoorrtt ffoorr KKDDEE..

  KDE v1.1 is Free Software, written by many authors, that has been
  released mainly under the GPL (GNU General Public License, v2.0 or
  later), though some parts are released under other Free Software
  licenses, such as the Artistic License, and the main KDE Libraries are
  released under the LGPL (GNU Library General Public License). KDE-1.1
  is designed to be dynamically linked to the QT toolkit library v1.41
  from Troll Tech, freely available for use with free (open source)
  software under the QT Free Edition License.

  KDE's use of the QT Free Edition toolkit has been controversial among
  some proponents of Free Software, who feel QT Free Edition is not
  "free enough" (QT Free edition v1.41 is only freely distributable if
  unchanged). In addition, some interpretations of the GPL hold that
  because of the restrictions on modifying QT, the GPL is incompatible
  with dynamical linking to the QT Free Edition libraries, and there has
  unfortunately been heated debate in Free Software circles on this
  issue. The KDE developers disagree with this interpretation of the
  GPL.   (Note: Troll Tech have announced that as of QT Free Edition
  v2.0 and later, QT Free Edition will be freely distributable with
  modifications in the form of patches, but even this has not been
  enough to end the debate on whether KDE can be GPL-compliant).

  Unlike some other Linux distributions, Red Hat have stated that
  because of the QT licensing issues, they will nnoott include KDE as an
  integral part of their distribution at this time.  However, the KDE
  team are making these RPMS available for Red Hat users for download
  from the KDE ftp site.  We understand that they will also be made
  available for download from the contributed section of RedHat's ftp
  site.



  11..33..  RRPPMM ppaacckkaaggeess iinn tthhiiss KKDDEE rreelleeaassee..

  The KDE v1.1 release release consists of ten packages; kkddeessuuppppoorrtt,
  which provides  various free software packages used by KDE, but not
  written by the KDE team, kkddeelliibbss, the KDE libraries (LGPL License),
  kkddeebbaassee, the KDE base distribution, and eight further packages of
  applications, grouped according to function: kkddeeaaddmmiinn, kkddeeggaammeess,
  kkddeeggrraapphhiiccss, kkddeemmuullttiimmeeddiiaa, kkddeenneettwwoorrkk, kkddeettooyyss, kkddeeuuttiillss, kkoorrggaanniizzeerr.

  The additional support for Red Hat systems, including these documents,
  the Red Hat post-installation configuration scripts (usekde, kdm_on,
  kdm_off), and the default user configuration installed by usekde, is
  also provided by kdesupport, and is nnoott part of the standard KDE
  distribution.


  Binary RPM packages for KDE on Red Hat Linux have names like


       kdebase-1.1-1rh50egcs.i386.rpm

  Here kdebase is the KDE package name, 1.1 is the KDE version,
  1rh50egcs is the RPM release number, which indicates that it is the
  release number 1 of the "rh50egcs" set of RPM packages (intended for
  Red Hat 5.0, and compiled with the egcs compiler), and i386 indicates
  the processor architecture (here "i386" = Intel PC processors and
  clones, compatible with the 80386 chips, including 80486, Pentium,
  Pentium II, etc.).   This bbiinnaarryy RPM package is obtained by building
  the ssoouurrccee RPM package


       kdebase-1.1-1rh50egcs.src.rpm




  on a system with the "i386" architecture.  Information about building
  the binary RPM packages from their sources is given below in the sec-
  tion "``Rebuilding the RPM source packages''".



  11..44..  TThhee ffoouurr RRPPMM ffaammiilliieess:: ""rrhh4422"",, ""rrhh5500eeggccss"",, ""rrhh55xx"",, aanndd
  ""rrhh55xxeeggccss1111..""

  Because of differences between the Red Hat releases there are ffoouurr
  sets of KDE-1.1 RPM packages:

  +o  rrhh4422 RPM packages for Red Hat 4.2.

  +o  rrhh5500eeggccss RPM packages for Red Hat 5.0.

  +o  rrhh55xx RPM packages for Red Hat 5.1 and 5.2.

  +o  rrhh55xxeeggccss1111 RPM packages for Red Hat 5.1 and 5.2 systems which have
     been upgraded to use the egcs-1.1 compiler (these RPM packages will
     probably only be made available for the Digital/Compaq (tm)
     alpha/AXP processor architecture.)

     When full names of RPM packages are used in this document, they
     will be given (unless instructions are specific to a particular Red
     Hat release) as:


       kdebase-1.1-*rh*.i386.rpm




  where *rh* represents any of these three sets.  When you follow the
  instructions, you can type the file name in this form (provided you
  only have one of the *rh* sets present).

  While the "i386" (PC) architecture is the most common one, you should
  substitute "alpha", "sparc", etc, if you are installing binary RPM
  packages built for different processor architectures.


  +o   AA ssppeecciiaall nnoottee aabboouutt tthhee ""rrhh5500eeggccss"" RRPPMM ppaacckkaaggeess:: these are nnoott
     compiled with the gcc-2.7.2.3 compiler supplied with Red Hat 5.0,
     because such binaries do not work properly at present (support for
     PAM - the "Pluggable Authentication Modules" used by Red Hat for
     password checking - is broken).  The "rh50egcs" RPM packages are
     built with the eeggccss--11..00..xx ccoommppiilleerr that comes with Red Hat 5.1 and
     5.2.  To use them, you must install the C++ library supplied by the
     libstdc++-2.8.0 RPM package from either Red Hat 5.1 or 5.2, which
     can be found at Red Hat's ftp site
     ftp://ftp.redhat.com/pub/redhat/.  If you wish to compile
     additional KDE applications, you will also have to install the
     egcs-1.0.x compiler from Red Hat 5.1 or 5.2 on your Red Hat 5.0
     system; see the document "ggcccc__ttoo__eeggccss--HHOOWWTTOO" for details (the
     procedure is simple and reversible).  If the problem with
     gcc-2.7.2.3-compiled code gets fixed, gcc-compiled "rh50" RPM
     packages  will be made available.

  Detailed installation instructions follow.   (For many users, the
  simple installation instructions in the document "rreeaaddmmee--rreeddhhaatt--rrppmmss"
  will be all that they need).


  22..  TThhiinnggss ttoo ddoo bbeeffoorree bbeeggiinnnniinngg tthhee iinnssttaallllaattiioonn..



  22..11..  CChheecckk iiff yyoouurr XX WWiinnddooww ssyysstteemm wwoorrkkss;; iiss iitt ccuussttoommiizzeedd??

  Before starting to install KDE, make sure you have a working X Window
  system that runs with a Red Hat window manager.  This way, you will
  not confuse X Window system problems with KDE installation problems.

  You need to know if your X Window system has been customized with
  hidden configurations files like .xinitrc, .xsession, or .Xclients
  present in your (or other users') home directory; such files will be
  moved out of the way if you run the usekde post-installation script.

  You also need to know if the default X startup scripts provided by Red
  Hat (/etc/X11/xinit/xinitrc, /etc/X11/xinit/Xclients, installed by the
  xinitrc rpm package,  and /etc/X11/xdm/Xsession, installed by the
  XFree86 rpm package) have been customized on your system: you can test
  for this with


       rpm -V xinitrc
       rpm -V XFree86




  which will report if there are any differences between the installed
  versions and the original files supplied by the Red Hat distribution.
  If there are any special modifications of these files needed by your
  system, you may have to modify the default KDE configuration files, as
  explained below in the section on "``Customizing the default Desk-
  top''". (These instructions will assume that no special customizations
  are needed by your X Window system.)


  22..22..  LLooggiinn aass tthhee ssuuppeerruusseerr

  You must be logged in as the superuser, root, to carry out most of the
  installation steps.



  22..33..  IInnssttaallllaattiioonn ttoo //oopptt//kkddee aanndd ddiisskk ssppaaccee rreeqquuiirreemmeennttss..


  A full KDE installation will need at least 30-40 MB.  The default KDE
  installation directory is /opt/kde/, but the binary RPM packages are
  now "relocatable", to install to a different location with: the rpm
  option
   rpm ... --prefix=/usr/kde  will replace /opt/kde by /usr/kde, for
  example.
  +o  If you do this, you will need to be careful when installing KDE
     applications that are not part to this distribution, to make sure
     they install to the correct location.  For this reason, we
     recommend that ordinary users install to the default location
     /opt/kde.

  Note that /opt is not part of the Linux File System Standard (FSSTND)
  and may not exist on your system.  It is commonly used by large
  application packages.  If a directory /opt does not exist, it is
  recommended that you create it with


       mkdir /opt





  You may wish to create a new partition on your hard disk, and mount it
  at /opt.  If such a new partition is not available, and you do not
  wish to install KDE on your root partition  / (which is often small),
  you will have to make /opt/kde a symbolic link to some other location.
  Check the size and available space in your partitions with


       df




  If, for example, df reports that /usr/local/ has a lot of free space,
  and you wish to put the KDE installation there, create a directory
  /usr/local/kde, and make /opt/kde a (relative) symbolic link to it:


       mkdir /usr/local/kde
       ln -s ../usr/local/kde /opt/kde




  (this assumes /opt/kde does not already exist).


  22..44..  WWhhiicchh rreelleeaassee ooff RReedd HHaatt LLiinnuuxx ddoo yyoouu hhaavvee??

  Make sure you know whether you are using Red Hat 4.2, 5.0, 5.1 or 5.2.
  (The "rh42" RPM packages may work with Red Hat 4.0 or 4.1 systems, but
  some of the configuration files may need changing: you are on your own
  in this case!)

  If you are installing on RReedd HHaatt 55..00, you should now obtain and
  install the libstdc++-2.8.0 RPM (providing the C++ library needed by
  binaries compiled with egcs-1.0.x) from the Red Hat 5.2 distribution:
  ftp://ftp.redhat.com/pub/redhat/redhat-5.2/i386/RedHat/RPMS/libstdc++-2.8.0-14.i386.rpm
  or the older RPM from the Red Hat 5.1 distribution:
  ftp://ftp.redhat.com/pub/redhat/redhat-5.1/i386/RedHat/RPMS/libstdc++-2.8.0-8.i386.rpm
  Now install it:


       rpm -Uvh libstdc++-2.8.0-*.i386.rpm





  You are now ready to proceed to the next step, installing the RPM
  packages.


  33..  IInnssttaalllliinngg tthhee RRPPMM ppaacckkaaggeess..



  33..11..  IInnssttaalllliinngg tthhee QQTT RRPPMM ppaacckkaaggeess..

  If you are upgrading from an earlier KDE installation, you may already
  have the correct QT package (qt-1.42) installed; check it with
   rpm -q qt  and skip this section in that case.

  Which QT package you need to install depends on which Red Hat release
  you have.  The QT packages will normally come with the KDE
  distribution, but you can also look for them at
  ftp://ftp.troll.no/pub/contrib/qt-packages/linux.

  RReedd HHaatt 55..00,, 55..11,, 55..22::.  The QT package you need is compiled with
  egcs-1.0.3a and glibc: qt-1.42-3rh51.i386.rpm.

  RReedd HHaatt 44..22.  The QT package you need is compiled with gcc-2.7.2.3 and
  libc5: qt-1.42-1rh42.i386.rpm.

  If you intend to rebuild the KDE RPM packages, or compile any KDE
  applications, also install the corresponding qt-devel package.
  name="ftp://ftp.troll.no/pub/contrib/qt-devel-1.42-1rh42.i386.rpm">.

  These two binary RPM packages can be also rebuilt from the source rpm:
  qt-1.42-1rh*.src.rpm.

  You are now ready to install the KDE binary RPM packages (or
  optionally rebuild them from the source RPM packages).


  33..22..  IIff yyoouu aallrreeaaddyy hhaavvee aann oollddeerr vveerrssiioonn ooff KKDDEE iinnssttaalllleedd::


  If you have a pre-1.1 release of the KDE rpm packages installed, you
  must first uninstall it.   Any older installations of KDE which were
  not installed by rpm should also be removed.  In this case, start with
  a clean /opt/kde directory.

  In this case, it is also advisable to remove/rename the KDE
  configuration directories Desktop and .kde present in users' home
  directories.

  If you previously  added entries to /etc/profile or other system or
  user configuration files to set the environment variable KDEDIR, add
  /opt/kde/bin to the system path, etc., you should  rreemmoovvee tthheessee
  eennttrriieess.  The kdesupport RPM package adds scripts to /etc/profile.d
  that configures these enviroment variable automatically; Your pre-
  existing customizations may interfere with this, if you do not remove
  them.



  33..33..  RReebbuuiillddiinngg tthhee RRPPMM ssoouurrccee ppaacckkaaggeess ((OOppttiioonnaall))..

  (Skip this section, if you are just installing the binary RPM
  packages).

  To rebuild the binary RPM packages, you must have the C and C++
  compilers installed.

  +o  Red Hat 4.2: install RPM packages gcc, gcc-c++, libg++-devel from
     your Red Hat distribution.

  +o  Red Hat 5.0: You cannot use the compilers that come with Red Hat
     5.0.  Read the document "gcc_to_egcs-HOWTO" which shows how to
     install the egcs compiler.

  +o  Red Hat 5.1, 5.2: install RPM packages egcs, egcs-c++,
     libstdc++-devel from your Red Hat distribution.

  If you wish to rebuild the binary RPM packages from their sources  on
  your system, you mmuusstt do it in the following order:

  1. Rebuild qt first; then install the new binary RPM packages qt, qt-
     devel.

  2. Rebuild, then install, kdesupport.

  3. Rebuild, then install, kdelibs.

  +o  If you are upgrading from KDE-1.0 RPM packages, reinstall the
     kdelibs RPM a second time, as described in the section "``If you
     already have an older version of KDE installed:''"

  4. Rebuild, then install, kdebase.

  5. Now rebuild any other KDE packages (kdeadmin, kdegames,
     kdegraphics, kdemultmedia, kdegames, kdetoys, kdeutils,
     korganizer). Install them when you want.

     Note that if you already have an older KDE running on your system,
     and the new RPM packages will install KDE to the same location
     (i.e., /opt/kde) you should shut down the older KDE before begining
     the rebuild process.

  To rebuild, e.g., kdesupport, you must open a terminal window or
  console, and type


       rpm --rebuild kdesupport-1.1-*rh*.src.rpm




  A lot of output from the rebuilding process will scroll up the screen.
  If the rebuild is successful (you will see a message that the new
  binary RPM has been written to disk, and the final message will be "+
  exit 0"), install the new binary rpm:


       rpm -Uvh /usr/src/redhat/RPMS/i386/kdesupport-1.1-*rh*.i386.rpm




  QT-2.0 will soon be released.  If QT-2.0 maintains backward
  compatibility, KDE-1.1 RPM packages compiled with QT-1.42 will work
  with QT-2.0, but KDE-1.1 RPM packages rebuilt  with QT-2.0 will almost
  certainly nnoott work with QT-1.42.







  33..44..  IInnssttaalllliinngg tthhee bbiinnaarryy KKDDEE RRPPMM ppaacckkaaggeess..

  This section describes how to install the binary KDE RPM packages,
  assuming that you did not already rebuild and install them as
  described in the previous section.

  First install the KDE base system: this must be done in the ccoorrrreecctt
  oorrddeerr:


       rpm -Uvh kdesupport-1.1-*rh*.i386.rpm
       rpm -Uvh kdelibs-1.1-*rh*.i386.rpm
       rpm -Uvh kdebase-1.1-*rh*.i386.rpm





  +o  If the kdebase package fails to install, and you are upgrading from
     KDE-1.0 RPM packages, read the section "``If you already have an
     older version of KDE installed:''"

  You now have installed the base KDE-1.1 system. Either proceed to the
  post-installation instructions, or optionally install any of the other
  packages:


       rpm -Uvh kdeadmin-1.1-*rh*.i386.rpm
       rpm -Uvh kdegames-1.1-*rh*.i386.rpm
       rpm -Uvh kdegraphics-1.1-*rh*.i386.rpm
       rpm -Uvh kdemultimedia-1.1-*rh*.i386.rpm
       rpm -Uvh kdenetwork-1.1-*rh*.i386.rpm
       rpm -Uvh kdetoys-1.1-*rh*.i386.rpm
       rpm -Uvh kdeutils-1.1-*rh*.i386.rpm
       rpm -Uvh korganizer-1.1-*rh*.i386.rpm




  The order of installation of these supplementary packages is not sig-
  nificant.


  44..  PPoosstt IInnssttaallllaattiioonn iinnssttrruuccttiioonnss


  44..11..  OOvveerrvviieeww

  To run KDE, you must do three things:

  +o  make your system aware of KDE (this is done automatically)

  +o  modify the X Window configuration files (run the usekde script).

  +o  start an  X Window session.

  To make your system aware of KDE, an environment variable KDEDIR must
  be set, and the directory with the KDE executables must be added to
  the system path.   In this RPM distribution, scripts that do this
  automatically are added to the directory /etc/profile.d,
   bbuutt tthheeyy oonnllyy ttaakkee eeffffeecctt wwhheenn yyoouu lloogg iinn _a_f_t_e_r installing the
  kdesupport RPM package.

  So, before proceeding,


  +o  log out and log in again.


  44..22..  UUssiinngg tthhee ""uusseekkddee"" ssccrriipptt ttoo mmaakkee KKDDEE aa uusseerr''ss ddeesskkttoopp....

  A (bash) shell script /opt/kde/bin/usekde is provided to individually
  configure user's accounts to use the KDE desktop.  The system
  administrator (root) may configure any user to run KDE with the
  command


       usekde <username>




  where <username> is a valid username present in /etc/passwd.  Individ-
  ual users can configure their own desktops to run KDE with


       usekde




  This adds a hidden .Xclients configuration file to the user's home
  directory; in the unlikely event that any user no longer wishes to run
  the KDE desktop, they need only delete this file to deactivate KDE.




  The usekde script does the following things:

  1. Any configuration files .xinitrc or .xsession that exist in the
     user's home directory are moved to .xinitrc.kdesave or
     .xsession.kdesave.

  2. Any configuration file .Xclients that exists in the user's home
     directory, and is different from the version that usekde will
     install, is moved to .Xclients.kdesave.

  3. A new .Xclients is installed in the user's home directory.
     Assuming the X Window system configuration scripts are unchanged
     from the default ones installed by the Red Hat distribution, the
     user's .Xclients file will control the X Window session, whether it
     is started by startx (xinit) or by the X Display Manager (xdm or
     kdm).




  44..33..  CCuussttoommiissiinngg tthhee ddeeffaauulltt DDeesskkttoopp..

  By default, usekde copies the (hidden) .Xclients file from
  /opt/kde/etc/skel.   This directory also contains default KDE user
  configurations in subdirectories Desktop and .kde.   If the user's
  home directory does not contain Desktop or .kde directories, the
  script .Xclients causes copies to be taken (by default) from
  /opt/kde/etc/skel.


  Note that the default Desktop and .kde KDE configurations are only
  installed when .Xclients is run during the startup of the X Window
  system, iiff tthheeyy ddoo nnoott aallrreeaaddyy eexxiisstt iinn tthhee uusseerr''ss hhoommee ddiirreeccttoorryy.  If
  a user's KDE configuration is old, the user may wish to move the old
  Desktop and .kde directories out of the way, and start the X Window
  system to try out the new configuration.


  If the System Manager wishes to customize the configuration, it is
  recommended to copy the contents of /opt/kde/etc/skel to (say)
  /etc/skel:


       cp -a /opt/kde/etc/skel/.kde /etc/skel
       cp -a /opt/kde/etc/skel/.kderc /etc/skel
       cp -a /opt/kde/etc/skel/Desktop /etc/skel
       cp -a /opt/kde/etc/skel/.Xclients /etc/skel




  Then edit the copies to make any customizations needed in .Xclients,
  (or to files in .kde/share/config, which control the state of the
  desktop when it first starts.)  If you make your customizations to the
  original files in /opt/kde/etc/skel, you risk losing then next time
  you reinstall or upgrade the kdebase RPM package.


  The customized configuration in /etc/skel becomes the default
  configuration when the environment variable $KDE_SKELDIR points to
  their location.  To do this, add the lines


       KDE_SKELDIR="/etc/skel"
       export $KDE_SKELDIR




  to your /etc/profile file.  (You can of course use a location differ-
  ent from /etc/skel).  The Desktop and .kde directories will first be
  looked for in $KDE_SKELDIR, if it is defined, then in
  $KDEDIR/etc/skel.

  You may wish to provide every new user with a KDE configuration, but
  leave it up to the user to activate it by running "usekde".  In this
  case, do not put the .Xclients in /etc/skel.  Set the environment
  variable $KDE_XCLIENTS to point to your customized default .Xclients
  that usekde installs, by also adding, e.g.,


       KDE_XCLIENTS="/opt/kde/etc/skel/.Xclients"
       export $KDE_XCLIENTS




  to /etc/profile.  The usekde script looks for the default .Xclients to
  install in this order: (1) $KDE_XCLIENTS ; (2) $KDE_SKELDIR/.Xclients;
  (3) $KDEDIR/etc/skel/.Xclients.  If it is not found, usekde terminates
  with an error message.


  Using /etc/skel has the advantage that any new user accounts that you
  set up will automatically be configured to use the KDE desktop.   Use
  a different location for the default .Xclients, if you do nnoott want
  this to be the case.



  The default .Xclients file installed by this distribution runs
  scripts /opt/kde/bin/kdesetup (whch  installs the .kde and Desktop
  directories, if they are missing) and /opt/kde/bin/startkde.  If any
  customizations are needed for your system, you may wish to copy the
  startkde script to the .Xclients file, and customize it there.  For
  example, if you find that your /tmp directory gets littered with
  leftover KDE temporary files from your old KDE sessions, you may wish
  to add a line that deletes them.


  KDE applications have session support, and unless this feature is
  disabled, KDE applications will restart in a new KDE session in the
  same state that they had when the previous session was shut down. The
  system administrator can use this feature to create the desired
  default KDE configuration that a new KDE user will see when they first
  run KDE, and copy the contents of the resulting Desktop and
  .kde/share/config directories to the equivalent subdirectories of the
  directory  $KDE_SKELDIR.


  You can also simply make KDE the default for all users, without
  running the usekde script, by replacing the default Red Hat file
  /etc/X11/xinit/Xclients with a copy of .Xclients.  However, this will
  only work for users who do not have .xinitrc or .xsession files in
  their home directory.  (Running the script "usekde" guarantees that
  this is not the case.)


  44..44..  SSttaarrttiinngg KKDDEE bbyy ooppeenniinngg aann XX WWiinnddooww sseessssiioonn..

  The usekde script described in the previous section will have
  configured the KDE desktop to start whenever the user opens an X
  Windows session.   This section will give a brief overview on how X
  Window sessions are opened on Red Hat systems.

  Note that a common error by first-time KDE users is to attempt to run
  the "startkde" script themselves, without starting the X Window
  system.  The "startkde" script is designed to called by the X Window
  startup script (in this case, ~/.Xclients), and nnoott to be directly run
  by the user.

  The two distinct methods of starting an X Window session on Red Hat
  Linux are

  +o  If X is not running, the user can log in on a console (text-based
     terminal screen) and type


       startx




  The X Window session then starts.  It can usually be terminated by the
  combined three-finger keystroke control-alt-backspace (unless this has
  been disabled).

  +o  The X Display Manager (xdm, or its KDE replacement kdm, described
     later) is running.  The user then just logs in using the X Display
     Manager login window, and KDE starts.  When the user logs out, the
     X Window session terminates, and the X Display Manager login window
     reappears.

  In the second case, the X Display Manager may have started
  automatically when the system was booted.  This occurs if the system
  is configured to boot into "runlevel 5" in the /etc/inittab
  configuration file.  You can configure this using the Red Hat system
  administration tools (runlevel editor) that come with the Red Hat
  distribution, or (carefully!) edit /etc/inittab to change the line
  "id:3:initdefault:" to "id:5:initdefault:".

  If the system is not configured this way,  root can start the X
  Display Manager by typing


       telinit 5




  and shut it down again with


       telinit 3




  Another way for root to start the X Display Manager is to type "xdm"
  or "kdm". In this case it can only be shut down  by root with "kill
  -INT <pid>", where <pid> is the Process ID number of the xdm or kdm
  which is running.  This is written in /var/run/xdm.pid (for both xdm
  and kdm), so "cat /var/run/xdm.pid" will tell you what it is.


  Here is a summary of how how  the  various X Windows configuration
  files are used on a default Red Hat 4.2, 5.0, 5.1 or 5.2 installation,
  for both methods of starting X:

  +o  Invoking xxiinniitt ("startx").  A user is logged in at a console, and
     types "startx".  This is a script that invokes
     "/usr/X11R6/bin/xinit" to start X.  When xinit runs, it first looks
     in the user's home directory for a script .xinitrc, and runs it if
     it is present.  If no such script exists, it runs the system
     default script /etc/X11/xinit/xinitrc.  In turn,
     /etc/X11/xinit/xinitrc looks for .Xclients in the user's home
     directory, and runs it if it is present.  If no such script exists,
     it runs the script /etc/X11/xinit/Xclients which starts the default
     Red Hat window manager.

     So, if there is no .xinitrc in the user's home directory, a
     .Xclients script in the user's home directory will control how X
     starts.


  +o  Invoking the XX DDiissppllaayy MMaannaaggeerr ("xdm" or "kdm").  When xdm or kdm
     starts, it runs a script /etc/X11/xdm/Xsession. This Xsession
     script accepts a single argument, the "session type".  In the Red
     Hat script, if the session type  is "failsafe", a very simple xterm
     window opens (presumably allowing corrupted startup scripts to be
     repaired).  If the session type is not "failsafe", the Xsession
     script looks for a script .xsession in the user's home directory,
     and runs it if it is present.  If no such script exists, Xsession
     looks for .Xclients in the user's home directory, and runs it if it
     is present.  If no such script exists, it runs the script
     /etc/X11/xinit/Xclients which starts the default Red Hat window
     manager.  So, if there is no .xsession in the user's home
     directory, a .Xclients script in the user's home directory will
     control how X starts.



  55..  UUssiinngg kkddmm,,  tthhee KKDDEE XX DDiissppllaayy MMaannaaggeerr ((ooppttiioonnaall))..



  55..11..  RReeppllaacciinngg xxddmm wwiitthh kkddmm:: tthhee ""kkddmm__oonn"" ssccrriipptt..

  KDE provides an enhanced  replacement (kdm) for the "XX DDiissppllaayy
  MMaannaaggeerr" (xdm), which provides the X Window system login screen.  For
  troubleshooting purposes, it is useful to know that kdm runs
  iinnddeeppeennddeennttllyy of the KDE desktop - the only connection is that the KDE
  desktop provides a graphical interface  for configuring kdm.

  In particular,

  +o  you can run kdm without running the KDE desktop (just use it as an
     X  Display Manager to run X Window sessions with the default Red
     Hat window manager);

  +o  you can run the KDE desktop without running kdm, by using the
     original Red Hat X Display Manager xdm, or without a display
     manager at all ("startx").

  The KDE X Display Manager kdm in general uses the same configuration
  files as xdm; one exception is that kdm can be configured at
  compilation time to use its own configuration file for PAM (Pluggable
  Authentication Modules), Red Hat's password checking system, and this
  has been done in these RPM packages.

  A (bash) shell script kkddmm__oonn is provided to edit two of the default
  Red Hat X Window system configuration files: /etc/inittab, (to make
  kdm the default X Display Manager in runlevel 5, instead of xdm), and
  /etc/X11/xdm/Xsetup_0 (to allow the background wallpaper of the X
  Window system login screen to be configurable from the KDE desktop).
  All the system administrator needs to do to make these changes is to
  type


       kdm_on




  A second shell script kkddmm__ooffff is available if the system administrator
  wishes to reverse this (type "kdm_off") to again make xdm the default
  X Display manager.  Both scripts save  copies of the original files
  (as /etc/inittab.kdesave, /etc/X11/xdm/Xsetup_0.kdesave).

  If you uninstall KDE, the kdm_off script is run as part of the
  uninstallation script of the kdesupport RPM package.


  55..22..  TThhee kkddmm ""sshhuuttddoowwnn"" ssccrreeeenn..

  Unlike xdm, the kdm login screen has a "shutdown" button, that allows
  the system to be shut down.   The kdm configuration initially
  installed by this RPM package allows system shutdown by any user, but
  the System Administrator can configure kdmin the KDE Control Center so
  a dialog box requiring the Root password opens when "shutdown" is
  pressed.

  This dialog box presents three options:

  +o  SShhuuttddoowwnn (This just shuts the system down)

  +o  SShhuuttddoowwnn aanndd rreessttaarrtt (This shuts the system down, then reboots)

  +o  RReessttaarrtt XX sseerrvveerr (You cannot shut down kdm this way; login as Root,
     and kill the kdm process, or type "telinit 3" if the system is in
     runlevel 5.)

  If you wish to allow system shutdown without requiring the root
  password to be given,  you (as root) can configure this using the KDE
  control center when the KDE Desktop is running.

  The KDE Control Center (or the "K --> Settings" menu) has a graphical
  interface ("Applications --> Login Manager") for configuring kdm,
  including shutdown privileges. Selections "All" or "Console Only" in
  "allow to shutdown" on the "Sessions" screen, allows anyone to shut
  the system down without being prompted for a password.  You can also
  do this manually by editing the kdm configuration file
  /opt/kde/share/config/kdmrc: just change the line
  "ShutdownButton=RootOnly" to "ShutdownButton=ConsoleOnly".


  55..33..  CCoonnffiigguurriinngg tthhee llooggiinn ssccrreeeenn bbaacckkggrroouunndd ((ooppttiioonnaall))..

  The change made to /etc/X11/xdm/Xsetup_0 by the kdm_on script allows
  the background wallpaper of the X Display Manager login screeen to be
  configured by the System Manager, using the "Applications --> Desktop
  Manager" selection in the KDE Control center.

  However, if you prefer to keep the Red Hat login screen background (a
  banner saying "Red Hat Linux", with a picture of the Linux penguin
  logo ("Tux") in a red hat), edit /etc/X11/xdm/Xsetup_0 to delete the
  last line "/opt/kde/bin/kdmdesktop", which was added by the kdm_on
  script.  (This will disable display of configurable backgrounds for
  the login screen).


  55..44..  CCoonnffiigguurriinngg kkddee''ss PPAAMM sseerrvviiccee ((ooppttiioonnaall))

  Like Red Hat's xdm, kdm (and the KDE screensaver lock) uses the PAM
  (Pluggable Authentication Module) system for authenticating users
  (i.e. password checking).  This will transparently handle shadow
  passwords, for example, and can be configured to use many different
  authentication schemes.

  KDE's PAM service (called "kkddee") is configured by the file
  /etc/pam.d/kde.  If this file does not exist, the kdebase RPM package
  makes it  a symbolic link to the  configuration file.  /etc/pam.d/xdm

  You may replace this symbolic link by a customized /etc/pam.d/kdm
  configuration file.  Note that kdm (unlike Red Hat's xdm) implements
  "PAM session" support, so new customizations are possible.  See the
  PAM documentation in /usr/doc/pam-* to learn what you can do with PAM,
  and how to configure it with a customized /etc/pam.d/kde.



  If /etc/pam.d/kde is deleted or corrupt, you will not be able to login
  under kdm (hopefully you can access the system through a console, in
  that case).  A quick fix if this happens is for root to copy
  /etc/pam.d/xdm to/etc/pam.d/kde.

  Even if you do not use kdm, the pam service "kde"  should be
  configured, as it also provides password authentication services to
  the KDE screen lock.





  66..  WWhhaatt uusseerrss sshhoouulldd ddoo wwhheenn tthheeyy ffiirrsstt rruunn tthhee  KKDDEE DDeesskkttoopp..



  66..11..  UUssiinngg tthhee KKDDEE CCoonnttrrooll CCeenntteerr ttoo ccuussttoommiizzee tthhee ddeesskkttoopp..

  Once KDE is running, each user can customize their own KDE settings
  using the KDE control center: click on the icon for this on the panel,
  or click on "K --> KDE Control Center".   You can also access
  individual settings by clicking on "K --> Settings".


  66..22..  AAuuttoommaattiicc ccoonnffiigguurraattiioonn ooff nnoonn--KKDDEE aapppplliiccaattiioonnss ffoorr KKDDEE..

  Also, each user should click on  "K --> System --> Appfinder", which
  will run a program to search their path for various common non-KDE
  applications that may be on the system, and put entries for them
  (.kdelnk files) in the user's "K --> applnk --> Non KDE Apps"  menu.

  If your non-KDE application is not one which the "Appfinder" has been
  configured to seach for, you can still create your own KDE
  configuration file (.kdelnk file) to integrate it  with your KDE
  desktop.  This can be done using the KDE file manager kfm.  See the
  section on the File Manager in the the KDE Help system ("K --> KDE
  Help") for instructions.





  66..33..  UUssiinngg tthhee KKDDEE HHeellpp ssyysstteemm..

  Read "K --> KDE Help --> A Quick Start Guide to the Desktop" for more
  information on using and configuring KDE.  (The default KDE
  configuration installed by "usekde" will have the KDE Help System
  opened on the initial desktop seen by a new user.)


  More detailed information is available in the sections "Getting the
  most out of KDE"


  66..44..  DDeesskkttoopp iiccoonnss ffoorr ffllooppppyy aanndd ccddrroomm ddrriivveess,, aanndd pprriinntteerrss..

  The default Desktop directory supplied by the kdebase RPM package, for
  usekde to install in the user's home directory, includes desktop icons
  for mounting/unmounting a floppy drive and a cdrom drive, and a
  printer icon (drag a document's icon from a kfm (K file manager)
  window to the printer icon to print it.  It is quite likely that the
  system manager will have to carry out some customizations to make
  these work (the drives must be configured so the user has permission
  to mount them, for example).

  See the section on the File Manager in the the KDE Help system ("K -->
  KDE Help") for further information.



  77..  AAddddiinngg KKDDEE aapppplliiccaattiioonnss nnoott iinncclluuddeedd wwiitthh  KKDDEE--11..11..


  77..11..  CCoommppiilleerr iissssuueess..

  If you later compile or install any extra KDE applications that are
  not included in the standard KDE distribution, be sure they are
  compiled using the correct compiler:
  +o  Red Hat 4.2: (no special problems)

  +o  Red Hat 5.0: You must have the egcs compiler from Red Hat 5.1 or
     5.2 installed.  See the document ggcccc__ttoo__eeggccss--HHOOWWTTOO.  Then compile
     as for Red Hat 5.1 or 5.2.

  +o  Red Hat 5.1/5.2.  Make sure the egcs compiler is installed.  type
     "export CC=egcs" before compiling, to make sure the correct
     compiler is used (both egcs and gcc compilers may be present).  You
     may instead use "CC=egcs ./configure ...", if running the autoconf
     script ./configure is the first step of the procedure for building
     the KDE application.

  Note that the compiled application will probably not work with a
  version of QT that is older than the one it was compiled with.


  88..  TTrroouubblleesshhoooottiinngg pprroobblleemmss wwiitthh  KKDDEE iinnssttaallllaattiioonn ::

  The following selection of problems and solutions is based on actual
  problems reported  by users of the KDE-1.0 RPM packages.


  88..11..  iissssuueedd eerrrroorr mmeessssaaggeess tthhaatt kkddeessuuppppoorrtt ccoouulldd nnoott bbee iinnssttaalllleedd
  bbeeccaauussee lliibbjjppeegg ,, lliibbggddbbmm ,, eettcc wweerree mmiissssiinngg.."" ""II ccoouulldd nnoott iinnssttaallll
  tthhee ppaacckkaaggeess:: rrppmm

  This is because you have the previous KDE-1.0 "rh51" rpms installed,
  and kdesupport no longer provides support libraries that Red Hat also
  supplies.  You must first uninstall the KDE-1.0 rpms with rpm -e ... .
  Red Hat 5.1 users will need the Red Hat libjpeg-6b and libungif rpm
  packages from the "jpeg" subdirectory of the Red Hat 5.1 updates
  section on Red Hat's ftp site.



  88..22..  ""II ttyyppeedd ""ssttaarrttkkddee"" aanndd KKDDEE ddiidd nnoott ssttaarrtt!!""

  This is nnoott the way to start KDE.   "startkde" is invoked by .Xclients
  as part of the X startup process.  KDE should start when an X Window
  section is opened, if you have previously run the "usekde" script to
  set up  your KDE desktop..


  88..33..  ""II ttyyppeedd ""ssttaarrttxx"" aanndd tthhee  XX WWiinnddooww ssyysstteemm  wwoouulldd nnoott ssttaarrtt""

  Delete or rename  the .Xclients file in your home directory, and try
  "startx" again.  If it does not work, this is nnoott a KDE problem.  (Did
  you _r_e_a_l_l_y have a working X Window system that could be started by
  "startx" before installing KDE?)

  If .Xclients.kdesave exists in your home directory, does moving this
  back to .Xclients make the X Window system work (without starting
  KDE)?  If so, examine it to find out why.  If .xinitrc.kdesave exists,
  try moving it back to .xinitrc and test this too, to see if any
  required customizations were placed there.

  Are the scripts in the directory  /etc/X11/xinit/ customized in some
  special way needed by your system? (Test for modifications to the Red
  Hat default scripts with "rpm -V xinitrc".)  If so, reinstall
  .Xclients with "usekde", and add these customizations to it.   If this
  solves the problem, you should customize the default .Xclients that
  usekde installs, as described in "``Customizing the default
  Desktop''".


  If startx works when the .Xclients file is removed, shut down the X
  Window system, and reinstall .Xclients with "usekde".  Check that
  .Xclients contains the single executable line "/opt/kde/bin/startx",
  and that "ls -l .Xclients" reports it as executable (the permissions
  should be  "--rrwwxxrr--xxrr--xx").

  If .Xclients seems correct, but your problem persists,  your problem
  may be the next one.


  88..44..  ""KKDDEE ttrriieess ttoo ssttaarrtt,, bbuutt ddooeessnn''tt ssuucccceeeedd""..

  Check that the "/" or "/home" partition of your hard disk is not full.
  KDE needs to write to some files to begin a session.  ("df" will tell
  you the status of your various disk partitions).

  Are there lots of error messages that various files are not being
  found?  You may have installed an incompatible QT library (compiled
  with the wrong compiler, or old version, etc.).  Check the QT
  installation with "rpm -q qt" and "rpm -V qt".

  Verify (rpm -V) kdesupport, kdelibs, and kdebase.  Did you install
  them in the correct order?.  Check that /etc/ld.so.conf contains a
  line "/opt/kde/lib"; if not, add it and run "/sbin/ldconfig".


  Check the KDEDIR environment variable with "echo $KDEDIR" (it should
  be "/opt/kde");  is /opt/kde/bin in your path (type "echo $PATH")?  If
  not, examine  your /etc/profile for any strange customizations, and
  remove them.   Does /etc/bashrc or .bashrc contain anything strange
  (KDE related) that you put there to configure an older KDE
  installation (they should not refer to KDE)?

  If no problems are apparent, completely remove the kde installation
  with "rpm -e kdexxxx" (xxxx = base, libs, etc. in the reverse order
  from installation), remove /opt/kde, and reinstall the RPM packages in
  the correct order.   If this clean reinstallation does not work, post
  a description of your problem to the "kde-user" mailing list (see
  http://www.kde.org).



  88..55..  ""xxddmm oorr kkddmm iiss rruunnnniinngg..  II llooggiinn,, bbuutt ssoommee ootthheerr wwiinnddooww mmaannaaggeerr
  ssttaarrttss..""

  Check that you have a .Xclients hidden file in your home directory.
  Look at it with "cat ~/.Xclients".  Does it invoke
  /opt/kde/bin/startkde?  If not, (re)install the correct one by
  running "usekde".

  If .Xclients  seems OK, there is probably a .xsession file in your
  home directory that is running another window manager.  Rename
  .xsession to some other name, so it will not preempt .Xclients.  If
  this is not the problem, look at /etc/X11/xdm/Xsession to see if it
  has been customized in some non-standard way ("rpm -V XFree86" will
  report if it has been  changed from the default).


  88..66..  ""II rruunn ssttaarrttxx  bbuutt ssoommee ootthheerr wwiinnddooww mmaannaaggeerr ssttaarrttss..""

  Check the .Xclients in your home directory, as described earlier.  Is
  there a .xinitrc that preempts it?  (rename it). Is
  /etc/X11/xinit/xinitrc customized in some strange way?  ("rpm -V
  xinitrc" will show if it has been changed).


  88..77..  ""kkddmm wwoonn''tt lleett mmee llooggiinn""..

  This could be because the .Xclients in your home directory is corrupt
  or not executable.  Check it as described earlier.

  This could be because a file system is full.  Check this with df.

  This could be also a problem with /etc/pam.d/kde.  Check if you can
  login using xdm instead.

  If xdm works, you have  a kdm problem.  If /etc/pam.d/xdm and
  /etc/pam.d/kde are different, PAM  has been customized; copy your
  /etc/pam.d/xdm to /etc/pam.d/kde, with cp -dp  to preserve the
  permissions.

  If xdm is not working, it is not a kdm problem, so get this fixed
  first.    Note, to test xdm and kdm, it is best to switch to runlevel
  3, with "telinit 3", and (as root) run xdm or kdm from the  terminal.


  88..88..  ""II ccaann''tt sshhuutt ddoowwnn xxddmm oorr kkddmm""

  You must be the superuser to do this.  If you are in runlevel 5, shut
  the X Display Manager down with "telinit 3".

  If the X Display Manager was started from the command line on a
  terminal screen, it can only be stopped by killing the process with
  "kill -INT <pid>" where <pid> is the Process ID number of the xdm or
  kdm which is running.  This is written in /var/run/xdm.pid (for both
  xdm and kdm), so "cat /var/run/xdm.pid" will tell you what it is.


  88..99..  TThhee ""uusseekkddee"" oorr ""kkddmm__oonn"" ccoommmmaannddss wweerree nnoott ffoouunndd

  You are loggged in as root, and have just installed the RPM packages.
  You are attempting to run the usekde or kdm_on scripts before $PATH
  has been updated to include the directory with KDE executables.  (You
  did not log in again after installing the kdebase RPM package.)

  Either log in again now (recommended), or run  the scripts with their
  full path: for example,


       /opt/kde/bin/kdm_on






  88..1100..  rrppmm vveerrssiioonn iissssuueess..

  Some of the 2.5.x releases of rpm have a broken /usr/lib/rpmrc
  configuration file where the entry "gzipbin:  /bin/gzip" is
  incorrectly given as "gzipbin:   /usr/bin/gzip" (THIS IS WRONG, gzip
  is found in /bin/gzip).  This will cause the rebuild process to fail
  when gzip is not found.  A simple fix is to create a symbolic link:
  "ln -s ../../bin/gzip /usr/bin/gzip".

  On Red Hat 4.2,  RPM packages built with rpm-2.5.x are incompatible
  with earlier versions of rpm that shipped with the original
  distribution.  Because of this, the KDE "rh42" RPM packages are built
  with the older version of rpm.



  88..1111..  ""hhoosstt ttyyppee nnoott ffoouunndd"" eerrrroorr mmeessssaaggeess wwhheenn ccoommppiilliinngg KKDDEE..

  If you try to rebuild the KDE  binary RPM packages from the source RPM
  packages, you may get an error message that the "host type" of your
  system could not be found.

  This probably means that your compilers are not properly installed.
  If reinstalling the compilers (both gcc and egcs on Red Hat 5.x) does
  not fix this, here is another fix:

  Create a file /opt/kde/share/config.site containing the line
  "host=i386-pc-linux" (or i586-pc-linux for a pentium, i686-pc-linux
  for a pentium-II).  More information is in files README, INSTALL, and
  config.sub that are unpacked into /usr/src/redhat/BUILD/kde* during
  the rebuild process.




  99..  WWhheerree ttoo sseenndd ccoommmmeennttss,, ccoorrrreeccttiioonnss,, eettcc..

  We have tried to give full and complete instructions.  If you find
  errors or omissions, please let us know:

  That's all!

  The KDE Packaging Team

  Send comments and corrections to: redhat-rpms@kde.org





































