Version 9 (modified by IanWadham, 8 years ago) (diff)

Add an up-front note about post-installation steps.


KDE is a world-wide community of hundreds of programmers producing Free Open Source Software (FOSS). Its central product is a desktop system equivalent to Apple Mac OS X or Microsoft Windows, but running on Linux and UNIX-based operating systems.

KDE also produces a range of applications, system programs, tools and utilities, many of which will run on Mac OS X or Windows, because they are based on the Qt framework, a set of C++ libraries and tools that is portable to several operating systems and hardware types.

KDE on Mac

On Mac OS X, Qt uses the OS X (Cocoa) widgets and window style, which means that KDE and Qt applications look and feel like other OS X applications. However, KDE is primarily meant to work on Linux and UNIX systems. Its use on Mac is still experimental. Many packages will work if you follow the instructions below, but some parts of KDE are not designed to work on this platform.

Some unexpected behaviours and glitches should be expected. Please provide feedback to the macports-users mailing list of your experiences, both good and bad.

Installing KDE with MacPorts

The KDE ports can be installed with MacPorts in the same way as other ports, such as here for the kdelibs4 port:

sudo port install kdelibs4

IMPORTANT NOTE: The user needs to perform some additional steps after installation (see below).

The dependencies are handled by MacPorts and should be installed automatically. Please note that several large packages are required by KDE, so that the installation or re-installation may take a few hours at first, but less time for subsequent KDE applications. It may be helpful to break the work into stages: first qt4-mac, then kdelibs4 and kde4-runtime and finally the KDE applications you require.

The ports contained in MacPorts essentially match the packages provided on KDE mirrors. Several ports end however with a "4", or start with "kde4-" in order to differentiate the ports from the ones of the older KDE version 3. KDE 3 became obsolescent in 2008 and is no longer supported, so KDE 3 ports should be avoided as far as possible.

A list of the available ports is provided below. It is also possible to get a full list by issuing one of the commands

port echo categories:kde4
port echo categories:kde4|grep -v 'kde-i18n-'|grep -v 'kde-l10n-'

The second command filters out the ports for translations of KDE applications into languages other than English.

Steps required after installation

Unfortunately, MacPorts does not provide an out-of-the-box working installation. There are some small steps which need to be performed by the user, which are listed below. You need to do them after you first install or re-install KDE ports. You do not need to repeat them when you install more KDE ports, but it does no harm.

Dbus is a messaging system between applications, which is mandatory for the KDE system. It is required to ensure that dbus is running by issuing the following commands after installation by MacPorts:
sudo launchctl load -w /Library/LaunchDaemons/org.freedesktop.dbus-system.plist
launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist

If these commands are not issued, KDE applications will crash without warning.

Kbuildsycoca4 is a command that refreshes the cache of KDE, which is required for many applications to work properly. In Linux and UNIX, this command is automatically run periodically, but this is not the case on OS X. The recommended way is to use the following command to automate its use, after installation of kdelibs4 by MacPorts:
launchctl load -w /Library/LaunchAgents/org.macports.kdecache.plist

The command can also be used manually:


If the command is not issued periodically (either automatically through the script above or manually), applications may run erratically.

Typically, some components of a large application might not be found at run time, so the application will fail to start properly or will have missing functionality. As a small example, the Palapeli jigsaw-puzzle game in the kdegames4 port has an option to create puzzles from the user's own pictures, but the option will not work until kbuildsycoca4 has run and recorded Palapeli's slicer modules in the KDE system cache.

Installation location

Like most of MacPorts ports, KDE ones install most of the applications in ${prefix}/bin, which defaults to /opt/local/bin. However, most of the KDE end-user applications are built as Apple's bundles (double-clickable apps), which are then installed in ${applications_dir}/KDE4, which defaults to /Applications/MacPorts/KDE4.

One should note that several applications save their preferences within a directory outside the MacPorts structure, located at ~/Library/Preferences/KDE. This implies that preferences are maintained throughout upgrades, but also that these files would not be handled by MacPorts upon uninstallation.

List of ports

List of main ports and structure.

In construction

List of Meta ports

Port-specific notes

Some ports require special instructions in order to work, which are listed below.

This port requires a specific variant of poppler, being +qt4 +quartz. If the installation of okular fails due to this dependency, the following commands should be issued:
sudo port install poppler +qt4 +quartz
sudo port clean okular
sudo port install okular

Additional information