Difference between revisions of "KDE System Administration/Startup"

Jump to: navigation, search
(this still looks a bit ugly, but i have to go for now.)
 
(Replaced content with "{{Moved To Userbase}}")
 
(13 intermediate revisions by 9 users not shown)
Line 1: Line 1:
== Startkde Script ==
+
{{Moved To Userbase}}
 
 
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:
 
<code>
 
  LD_BIND_NOW=true kdeinit +kcminit +knotify
 
</code>
 
and
 
<code>
 
  kwrapper ksmserver $KDEWM
 
</code>
 
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.
 
 
 
 
 
== 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 <tt>top</tt> and <tt>ps</tt>. Use <tt>top -c</tt> or <tt>ps aux</tt> to see the actual program name.
 
For example:
 
<code>
 
> 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
 
</code>
 
<tt>kdeinit: Running...</tt> indicates the master kdeinit process. The other processes listed
 
are programs started as KLMs.
 
 
 
When kdeinit starts for the first time it will launch klauncher, and kded, as well as any additional
 
programs specified on its command line in the startkde script. Normally that are
 
and knotify.
 
 
 
=== dbus-daemon ===
 
dbus-daemon is a background process (daemon) which provides inter-process communication (IPC) facilities to all KDE
 
applications as well as several other system components, such as HAL, network manager, power manager and various non-KDE desktop applications. It is a cross-desktop, portable IPC project which is hosted at freedesktop.org.
 
 
 
D-Bus facilities are accessible from the command shell via the qdcop command line tool and can be explored using the graphical dcop-viewer application. D-Bus is essential for all KDE applications and should autostart when requested.
 
 
 
=== 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
 
{{path|$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.
 
<tt>kcminit --list</tt> can be used to show all initialisation services and
 
<tt>kcminit &lt;service&gt;</tt> can be used to execute a single service explicity. This can be
 
useful when investigating start-up problems.
 
 
 
=== knotify ===
 
The primary task of <tt>knotify</tt> is to relay notifications to appropriate sub-systems. For instance, sound alerts are sent to the sound system, visual alerts and showed on-screen using passive popups or dialogs, logged messages are written out to disk, etc. The actions are user configurable and support user interaction.
 
 
 
=== ksmserver ===
 
 
 
{{improve|When the fd.o autostart spec is finalized and implemented in KDE4, update this section}}
 
 
 
<tt>ksmserver</tt> 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 {{path|$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:
 
 
 
<code>
 
X-KDE-autostart-condition=ktiprc:TipOfDay:RunOnStart:true
 
</code>
 
 
 
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
 
{{path|ksmserverrc}} configuration file and contains references to application specific state
 
information. The application specific state infomation is saved in {{path|$KDEHOME/share/config/session}}.
 
For example if ksmserverrc contains:
 
<code>
 
restartCommand1=kwin,-session,110a0a0002000106760689100000019360000_1083342151_608625
 
restartCommand2=konsole,-session,10378ac070000108334204700000277690000_1083342151_552722
 
</code>
 
Then the application specific state information for <tt>kwin</tt> and <tt>konsole</tt> can be found in
 
<code>
 
$KDEHOME/share/config/session/kwin_110a0a0002000106760689100000019360000_1083342151_608625
 
</code>
 
and
 
<code>
 
$KDEHOME/share/config/session/konsole_10378ac070000108334204700000277690000_1083342151_552722
 
</code>
 
respectively.
 
 
 
The state information of kwin contains the location of the application windows of all the other
 
applications in the session.
 
 
 
 
 
== Desktop Components ==
 
The three major components of the desktop are the window manager, command executer and workspace (desktop and panels).
 
 
 
=== Window Manager ===
 
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.
 
 
 
By default, KWin is started as the window manager in a KDE session. This can be overriden by defining the  <tt>KDEWM</tt> environment variable to be name of an alternate window manager.
 
 
 
=== krunner ===
 
 
 
{{improve|what handles autostart now? it used to be kdesktop?}}
 
 
 
<tt>krunner</tt> is auto-started by the session manager by means of {{path|$KDEDIR/share/autostart/krunner.desktop}}. It is responsible for activating the screensaver, application start feedbackand the Run Command (Alt-F2) dialog and is meant to run for the lifetime of the session.
 
 
 
=== Plasma ===
 
 
 
{{improve|when plasma enters the start up sequence document it here.}}
 
 
 
KDesktop is auto-started by the session manager by means of {{path|$KDEDIR/share/autostart/plasma.desktop}}
 
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.
 

Latest revision as of 13:15, 11 March 2016

This page is now on the Userbase wiki.


This page was last edited on 11 March 2016, at 13:15. Content is available under Creative Commons License SA 4.0 unless otherwise noted.