Distributions/Packaging Recommendations: Difference between revisions

From KDE Community Wiki
(Recommend against installing xdg-desktop-portal-gnome)
(Mention kwalletmanager)
 
(29 intermediate revisions by 8 users not shown)
Line 1: Line 1:
This page collects recommendations for how to ship the highest-quality and most complete Plasma session to your users.
This page collects recommendations for how distro packagers can ship the highest-quality and most complete Plasma session to their users.
 
If you're a user reading this as a reference point for how to get a complete Plasma session, it's highly recommended that you seek out and use your distro's "plasma desktop" meta-package. If you opt not to, consider this page to be an instruction manual for how to proceed correctly.
 


== General packaging recommendations ==
== General packaging recommendations ==
* For every KDE package you pre-install, also pre-install its optional CMake dependencies; it's okay if the user can remove them later, but they should be installed by default.
* For every KDE package you pre-install, also pre-install its optional CMake dependencies; it's okay if the user can remove them later, but they should be installed by default.
* Avoid patching out mandatory or optional dependencies, as this will lead to KDE software missing functionality in ways that will be mysterious for users.
* Avoid patching out mandatory or optional dependencies, as this will lead to KDE software missing functionality in ways that will be mysterious for users.
* Avoid splitting single KDE source repos into multiple packages--especially those which provide runtime dependencies like QML modules. This is a common cause of runtime user breakage.
* Use the Libinput input drivers by default; don't use Synaptics on X11 as it is unmaintained and provides a subpar experience with modern large buttonless touchpads compared to Libinput.
* Use the Libinput input drivers by default; don't use Synaptics on X11 as it is unmaintained and provides a subpar experience with modern large buttonless touchpads compared to Libinput.


== Recommended packages to pre-install ==
== Recommended packages to pre-install ==
Line 10: Line 15:


=== Plasma packages===
=== Plasma packages===
Generally pre-install every package in https://download.kde.org/stable/plasma/[latest release], except for the following:
Generally pre-install every package in https://download.kde.org/stable/plasma/[latest release], '''except for the following''':


'''Optional packages:'''
'''Optional packages:'''
Line 24: Line 29:
* <code>plasma-sdk</code> (developer apps for Plasma; not generally user-relevant)
* <code>plasma-sdk</code> (developer apps for Plasma; not generally user-relevant)
* <code>plasma-tests</code> (internal testing harness; not user-relevant)
* <code>plasma-tests</code> (internal testing harness; not user-relevant)
* <code>qqc2-breeze-style</code> (not needed for the desktop shell)


=== Non-Plasma packages ===
=== Non-Plasma packages ===
Line 37: Line 41:
* <code>kdenetwork-filesharing</code> (provides the Samba file sharing setup wizard)
* <code>kdenetwork-filesharing</code> (provides the Samba file sharing setup wizard)
* <code>kdepim-addons</code> (provides a variety of useful addons for the PIM suite; '''only needed if you pre-install the PIM suite!''')
* <code>kdepim-addons</code> (provides a variety of useful addons for the PIM suite; '''only needed if you pre-install the PIM suite!''')
* <code>kimageformats</code> (provides support for AVIF, JXL and other formats, letting Dolphin display previews and Gwenview open these files)
* <code>kio-admin</code> (provides a safe way to edit files as root)
* <code>kio-admin</code> (provides a safe way to edit files as root)
* <code>kio-extras</code> (provides the thumbnailing engine and many thumbnailing plugins, among other things)
* <code>kio-extras</code> (provides the thumbnailing engine and many thumbnailing plugins, among other things)
* <code>kio-fuse</code> (provides transparent access to non-KDE apps for files on remote locations)
* <code>kio-fuse</code> (provides transparent access to non-KDE apps for files on remote locations)
* <code>kio-gdrive</code> (provides transparent KIO access to Google Drive)
* <code>kio-gdrive</code> (provides transparent KIO access to Google Drive)
* <code>libappindicator-gtk3</code> instead of the GTK2 variant for crisp status notifier systray icons. Note that this might break left click activation in the few apps that supported it in <code>libappindicator</code>, such as onboard.
* <code>kwalletmanager</code> (includes a System Settings KCM for KWallet)
* <code>phonon-vlc</code> (this is the only maintained and supported Phonon backend for KDE apps that use Phonon for their multimedia needs; the alternative <code>phonon-gstreamer</code> has been unmaintained since 2013 and should not be shipped by default, or at all, ideally)
* <code>phonon-vlc</code> (this is the only maintained and supported Phonon backend for KDE apps that use Phonon for their multimedia needs; the alternative <code>phonon-gstreamer</code> has been unmaintained since 2013 and should not be shipped by default, or at all, ideally)
* <code>print-manager</code> (provides the Printers KCM and widget)
* <code>xwaylandvideobridge</code> (exposes Wayland windows to XWayland-using screen sharing apps)
* <code>xwaylandvideobridge</code> (exposes Wayland windows to XWayland-using screen sharing apps)


