Just because KDE has been designed to be portable across Linux,

FreeBSD and other UNIX/X11 environments for an age now, doesn't

mean we aren't up for the occasional challenge. With version 4, Trolltech released Qt for the

Mac, Windows and now even embedded environments under the GPL.

Since Qt is the base upon which KDE is developed, KDE is now free to

offer native support for these platforms. Today I am focusing on the KDE/Mac developments for KDE 4. Read on for the details.

Before I begin, I'd like to discuss some branding issues that KDE has had to face in previous releases. With KDE 3, does the term "KDE" refer to the Desktop Environment (KWin, Kicker, kdesktop, etc.) and if so, would it still be reasonable to refer to the Mac OS X port as "KDE" even if it was without these key desktop components? Or, is "KDE" a reference to the project as a whole, in which case we can still call Konqueror a "KDE application" whether it is running on Mac, Windows, or in Enlightenment...

These are some branding issues that have been discussed for KDE 4. The resulting decision has been to refer to "KDE" as the umbrella that refers to all things KDE. So, as a result, we have KDE Applications, the KDE Development Environment (libraries and technologies), and the KDE Workspace (this consists of KWin, Plasma, etc.) that refer to the three main components that make up the collection of KDE software. When referring to just "KDE" by itself, you therefore refer to all things KDE.

This also solves some issues with alternate release schedules for some applications. For example, Amarok has often released on a different schedule from KDE, and so some people have not considered it as part of KDE proper. Amarok for KDE 4 will be more clearly labelled as a "KDE Application" without the related implications of it being restricted to a given desktop environment. In KDE 4, Amarok is a KDE product, even if it is based on its own release cycle. As Amarok lead developer Mark Kretschmann says, "If Amarok convinces more people to use KDE technologies, that's perfect. If they use Amarok under other desktop environments like GNOME or Mac OS X, that's still nice for us."

Since this article deals with KDE on other platforms than X11, we need a way to distinguish between KDE for X11 and KDE for Mac. So, with the approval of some of the developers, I'm going to use the following terminology: KDE/X11 will refer to all KDE Applications that run on X11, the Development Environment on X11, and the KDE Workspace on X11. Likewise, KDE/Mac will refer to KDE applications that run on the Mac, the KDE Development Environment on the Mac, and since the workspace is not required on the Mac, it is not included here. Ditto for Windows. It is important to realize, however, that these distinctions are based on a subset of features that are available on each platform, and that for the most part the source code is identical, and there are not separate source trees for each platform. There are no forks or haphazard ports.

New KDE Development Environment technologies like Phonon and Solid will help ease this transition, since the platform-integration work will happen at the library level. KDE Applications need not be aware of the differences that might exist in the OS platform.

What is KDE/Mac?

KDE/Mac is the collection of KDE Applications that run natively on the Mac, including the underlying technologies, libraries, etc. that make these KDE Applications work. There are only a few differences between KDE/X11 and KDE/Mac. Most notably, the KDE Workspace elements, such as KWin and Plasma are not present for the Mac. The reason for this is that the functionality of KWin and Plasma already exist in OS X in one form or another, and reimplementing them would not allow for close integration of KDE Applications alongside existing Mac Applications. So instead, KDE has elected to not port the KDE/X11 Workspace to the Mac.

Since the beginning of KDE, its applications have been designed in such a way as to peacefully co-exist in other UNIX Desktop environments. Initially this meant Window Maker, and then later GNOME and Enlightenment. The KDE Applications use shared standards (such as those crafted at FreeDesktop.org), capable of sharing clipboard data, system tray icons, and so on without any issues on these compliant platforms. Now, because of the additional portability that Qt 4 offers, this same peaceful co-existence will also be true for non-X11 environments, such as the Mac.

KDE apps have been able to run on the Mac before, using Apple's X11 server layer that is built into OS X - however, KDE was still using Qt/X11 and as such, these applications simply looked identical to how they would look in good old KDE/X11 proper. The fact that they ran at all is thanks to the excellent efforts of the Fink project. If you're interested in running other UNIX programs on OS X, check this project out.

(For a time there was also a Qt/Mac Freeware edition which allowed some experimentation with a true KDE/Mac experience within the KDE 3.x series. However, The KDE/X11 version in Fink was usually used due to its stability.)

Here's a screenshot of a KDE application as it looked using KDE 3.5 and the Fink project's packages. Click for the full version.

