Share with friends and colleagues on social media

If you’re using SUSE Linux Enterprise Desktop 12 (or SUSE Linux Enterprise Server 12 with a graphical interface) and you used to have a KDE desktop or simply you wanted to try the Plasma desktop so many people talk about, you probably noticed KDE wasn’t available for SLE12… until now.

First I should tell something about Package Hub: Package Hub is great. SLE12 has a 13 years life cycle, which means secure, stable versions of packages have to be chosen carefully but it also means that not all software available on Linux can be included in SLE. Here is where Package Hub enters the scene. Package Hub contains packages built by the openSUSE community for SLE12 using OBS so you should be warned that they’re not supported by SUSE. For a package to be included in Package Hub (also known as Backports), it has to fulfill some packaging policies like: It must follow openSUSE Policies, the package must be derived from Factory, there should be no conflicts with official SLE packages, etc. This ensures that you don’t lose the supportability of your SLE system.

During the last months, I’ve been making sure that dependencies needed by the Plasma desktop and KDE applications to build successfully are available either in SLE official channels or through Package Hub, and once that has been sorted out, KDE packages can be installed in SLE12. Let’s see how.

Basic system upgrade and preparation

First, make sure you are using SLE12-SP1:

# lsb-release -r
Release: 12.1

If you are still on SLE12, you have to upgrade your system since SLE12-SP1 includes a Qt update that is required by KDE. To upgrade your system use Yast2, start the Online Migration module and follow these instructions.

If you don’t have the SLE-SDK12-SP1 repository, add it now. You can do it in two ways:

Using yast

Run Yast and start the Software Repositories module. Click on “Add” and select “Extensions and Modules from Registration Server“. Be sure the SDK repository is selected to be installed and follow the screen instructions. This is needed because some dependencies are released in the SDK repository.

From the command line

Just run from a command line:

# sudo SUSEConnect –regcode YOUR_SLE_PRODUCT_ACTIVATION_KEY
# sudo SUSEConnect -p sle-sdk/12.1/x86_64

Replacing YOUR_SLE_PRODUCT_ACTIVATION_KEY with your own activation key. If you have already registered your product to SUSE Customer Center, you can skip the first command.

Adding the Package Hub repositories

First we’ll add the SLE12 and SLE12-SP1 Package Hub repositories as explained here:

# sudo zypper addrepo -fc http://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-12/standard/openSUSE:Backports:SLE-12.repo

# sudo zypper addrepo -fc http://download.opensuse.org/repositories/openSUSE:/Backports:/SLE-12-SP1/standard/openSUSE:Backports:SLE-12-SP1.repo

# sudo zypper refresh

Note that the above commands will not only allow to install the Plasma desktop and KDE Applications, but also many other applications like thunderbird, chromium, nginx, pico, irssi, sshfs, etc.

At this point, it’s not required, but it’s recommended to update your system to the latest versions of the system packages released by SUSE. You can do that with:

# sudo zypper up

Installing KDE

Currently, KDE Frameworks 5.20, Plasma 5.5.5 and a subset of KDE Applications 15.12.3 are included in Package Hub. The easiest way to install a basic Plasma desktop with some KDE applications is running:

# sudo zypper in -t pattern kde

You can then install other patterns like kde_ide (which includes KDevelop, kate, kompare, unbrello), kde_imaging (which includes gwenview5 and okular), kde_internet (kopete, krfb, krdc), kde_multimedia (amarok, k3b, kmix, juk), kde_utilities (kmag, kompare, okteta, kteatime), kde_games (kmahjongg, kmines, ksudoku) and kde_edutainment (kig, marble, kmplot). Or you may choose to install individual applications like:

# sudo zypper in okular kate kopete

And that’s all. Log out and before entering your password to log in, be sure to click on the small gear next to the Sign In button and select the KDE Plasma Workspace desktop.

Known problems

  • If you run an SLE12 system in a qemu virtual machine using SPICE and the QXL video driver (as is the default in libvirt managed virtual machines) inside an openSUSE Leap 42.1 or SLE12 SP1 host, you may get a black screen when logging into KDE in your guest machine, since the kernel thinks there’s no screen attached to the system and KDE believes it . This bug was fixed in a maintenance update of the SLE12 SP1 kernel (referenced as “drm: qxl: Workaround for buggy user-space (bsc#981344)”), so you can either update your kernel or switch the VM settings in libvirt/virt-manager to use Cirrus as graphical card instead of QXL.
  • If you run KDE in SLES12, don’t be surprised if you try to restart the system or shutdown and instead you only logout. This is caused by a problem in ksmserver (bugzilla entry titled “Using the restrictive polkit settings breaks shutdown”, you’ll need rights to access it) that closes the authentication agent too soon during shutdown. This doesn’t happen in SLED, only in SLES, but there are a couple of workarounds for this:
    1. The easy and best workaround: Just do one more click to shutdown or restart the system from the login manager after logging out from your session. If having the options in the menu upsets you, you can remove the restart and power off buttons from the menu by right-clicking on each button and selecting Remove from Favorites. As soon as the issue is fixed there’ll be an update. At that point you can reenable the buttons by going to the Power/Session menu, right clicking on each of the options and selecting Add to Favorites.
    2. The (a bit) insecure workaround: Create a file /etc/polkit-default-privs.allow-anyone-to-poweroff with the following contents:

      org.freedesktop.login1.power-off yes
      org.freedesktop.login1.power-off-multiple-sessions yes
      org.freedesktop.login1.reboot yes
      org.freedesktop.login1.reboot-multiple-sessions yes

      Now open the /etc/sysconfig/security file and change the POLKIT_DEFAULT_PRIVS variable from “restrictive” to “restrictive allow-anyone-to-poweroff” . After modifying that file you have to run sudo /sbin/set_polkit_default_privs . Note that this will allow any user of the system to shut it down or restart it. You’ve been warned!

Who made this possible?

It wouldn’t be fair to say that I’ve done this alone. As is usual in the opensource world, all this is in fact based on work done by others and in this case, it’s based on the great work done by the rest of the openSUSE KDE maintainers: Christophe Giboudeaux (cgiboudeaux), Hrvoje Senjan (shumski), Luca Beltrame (einar77), Raymond Wooninck (tittiatcoke) and Wolfgang Bauer (wolfi323) among others. On the Backports side, I’ve been aided first by Ludwig Nussel (lnussel) and then by Frederic Crozat (fcrozat), Scott Bahling (sbahling) and Wolfgang Engel (wengel). Also, for maintenance issues Leonardo Chiquitto (leonardo) and Andreas Steiger (asteiger) have done a great work. For testing, Qingkai and Yifan Jiang from the Beijing team did some testing some months ago. And last but not least, my manager, Scott Reeves (sreeves) who managed all this work which started as a Hackweek project around a year ago in Hackweek’12.

(Visited 1 times, 1 visits today)

Share with friends and colleagues on social media
Tags: , , , ,
Category: Desktop, openSUSE, SUSE Linux Enterprise, SUSE Linux Enterprise Desktop, SUSE Linux Enterprise Server, Technical Solutions
This entry was posted Friday, 22 July, 2016 at 10:43 am
You can follow any responses to this entry via RSS.

Comments

  • Linux140 says:

    Really excellent work ^_^

    Just what I was really hoping for, a nice stable KDE interface for Suse SLES 12 SP1

    YAY for all the developers who made this possible, a hugh thank you.

  • LarryResch says:

    Is there a way to download the packages from package hub? The SLE12 systems that I want to update with KDE are not connected to the Internet.

  • Leave a Reply

    Your email address will not be published. Required fields are marked *