Line 49: Line 53:
It is recommended to pre-install the following 3rd-party packages:
It is recommended to pre-install the following 3rd-party packages:


* <code>icoutils</code> (needed for EXE file thumbnails)
* <code>iio-sensor-proxy</code> (allows automatic screen rotation on Wayland)
* <code>iio-sensor-proxy</code> (allows automatic screen rotation on Wayland)
* <code>libappindicator-gtk3</code> instead of the GTK2 variant for crisp status notifier systray icons. Note that this might break left click activation in the few apps that supported it in <code>libappindicator</code>, such as onboard.
* <code>noto-sans</code> (provides the default font used for KDE software)
* <code>noto-sans</code> (provides the default font used for KDE software)
* <code>noto-color-emoji</code> (provides color emojis)
* <code>noto-color-emoji</code> (provides color emojis)
* <code>maliit-keyboard</code> (provides on-screen keyboard on Wayland)
* <code>maliit-keyboard</code> (provides on-screen keyboard on Wayland)
* <code>power-profiles-daemon</code> (enables the power profile functionality in Plasma. Make sure its systemd service is automatically started when the package is installed!)
* <code>power-profiles-daemon</code> (enables the power profile functionality in Plasma. Make sure its systemd service is automatically started when the package is installed!)
* <code>switcheroo-control</code> (provides proper hybrid/multi-GPU detection)
* <code>xdg-desktop-portal-gtk</code> (syncs font settings to Flatpak apps when run in Plasma)
* <code>xdg-desktop-portal-gtk</code> (syncs font settings to Flatpak apps when run in Plasma)
* <code>xsettingsd</code> (GTK theme changes without restart; Flatpak GTK theming; and since 5.27, GTK/X11 HiDPI scaling)
* <code>xsettingsd</code> (GTK theme changes without restart; Flatpak GTK theming; and since 5.27, GTK/X11 HiDPI scaling)
* <code>orca</code> (Screen reader for visually impaired users)
* <code>qt-imageformats</code> (provides support for Webp and other formats, letting Dolphin display previews and Gwenview open these files)
* <code>systemd-coredumpd</code> (Global crash handler for drkonqi. Alternative handlers such as ABRT or apport can be used instead of drkonqi+coredumpd)


== Packages to avoid ==
== Packages to avoid ==
There are certain packages that are known to cause issues with KDE software and should not be pre-installed. They are outlined below:
There are certain packages that are known to cause issues with KDE software and should not be pre-installed. They are outlined below:


