Setting the Environment to Run Your KDE Plasma Desktop

Assuming you are using a dedicated user to build KDE, and you already have an installed KDE version, running your new KDE may be a bit tricky, as the new KDE has to take precedence over the old. You must change the environment variables of your login scripts to make sure the newly-built desktop is used.

Automatically installing a login driver

Starting from version 1.16, kdesrc-build will try to install an appropriate login driver, that will allow you to login to your kdesrc-build-built KDE desktop from your login manager. This can be disabled by using the install-session-driver configuration file option.

Note

Session setup does not occur while kdesrc-build is running in pretend mode.

This driver works by setting up a custom xsession session type. This type of session should work by default with the kdm login manager (where it appears as a Custom session), but other login managers (such as LightDM and gdm) may require additional files installed to enable xsession support.

Adding xsession support for distributions

The default login managers for some distributions may require additional packages to be installed in order to support xsession logins.

Manually adding support for xsession

If there were no distribution-specific directions for your distribution in the section called “Adding xsession support for distributions”, you can manually add a Custom xsession login entry to your distribution's list of session types as follows:

Procedure 2.1. Adding an .xsession login session type.

Note

This procedure will likely require administrative privileges to complete.

  1. Create the file /usr/share/xsessions/kdesrc-build.desktop.

  2. Ensure the file just created has the following text:


    Type=XSession
    Exec=1$HOME/.xsession
    Name=KDE Plasma Desktop (unstable; kdesrc-build)

    1

    The $HOME entry must be replaced by the full path to your home directory (example, /home/user). The desktop entry specification does not allow for user-generic files.

  3. When the login manager is restarted, it should show a new session type, KDE Plasma Desktop (unstable; kdesrc-build) in its list of sessions, which should try to run the .xsession file installed by kdesrc-build if it is selected when you login.

    Note

    It may be easiest to restart the computer to restart the login manager, if the login manager does not track updates to the /usr/share/xsessions directory.

Setting up the environment manually

This documentation used to include instruction on which environment variables to set in order to load up the newly-built desktop. These instructions have been moved to an appendix (the section called “Setting up a KDE login profile”).

If you intend to setup your own login support you can consult that appendix or view the sample-kde-env-master.sh file included with the kdesrc-build source.