Startkde

From KDE Community Wiki

Note

This page is old. See page history.


What does startkde do?

  • Set magical environment variables:
    • if in failsafe: KDE_FAILSAFE=1 and KWIN_COMPOSE=N
    • unset DYLD_FORCE_FLAT_NAMESPACE
  • catch SIGHUP: trap 'echo GOT SIGHUP' HUP
  • set up $PATH
  • check if KDE is already running: kcheckrunning
  • Use kstartupconfig to read early launch config
  • Set mouse cursor theme:
    • kapplymousetheme "$kcminputrc_mouse_cursortheme" "$kcminputrc_mouse_cursorsize"
    • export XCURSOR_THEME
    • export XCURSOR_SIZE
  • Set up displays (basically calling $krandrrc_display_startupcommands from kstartupconfig)
  • Force font DPI: Xft.dpi: $kcmfonts_general_forcefontdpi | xrdb -quiet -merge -nocpp
  • Launch KSPlash (ksplashx, ksplashqml or ksplashsimple)
  • Source scripts found in <localprefix>/env/*.sh and <prefixes>/env/*.sh
  • Set and export QT_PLUGIN_PATH
  • Activate the kde font directories
    • system/user, normal and override font directories
    • adding to X: xset +fp $paths
    • mkfontdir on the user directories before adding
    • ask X to rebuild its font list: xset fp rehash
    • set GS_LIB to get ghostscript to look in users font directories
  • Link "tmp" "socket" and "cache" resources to directory in /tmp
  • export XDG_DATA_DIRS
  • Launch dbus session: eval `dbus-launch --sh-syntax --exit-with-session`
  • set KDE_FULL_SESSION
    • xprop -root -f KDE_FULL_SESSION 8t -set KDE_FULL_SESSION true
  • set KDE_SESSION_VERSION
    • xprop -root -f KDE_SESSION_VERSION 32c -set KDE_SESSION_VERSION 4
  • export KDE_SESSION_UID
  • Launch kdeinit
    • LD_BIND_NOW=true @KDE4_LIBEXEC_INSTALL_DIR@/start_kdeinit_wrapper +kcminit_startup
  • Launch ksmserver (with optional window manager)

We are now running a KDE session.

Shutdown procedure:

  • run kdeinit4_shutdown
  • Run scripts found in $KDEDIRS/shutdown
  • unset variables