Plasma and the Screensaver==========================There are three main pieces to the screensaver picture, two of which involve plasma.first is lockprocess, which manages the other two. second is the [k|x]screensaver binaries which just drawpretty pictures. third is plasma-overlay, which does the plasma stuff.lockprocess-----------This process manages plasma and the screensaver binaries, and ensures that once the screen is lockedit *stays* locked until proper authentication is provided. It provides the unlock dialog too.If a screensaver or plasma-overlaycrashes or becomes unresponsive, lockprocess will keep going, ensuring that a locked screen stays locked and canstill be unlocked by the user. It's as small as possible to keep the chances of it itself crashing very small.The screensaver binaries are brought in via XEmbed, while communication with plasma-overlay happensover dbus.lockprocess also filters all keyboard and mouse events, passing them on to plasma-overlay asnecessary. if it suspects that plasma-overlay is dead (ie. dbus failure), it won't pass on events,ensuring that the user never ends up with an unresponsive screensaver.plasma-overlay--------------This process is a plasma shell; it has a corona and a simple view, and loads its own containment.The containment used by plasma-overlay is very basic; just a customcontainment with a cashewand applet handles.the user can add applets, but not containments. there's configuration for transparency if you havecompositing, or wallpaper if not (random wallpaper slideshow is my poor-man's-screensaver). allconfiguration and applet add/remove are disabled when the screen is locked.it communicates with lockprocess over dbus. lockprocess will send it into an idle mode after a while(where any events trigger the unlock dialog, and plasma-overlay uses a different transparencysetting), and tell it to go into active mode when there's activity again. when an unlock action inplasma is activated, plasma-overlay asks lockprocess for permission, and lockprocess will ask theuser for their password (or whatever other authentication method).when the screen is locked, plasma-overlay offers two actions to the user: leave screensaver andconfigure widgets. the first is what you'd expect; you enter your password and all of lockprocess goesaway, letting you back into your desktop. the second is more like unlocking widgets inplasma-desktop: it brings you into configuration mode where you can add, remove and configurewidgets. this config mode can also be reached from the screensaver kcm module. from config mode youcan exit at any time without entering a password; you can also re-lock the screen, of course.if lockprocess vanishes from dbus, plasma-overlay will assume that it missed a signal to quit andwill commit suicide. :) this is intentional; I got sick of dbus race conditions leaving me with aplasma-overlay hanging around if I moved the mouse just after the screensaver began to run.security---------Plasmoids on the screensaver obviously present a security risk. this is being minimized as describedin the security document.what makes it interesting is that we're less concerned with maliciousplasmoids and more with malicious (or mischievous) users; a locked screen left unattended should notend up with goatse on it, or files deleted.Future Work-----------* Multi-screen support would be awesome* Plasmify the unlock dialog (either by using plasma theming or by having plasma-overlay run it)