Because the above was developed for Qt/X11, the whole KDE environment was able to run. The downside, however, was that it did not integrate well with the Mac, so it felt like you were running two totally different computer systems on one screen. Of course, KDE is all about the integration...

KDE 4 brings great advances to the Mac porting effort, thanks mostly due to Qt 4, and the new KDE build system, based on CMake. For KDE 4, the KDE/Mac applications are downloadable as standard issue, Mac .dmg files, available from the KDE on Mac OS X website. The KDE/Mac development snapshots are among the easiest to use for any platform, thanks mostly due to the great work done by KDE/Mac guru Benjamin Reed (a.k.a. RangerRick). Visit #kde-darwin on irc.freenode.org to help report and fix anything you see that is broken. This is pre-alpha KDE 4, so it's likely to crash until more development has taken place.

Once the downloaded packages are unpacked and installed, KDE/Mac applications can be launched using OS X's Finder as shown here:

As you can see, quite a wide variety of applications are already available for the Mac, including most of the official KDE applications. Because this is a development version, some things are still broken (like any apps using SSL) and some things are just plain ugly. But the same is also true of many KDE 4 apps on KDE/X11 at this point, so expect both offerings to improve throughout the KDE 4 development timeframe.

At the same time, some very important things have occurred in KDE/Mac integration. For example, the clipboard works. Keyboard shortcuts work. Extended language input works. Some things, like drag-and-drop remain sketchy. The KDE/Mac developers would welcome any fresh talent that knows a little about KDE and Mac technologies to help solve smaller issues like this.

Here's what you've been waiting for: the screenshot tour of a few KDE 4 apps that are working on the Mac to show off some of the progress so far. Some of these apps will surely be greatly appreciated by Mac users.

Since we've covered SVG in the first issue, I figured I would show a shot of SVG-goodness in action on the Mac. Below is Shisen Sho, a tile game that shares loadable SVG tilesets with KMahjongg, which was previously featured. This game looks beautiful on the Mac, and not at all out of place.

One of the main questions asked last week about KOffice was support for other platforms. I'm pleased to say that KWord, KSpread, and the rest of the KOffice suite should run on KDE/Mac just fine. In the development version I tested, KWord performed pretty much as the KDE/X11 version from last week. Additionally, I tried loading a few other KOffice applications to see if they work. Here's a shot of KSpread's Wizard, and the KDE 4 file dialog on the Mac.

Also notice how the KSpread icon shows up in the OS X dock. This didn't previously happen with KDE on Fink (The icon to the left of it is for kded, one of the KDE background processes, which will eventually be adjusted to hide itself when running on the Mac).

Of course, the real question everyone is asking is: does Konqueror work? Yes. The KDE 4 version of the Konqueror application is mostly a port of Konqueror from KDE 3.5 at the moment, but the backend libraries such as the KHTML rendering engine and Javascript support have seen a lot of fixes and improvements. On the Mac, due to the OS X user interface styling in Qt 4, we get centred tabs during tabbed browsing, as seen below:

The Mac has made a name for itself as a premier Desktop for graphical and multimedia applications. Unfortunately, the KDE Graphics package was not included in this snapshot so I can't show it off.

However, another niche that the Mac proudly occupies is that of education. Below are two of the great applications from the KDE-Edu project: Kalzium and KStars. New features that are showing up in KDE-Edu will be featured in a later article... for now, it's just important to note that these superb applications will be available and fully functional for KDE/Mac.

And now that the tour is done, a couple of other things that come up whenever KDE is discussed on other platforms.

While I was researching this article, I encountered some people that object to running KDE apps on a non-free platform, with sentiments on IRC alike to "Anytime you run OSS on a non-free platform, God kills a puppy. A cute puppy."

But KDE has good reasons for supporting other platforms: attracting developers, and fostering interoperability and standards. There are a huge number of Mac and Windows developers out there and therefore a large amount applications that can take advantage of KDE technologies. The best example of a KDE technology benefitting from exposure to other platforms is KHTML/WebKit. As a side effect, since there are so many users of KHTML-based browsers now, websites have had to improve their standards compliance in order to be more compatible, which means more websites work in Konqueror. This will hopefully also happen with OpenDocument and free software groupware systems as KOffice and Kontact push onto other platforms.

In the meantime, have a look at yesterday's KDE Commit-Digest for some information on the progress of Windows platform support.