docs.kde.org
KDE Startup Sequence
Prev
Next

KDE Startup Sequence

kdm

Always runs as root! Uses $KDEDIR/share/config/kdmrc and /etc/X11/xdm/Xservers. The latter contains entries like:

:0 local /usr/X11R6/bin/X :0 vt07

Relevant startup files are also:

[X-*-Core] section in kdmrc
Setup - /etc/X11/xdm/Xsetup
User enters username & password
Startup - /etc/X11/xdm/Xstartup - prepare as root
Session - /etc/X11/xdm/Xsession - starts session as user
= For a KDE session: kde or startkde
= If present ~/.xsession or ~/.xinitrc
Reset - /etc/X11/xdm/Xreset - after session finished

The KDE Startup Script: startkde

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. The kdeinit master process is used to start all other KDE processes. It show up in the output of ps aux as kdeinit: Running.... The arguments after kdeinit are the names of additional processes to be started. The + indicates that kdeinit needs to wait till the process has finished. kdeinit also starts dcopserver, klauncher and kded.

The second of the two lines 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.

Prev
Next
Home


docs.kde.org