• Skip to content
  • Skip to link menu
KDE-Francophone
  • Accueil
 
 

Startup

 
[ Startkde Script | Background Services | Desktop Components ]

Startkde Script

The KDE startup sequence starts with the startkde script. In most cases this script gets called from the display manager (KDM) once the user has been authenticated. Their are two very important lines in the startkde script:

   LD_BIND_NOW=true kdeinit +kcminit +knotify
and
   kwrapper ksmserver $KDEWM
The first line starts the kdeinit master process. This process is used to start all other KDE processes. The arguments behind kdeinit are the names of additional services to be started. The + indicates that kdeinit needs to wait till the service has finished.

The second line asks kdeinit to start the ksmserver session manager process. The session manager determines the lifetime of the session. When this process exits, the user is logged out.

[Back to top]

Background Services

All KDE background services are user specific, unlike system daemons they are not shared between users. Apart from being unique per user they are unique per X-server display as well.

kdeinit

kdeinit is used to start all other KDE programs. kdeinit can start normal binary program files as well as kdeinit loadable modules (KLMs). KLMs work just like binary program files but can be started more efficiently. The drawback is that programs started this way appear as kdeinit in the output of top and ps. Use top -c or ps aux to see the actual program name. For example:
> ps aux
waba     23184  0.2  2.1 23428 11124 ?       S    21:41   0:00 kdeinit: Running...
waba     23187  0.1  2.1 23200 11124 ?       S    21:41   0:00 kdeinit: dcopserver --nosid
waba     23189  0.2  2.4 25136 12496 ?       S    21:41   0:00 kdeinit: klauncher
waba     23192  0.7  2.8 25596 14772 ?       S    21:41   0:00 kdeinit: kded
waba     23203  0.8  3.4 31516 17892 ?       S    21:41   0:00 kdeinit: knotify
kdeinit: Running... indicates the master kdeinit process. The other processes listed are programs started as KLMs.

When kdeinit starts for the first time it will launch dcopserver, klauncher, and kded, as well as any additional programs specified on its command line in the startkde script. Normally that are kcminit and knotify.

dcopserver

dcopserver is a deamon which provides inter-process communication (DCOP) facilities to all KDE applications. The DCOP facilities are accessible from the command shell via the dcop command line tool. DCOP is essential for all KDE applications.

klauncher

klauncher is a deamon which is responsible for service activation within KDE. It operates in close connection with the kdeinit master process to start new processes. KDE applications communicate with klauncher over dcop in order to start new applications or services.

kded

kded is a generic KDE daemon. It has the ability to load various service modules and run these in the background. Each kded service module is described by a .desktop file installed under $KDEDIR/share/services/kded/ The Service Manager in the Control Center can be used to monitor the status of the service modules and to disable certain services.

kcminit

kcminit executes initialisation services during startup. Initialisation services are specified in the .desktop files of applications or services via the X-KDE-Init line. Initialisation services are typically used for initialisating hardware based on user specified settings. kcminit --list can be used to show all initialisation services and kcminit <service> can be used to execute a single service explicity. This can be useful when investigating start-up problems.

knotify

The primary task of knotify is to relay sound notifications to the sound server, it also provides alternative notification methods.

ksmserver

ksmserver is KDE's session manager. On startup the session manager starts auto-start applications and it restores applications from the previous session.

The applications to auto-start are indicated by .desktop files in the $KDEDIR/share/autostart directory. Whether to auto-start an application can be conditional upon some configuration entry determined by the X-KDE-autostart-condition entry in the .desktop file. The ktip.desktop file for example contains:

X-KDE-autostart-condition=ktiprc:TipOfDay:RunOnStart:true
This means that the ktiprc configuration file is checked for a RunOnStart entry in the [TipOfDay] section. If no such entry is found, true is assumed, which means that ktip is one of the applications that is auto-started by default.

There is an additional auto-start directory that is handled by KDesktop.

The KDE session manager also restores one of the previous sessions. A session contains of a collection of applications as well as application specific information that reflects the state of the applications at the time the session was saved. Sessions are stored in the ksmserverrc configuration file and contains references to application specific state information. The application specific state infomation is saved in $KDEHOME/share/config/session. For example if ksmserverrc contains:

restartCommand1=kwin,-session,110a0a0002000106760689100000019360000_1083342151_608625
restartCommand2=konsole,-session,10378ac070000108334204700000277690000_1083342151_552722
Then the application specific state information for kwin and konsole can be found in
$KDEHOME/share/config/session/kwin_110a0a0002000106760689100000019360000_1083342151_608625
and
$KDEHOME/share/config/session/konsole_10378ac070000108334204700000277690000_1083342151_552722
respectively.

The state information of kwin contains the location of the application windows of all the other applications in the session.

[Back to top]

Desktop Components

The three major components of the desktop are the window manager - KWin, the desktop itself - KDesktop and the panel - Kicker

Window Manager - KWin

The window manager is always started by the session manager as part of the session restoration. The window manager is responsible for managing all the windows across the virtual desktops, including initial placement, minimizing, maximizing, raising, lowering of the windows and focus switching between windows.

Desktop - KDesktop

KDesktop is auto-started by the session manager by means of $KDEDIR/share/autostart/kdesktop.desktop .

KDesktop is responsible for setting wallpapers, activating the screensaver, handling the icons on the desktop as well as the Run Command (Alt-F2) dialog.

On startup, KDesktop will also open/run all documents and applications found in the Autostart path. The Autostart path can be configured in the Control Center in the Paths section. By default the autostart path is equal to $KDEHOME/Autostart .

Note that this Autostart path differs from the $KDEDIR/share/autostart directory used by the session manager. Note also that while $KDEDIR/share/autostart must contain .desktop files, $KDEHOME/Autostart may contain all kinds of files. The files will be opened as if they were clicked upon by the user.

One of the main tasks of KDesktop is to provide the desktop with icons. These icons primarily reflect the files found in the Desktop path. The Desktop path can be configured in the Control Center in the Paths section. By default the Desktop path is equal to $HOME/Desktop. In addition to the files found in the Desktop path KDesktop will also show any files found under $KDEDIR/share/apps/kdesktop/Desktop. The latter is a convenient way to provide custom desktop icons to all users.

Panel - Kicker

The panel is auto-started by the session manager by means of $KDEDIR/share/autostart/panel.desktop

See also the Kicker Handbook.

[Back to top]

[ Edit ]

Informations

Skip menu "Informations"
  • Qu'est-ce que KDE ?
  • Captures d'écrans
  • Essayer KDE
  • Communiqués
  • Informations générales
  • Documentation
  • Aider
  • Marchandises KDE
  • Historique

Téléchargements

Skip menu "Téléchargements"
  • Version stable
  • KDE 4.0
  • Code source
  • Miroirs FTP

Communauté

Skip menu "Communauté"
  • Contributeurs
  • Listes de diffusion

Développer

Skip menu "Développer"
  • S'impliquer
  • Développement
  • Bogues
  • Traduction, Documentation
  • Référence code source
  • WebSVN

Explorer

Skip menu "Explorer"
  • Famille KDE
  • International

Global navigation links

  • Accueil
  • Accueil de KDE Accessibilité
  • Description des touches d'accès
  • Back to content
  • Back to menu

Search:


Maintenu par Frédéric Sheedy
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Texte officiel