* <code>qt5ct</code> (conflicts with <code>plasma-integration</code> and breaks the look and feel of Qt software when run on Plasma. Ideally this package would be marked in your packaging as conflicting with <code>plasma-integration</code>, so only one at a time can be installed!)
* <code>dunst</code> (will take over Plasma notifications)
* <code>ibus 1.5.28 or earlier</code> (while it can be useful for some users, it is confusing for most, as it ignores keyboard layout configuration from System Settings and displays an out-of-sync extra layout indicator. On X11, uninstalling IBus breaks keyboard input in apps until session restart. On Wayland, IBus only displays a notification about incompatibility with Plasma Wayland. These issues are resolved with IBus 1.5.29 and it is fine to use it with Plasma. Note that <code>ibus-data</code>, without the daemon, is used by Plasma's emoji input panel)
* <code>mako</code> (will take over Plasma notifications)
* <code>qt5-qdbusviewer</code> (clutters up launcher menus; safe to omit)
* <code>qt5ct</code> / <code>qt6ct</code> (conflict with <code>plasma-integration</code> and break the look and feel of Qt software when run on Plasma. Ideally these packages would be marked in your packaging as conflicting with <code>plasma-integration</code>, so only one at a time can be installed!)
* <code>xdg-desktop-portal-gnome</code> (conflicts with xdg-desktop-portal-kde and breaks various things)
* <code>xdg-desktop-portal-gnome</code> (conflicts with xdg-desktop-portal-kde and breaks various things)
* <code>xorg-x11-drv-wacom</code> (breaks touch events on X11, not needed anyway because Libinput can handle tablets)
* <code>xorg-x11-drv-wacom</code> (breaks touch events on X11, not needed anyway because Libinput can handle tablets)
* <code>qt5-qdbusviewer</code> (clutters up launcher menus and is only used for the "Launch D-Bus browser" functionality in the deprecated KHotkeys KCM; it's safe to omit)
 
== KWin package configuration ==
Make sure the kwin_wayland binary has CAP_SYS_NICE set; this is done by KWin's CMake code but may not be preserved in distro packages. This is necessary to make KWin more responsive by giving specific threads real time scheduling, and by allowing KWin to use a higher priority GPU context than other applications.
 
== Kernel configuration ==
SimpleDRM should be enabled by default. To do this, all <code>CONFIG_FB_*</code> kernel build options for framebuffer drivers should be disabled in the Kernel config, and <code>CONFIG_DRM_SIMPLEDRM=y</code> and <code>CONFIG_SYSFB_SIMPLEFB=y</code> should be set.
 
Make sure to set up systemd-coredumpd correctly using a core_pattern handler https://man7.org/linux/man-pages/man5/core.5.html
 
== Proprietary NVidia driver configuration ==
When your package manager installs the proprietary NVidia driver, do the following:
* Set the <code>nvidia_drm.modeset=1</code> kernel driver option, or else the Wayland session doesn't work.
* Set the <code>NVreg_PreserveVideoMemoryAllocations=1</code> kernel driver option to avoid issues with suspend and wakeup. '''IMPORTANT:'''  also activate th the appropriate pre-suspend hooks, which are shipped with the NVidia installer as systemd unit files: <code>nvidia-suspend.service</code>, <code>nvidia-hibernate.service</code>, and <code>nvidia-resume.service</code>. NVidia doesn't set the kernel option by default because if those hooks are missing, it can break suspend, so be sure to verify that they're in place and afterwards test that suspend still works.
 
For more information, see https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend.


== Systemd configuration ==
== Systemd configuration ==
Line 69: Line 97:


So consider reducing the timeout to 5 seconds or less.
So consider reducing the timeout to 5 seconds or less.
== Fontconfig configuration ==
To ensure that color Emojis work in Qt apps, place a file with the following contents in <code>/usr/share/fontconfig/conf.avail/99-noto-mono-color-emoji.conf</code>:
{{Input|1=<nowiki>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias>
    <family>serif</family>
    <prefer>
      <family>Noto Color Emoji</family>
    </prefer>
  </alias>
  <alias>
    <family>sans-serif</family>
    <prefer>
      <family>Noto Color Emoji</family>
    </prefer>
  </alias>
  <alias>
    <family>monospace</family>
    <prefer>
      <family>Noto Color Emoji</family>
    </prefer>
  </alias>
</fontconfig>
</nowiki>}}


== PulseAudio/PipeWire configuration ==
== PulseAudio/PipeWire configuration ==
Enable the module-x11-bell module by default; this makes GTK apps run in a Plasma X11 session (i.e. without Mutter, which does this itself) play nice sounds instead of horrible jarring system bell beeps! This is not needed if you ship without the X11 session, as the issue it fixes only affects X11.
Enable the module-x11-bell module by default; this makes GTK apps run in a Plasma X11 session (i.e. without Mutter, which does this itself) play nice sounds instead of horrible jarring system bell beeps! This is not needed if you ship without the X11 session, as the issue it fixes only affects X11.


== Samba sharing configuration ==
== Samba sharing configuration ==
Line 104: Line 106:


{{Input|1=<nowiki>
{{Input|1=<nowiki>
   usershare path = /var/lib/samba/usershares
   usershare path = /var/lib/samba/sambashares
   usershare max shares = 100
   usershare max shares = 100
   usershare allow guests = yes # optional line
   usershare allow guests = yes # optional line
Line 110: Line 112:
</nowiki>}}
</nowiki>}}


It's also helpful if the path specified at <code>usershare path</code> exists on disk, has a group owner named something like "usershares", and if all user accounts are members of that group. But these are optional steps as kdenetwork-filesharing is capable of doing these things itself.
It's also helpful if the path specified at <code>usershare path</code> exists on disk, has a group owner named something like "sambashares", and if all user accounts are members of that group. But these are optional steps as kdenetwork-filesharing is capable of doing these things itself.
 


== Firefox configuration ==
== Firefox configuration ==
Line 118: Line 121:


Install the [https://addons.mozilla.org/en-US/firefox/addon/plasma-integration/ Plasma Integration addon], and turn off Firefox's built-in media controls (which conflict with the ones offered by PBI) by setting <code>media.hardwaremediakeys.enabled</code> to false in about:config.
Install the [https://addons.mozilla.org/en-US/firefox/addon/plasma-integration/ Plasma Integration addon], and turn off Firefox's built-in media controls (which conflict with the ones offered by PBI) by setting <code>media.hardwaremediakeys.enabled</code> to false in about:config.
== Qt Virtual Keyboard ==
Don't compile with <code>FEATURE_vkb_arrow_keynavigation=ON</code>, a feature that is off by default. It interferes with the return key on X11 during SDDM and lock screen login when using the breeze theme.
See [https://bugs.kde.org/show_bug.cgi?id=478875#c51 comment on bugzilla].

Latest revision as of 04:09, 2 October 2024

This page collects recommendations for how distro packagers can ship the highest-quality and most complete Plasma session to their users.

If you're a user reading this as a reference point for how to get a complete Plasma session, it's highly recommended that you seek out and use your distro's "plasma desktop" meta-package. If you opt not to, consider this page to be an instruction manual for how to proceed correctly.


General packaging recommendations

  • For every KDE package you pre-install, also pre-install its optional CMake dependencies; it's okay if the user can remove them later, but they should be installed by default.
  • Avoid patching out mandatory or optional dependencies, as this will lead to KDE software missing functionality in ways that will be mysterious for users.
  • Avoid splitting single KDE source repos into multiple packages--especially those which provide runtime dependencies like QML modules. This is a common cause of runtime user breakage.
  • Use the Libinput input drivers by default; don't use Synaptics on X11 as it is unmaintained and provides a subpar experience with modern large buttonless touchpads compared to Libinput.


Recommended packages to pre-install

These are packages that we recommend you pre-installed by default, or install when the user installs your "KDE Plasma Desktop" metapackage.

Plasma packages

Generally pre-install every package in https://download.kde.org/stable/plasma/[latest release], except for the following:

Optional packages:

  • oxygen5 (it's the old Oxygen Plasma theme; this doesn't need to be installed by default)

Do not pre-install these Plasma packages for Plasma Desktop:

  • aura-browser (not intended for the desktop)
  • plank-player (not intended for the desktop)
  • plasma-bigscreen (not needed for the desktop shell)
  • plasma-mobile (not needed for the desktop shell)
  • plasma-nano (not needed for the desktop shell)
  • plasma-remotecontrollers (not needed for the desktop shell)
  • plasma-sdk (developer apps for Plasma; not generally user-relevant)
  • plasma-tests (internal testing harness; not user-relevant)

Non-Plasma packages

These packages are add-ons, extensions, and system tools that are not released with Plasma itself, but make the overall Plasma session nicer to use. They should be pre-installed:

  • baloo-widgets (provides extra information for Dolphin's Information Panel when the Baloo file indexer is on)
  • dolphin-plugins (provides a variety of useful plugins for Dolphin, including ISO mounting)
  • ffmpegthumbs (provides video thumbnailing plugin)
  • kde-inotify-survey (warns when apps are using all inotify watches and prompts the user to raise it; this can help users understand why Baloo in particular isn't working properly, and offers them a way to fix it)
  • kdeconnect-kde (provides remote mobile phone control; also make sure to whitelist its system service in your firewall, if you ship one)
  • kdegraphics-thumbnailers (provides PDF thumbnailing plugin, among others)
  • kdenetwork-filesharing (provides the Samba file sharing setup wizard)
  • kdepim-addons (provides a variety of useful addons for the PIM suite; only needed if you pre-install the PIM suite!)
  • kimageformats (provides support for AVIF, JXL and other formats, letting Dolphin display previews and Gwenview open these files)
  • kio-admin (provides a safe way to edit files as root)
  • kio-extras (provides the thumbnailing engine and many thumbnailing plugins, among other things)
  • kio-fuse (provides transparent access to non-KDE apps for files on remote locations)
  • kio-gdrive (provides transparent KIO access to Google Drive)
  • kwalletmanager (includes a System Settings KCM for KWallet)
  • phonon-vlc (this is the only maintained and supported Phonon backend for KDE apps that use Phonon for their multimedia needs; the alternative phonon-gstreamer has been unmaintained since 2013 and should not be shipped by default, or at all, ideally)
  • xwaylandvideobridge (exposes Wayland windows to XWayland-using screen sharing apps)

3rd-party packages

It is recommended to pre-install the following 3rd-party packages:

  • icoutils (needed for EXE file thumbnails)
  • iio-sensor-proxy (allows automatic screen rotation on Wayland)
  • libappindicator-gtk3 instead of the GTK2 variant for crisp status notifier systray icons. Note that this might break left click activation in the few apps that supported it in libappindicator, such as onboard.
  • noto-sans (provides the default font used for KDE software)
  • noto-color-emoji (provides color emojis)
  • maliit-keyboard (provides on-screen keyboard on Wayland)
  • power-profiles-daemon (enables the power profile functionality in Plasma. Make sure its systemd service is automatically started when the package is installed!)
  • switcheroo-control (provides proper hybrid/multi-GPU detection)
  • xdg-desktop-portal-gtk (syncs font settings to Flatpak apps when run in Plasma)
  • xsettingsd (GTK theme changes without restart; Flatpak GTK theming; and since 5.27, GTK/X11 HiDPI scaling)
  • orca (Screen reader for visually impaired users)
  • qt-imageformats (provides support for Webp and other formats, letting Dolphin display previews and Gwenview open these files)
  • systemd-coredumpd (Global crash handler for drkonqi. Alternative handlers such as ABRT or apport can be used instead of drkonqi+coredumpd)

Packages to avoid

There are certain packages that are known to cause issues with KDE software and should not be pre-installed. They are outlined below:

  • dunst (will take over Plasma notifications)
  • ibus 1.5.28 or earlier (while it can be useful for some users, it is confusing for most, as it ignores keyboard layout configuration from System Settings and displays an out-of-sync extra layout indicator. On X11, uninstalling IBus breaks keyboard input in apps until session restart. On Wayland, IBus only displays a notification about incompatibility with Plasma Wayland. These issues are resolved with IBus 1.5.29 and it is fine to use it with Plasma. Note that ibus-data, without the daemon, is used by Plasma's emoji input panel)
  • mako (will take over Plasma notifications)
  • qt5-qdbusviewer (clutters up launcher menus; safe to omit)
  • qt5ct / qt6ct (conflict with plasma-integration and break the look and feel of Qt software when run on Plasma. Ideally these packages would be marked in your packaging as conflicting with plasma-integration, so only one at a time can be installed!)
  • xdg-desktop-portal-gnome (conflicts with xdg-desktop-portal-kde and breaks various things)
  • xorg-x11-drv-wacom (breaks touch events on X11, not needed anyway because Libinput can handle tablets)

KWin package configuration

Make sure the kwin_wayland binary has CAP_SYS_NICE set; this is done by KWin's CMake code but may not be preserved in distro packages. This is necessary to make KWin more responsive by giving specific threads real time scheduling, and by allowing KWin to use a higher priority GPU context than other applications.

Kernel configuration

SimpleDRM should be enabled by default. To do this, all CONFIG_FB_* kernel build options for framebuffer drivers should be disabled in the Kernel config, and CONFIG_DRM_SIMPLEDRM=y and CONFIG_SYSFB_SIMPLEFB=y should be set.

Make sure to set up systemd-coredumpd correctly using a core_pattern handler https://man7.org/linux/man-pages/man5/core.5.html

Proprietary NVidia driver configuration

When your package manager installs the proprietary NVidia driver, do the following:

  • Set the nvidia_drm.modeset=1 kernel driver option, or else the Wayland session doesn't work.
  • Set the NVreg_PreserveVideoMemoryAllocations=1 kernel driver option to avoid issues with suspend and wakeup. IMPORTANT: also activate th the appropriate pre-suspend hooks, which are shipped with the NVidia installer as systemd unit files: nvidia-suspend.service, nvidia-hibernate.service, and nvidia-resume.service. NVidia doesn't set the kernel option by default because if those hooks are missing, it can break suspend, so be sure to verify that they're in place and afterwards test that suspend still works.

For more information, see https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend.

Systemd configuration

By default, stuck processes on logout are allowed to live to 120 seconds before being killed by systemd. This timeout is quite long, and in practice, 3-5 seconds is always long enough for processes to terminate normally; anything that takes longer is stuck and will need to be killed anyway, so you might as well do it sooner rather than later to avoid torturing users with long logout/shutdown/restart times.

So consider reducing the timeout to 5 seconds or less.

PulseAudio/PipeWire configuration

Enable the module-x11-bell module by default; this makes GTK apps run in a Plasma X11 session (i.e. without Mutter, which does this itself) play nice sounds instead of horrible jarring system bell beeps! This is not needed if you ship without the X11 session, as the issue it fixes only affects X11.


Samba sharing configuration

The aforementioned kdenetwork-filesharing package provides a wizard for setting up Samba shares. It's capable of fixing various omissions and misconfigurations, but it cannot edit the /etc/samba/smb.conf file, as such changes would be overwritten by package updates. So the /etc/samba/smb.conf file installed by your distro or its relevant Samba package should include the following lines in its [globals] section:

  usershare path = /var/lib/samba/sambashares
  usershare max shares = 100
  usershare allow guests = yes # optional line
  usershare owner only = yes

It's also helpful if the path specified at usershare path exists on disk, has a group owner named something like "sambashares", and if all user accounts are members of that group. But these are optional steps as kdenetwork-filesharing is capable of doing these things itself.


Firefox configuration

You can offer your users a better touchpad scrolling experience on X11 by setting the MOZ_USE_XINPUT2=1 environment variable in the environment. Note that this will introduce the bug described in https://gitlab.gnome.org/GNOME/gtk/-/issues/558, but it's fairly minor. On Wayland, this environment variable has no effect and is not needed.

Set widget.use-xdg-desktop-portal.file-picker=1 in about:config to make Firefox always use XDG portals for file pickers, which will make it use KDE's file picker instead of the GTK one.

Install the Plasma Integration addon, and turn off Firefox's built-in media controls (which conflict with the ones offered by PBI) by setting media.hardwaremediakeys.enabled to false in about:config.

Qt Virtual Keyboard

Don't compile with FEATURE_vkb_arrow_keynavigation=ON, a feature that is off by default. It interferes with the return key on X11 during SDDM and lock screen login when using the breeze theme. See comment on bugzilla.