The Road to KDE 4: Full Mac OS X Support

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.

Comments

by Simon Roby (not verified)

What the hell? KDE News is retarded. I entered my email address so I can get a notification, I certainly did NOT want my email address to be visible by anyone (especially harvesters).

by Louis (not verified)

One of the most attractive features of KDE, in my opinion, is how all my apps work so nicely together. If I right-click an album in Amarok, I can tell it to burn it to CD. K3B pops up with the tracks ready to burn. If I go to a web page that needs a login, my Wallet pops up and delivers my credentials. The list goes on and on. I can't imagine that integration like this will be so good on other platforms (maybe I'm wrong). For that reason KDE Workspace will always be my preferred environment. That said, I have to use Windows at work, and it will be nice to have Kontact and Konqueror there, even if the integration is not as good. Troy, another great article. Thanks.

by kollum (not verified)

I belive it will be the #1 reason for a win/mac KDE-apps fan to switch to an open-source UNIX.

KDE ads guy may have some work in this area.

by Jim (not verified)

If I understand it correctly KDE 4 applications for MAC and WIN will be ready and functional before the K Desktop Environment 4.0 release. That leads to the absurd situation that KDE4 applications can already be developed for and run on other plattforms but not for Linux which has to stay with the 3.5.x release circle, right? Actually it is a good idea to have a working playground for programs, so KDE4 application development is not restricted by the wait for KDE4.0. It is always a bit strange to develop applications for an environment which is not already in productive use.

by Troy Unrau (not verified)

You misunderstand. KDE/Mac is using the same source code as KDE/X11. They are at the same stage of development. The applications I took screenies of do exist and run just as well on X11. The stable versions will be released concurrently, barring any packaging delays.

You can get KDE 4 development snapshots for Linux, depending on your distro, or compile them yourself (which is what I do for my articles). All RangerRick did is build some snapshots of the current KDE 4 source code for the Mac, since not everyone has the patience for building their own code. Kubuntu does the same thing.

The KDE 4 APIs have not yet stabilized, so I would suggest that developers refrain from writing their comp sci thesis programs on it yet, at least until we start getting some official beta releases.

by Jakob Petsovits (not verified)

Of course, you can get and develop for KDE on Linux just as well, if not better than on Mac OS and Windows. In fact, most of the KDE developers are developing KDE on Linux. It's just that current KDE 4 is still pre-alpha, which means that there are hardly pre-built packages out there so you have to compile it by yourself. (But then, openSUSE already has got a KDE 4 development snapshot packaged, and Kubuntu 7.04 is planning to do the same.)

Getting and running KDE 4 requires a bit of hassle everywhere, not just on Linux. If you want to develop for KDE 4, you need to set it up from its Subversion repository anyways, so no way going with easy pre-built installable packages. Well, yeah, you can stay with one of the occasional snapshots, but they are pretty much outdated in 2 or 3 weeks or so, because the libs are still in flux.

by Henry S. (not verified)

I have a question. Is it possible to use the native Open/Save/Print dialog
boxes? I think it is a little weird to show the KDE dialogs on the Mac. Of
course this is the same problem you run into when running KDE apps in Gnome...
which means the answer would probably be the same, which is to use the Portland project's intended solution.

by Ralesk (not verified)

Or Gnome apps on KDE -- but yeah, you're right and I think it's indeed favourable to have native open/save windows!

by Odysseus (not verified)

I've been wondering how we intend to deal with Print and Scan on non-nix platforms, especially Windows? The standard kprinter and libkscan only support CUPS and SANE, which while they work under Windows are not exactly optimal from a user, support or dependency/installation standpoint. Will Solid be providing some level of abstraction for these to use the native Windows systems and drivers?

John.

by otherAC (not verified)

kprinter supports every available printing subsystem onder unix, not only cups.
Under windows, it should just hook into the printing subsystem of that operating system ;)

by ac (not verified)

CUPS works on Windows???? You're telling news to me...

by Tanner Lovelace (not verified)

CUPS is the standard printing backend on OS X, so KDE should be pretty set in that respect.

by ljones (not verified)

Isn't this a bad idea overall?

If some part of kde or (even worse kdelibs) were developed on windows or OSX then surely some programmer somewhere could incert specific code ment only for windows or OSX into KDE? What if - say - a programmer decided he or she would like an activex control somewhere in kde or kdelibs? The result -- a program which is tied only to the ms platform.

This idea surely has the potential to ruin KDE? Programs which will run on one system, but not another .... wouldn't KDE on gnu/linux just get left behind?

ljones

by Jaroslaw Staniek (not verified)

We have self-controlling policy, not mentioning the Technology Working Group that controls that. Moreover, it's open source what prevents such threats. Portability is our preference.

by ljones (not verified)

Well, policies can change -- if it's a policy isn't it within reason that KDE could go from open source to a mozilla style licence, or even a propietary licence?

Personally I find the argument that the technology working group and portability a little bit weak to be honest. The technology working group could disagree or approve ms/mac specific code at some future point. And portability can never really be achived, for some things (for example) with windows you *need* propietary stuff to do some things (or they can't be done at all), eg with directx.

Let me tell you what I fear. That KDE ends up just as a "ooh, a cool looking win/osx gadget/window set" with the linux version left forgotten.

Does KDE care about OSS/Linux, or is the future roadmap a propietary one eventually with a pricetag?

ljones

by Robert Knight (not verified)

> Well, policies can change -- if it's a policy isn't it within reason
> that KDE could go from open source to a mozilla style
> licence, or even a propietary licence?

Short answer: No, it is not within reason.

Long answer:

The copyright over the KDE code is not assigned to any central body. Rather, the copyright for each source file belongs to the people who wrote them. Changing the license would, in theory at least, require the consent of at least every major KDE contributor whose code is still in existence.

It would be easier to change GCC or Emacs to a non-free license than KDE, since there the copyright is assigned to the Free Software Foundation.

> The technology working group could disagree or approve ms/mac
> specific code at some future point

There is already Windows and Mac specific code in KDE, there has to be since the one goal of the KDE libraries is to hide the differences in underlying platforms and present a common interface to the developer using the libraries.

What you are asking is "will there be an MS/Mac specific feature" at some point. Quite possibly, a developer can write an interface and provide the Windows code to implement that interface and not the Linux code to do so. But as long as the majority of KDE users work primarily with free operating systems, those versions of KDE are likely to provide the best experience.

> Does KDE care about OSS/Linux, or is the future roadmap
> a propietary one eventually with a pricetag?

KDE is a community of people, not a company, and it must be treated as such. There is no roadmap. The future is determined by the people who develop it.

by DarkDust (not verified)

Since I'm a new Mac convert, I'm totally thrilled by KDE/Mac as I've been a KDE/Linux user for about seven years now. And there is only one thing that I really, really miss on my Mac: KMail. And KDE/Mac means I just have to be a little patient and my prayers for a (seamless) KMail on my Mac will come true ! This is too good to believe :-)

by paperclip (not verified)

I would love if we could use KDE to replace the finder and the Doc. We should have an option to use KDE/MAC without Finder and Doc on. I know people will be pissed that I suggested this--but I really hate the MAC OSX DOC/Finder.

by Troy Unrau (not verified)

Why don't you just install linux then?

by m_abs (not verified)

I've a macbook and I'm really looking forwards to this, as there are several applications I'm missing from my stationary Gentoo Linux PC with KDE3.5.

- A really great music player and manager, iTunes is IMO just terrible, so I hope the amaroK team will make amaroK 2.0 available for OS X.
- kopete, for multi protocol IM.
- A good filemanager with network (fish, ftp etc) capacity (konqueor) so I can use easily transfer files over network.
- And a lot of small games to pass the time in the two hours I spend on train each day to and from work.

And of cause I prefer to have the same applications on both my laptop, work pc and home pc. ;)

I'm currently using the snapshots of KDE4 from http://ranger.users.finkproject.org/kde/index.php/Home
to have a glimpse of the future of KDE4 and to help find bugs in the applications so I can report them.

by Erik (not verified)

I have some even more exciting news for you: http://gentoo-wiki.com/HARDWARE_Apple_MacBook

by m_abs (not verified)

Yeah, that's nice too.

However I do like OSX, just missing a few high quality apps ;)

But maybe you can point me to the one feature I actually needs from OSX, encrypted home-dir (in apple speak, FileVault). All apps I need is available under Gentoo, and it will make my job as a developer a lot easier since we develop on Linux in-house.

FileVault is a feature that mounts an encrypted image-file containing my home-dir when I login, inaccessible without the correct password, on logout it is of cause umounted.

I know that Linux can mount encrypted images/partitions, but I need something that works just as well as FileVault. I think that pam can do it with the right extensions, but I've failed to find a guide for setting it up.

by daniel.bagge (not verified)

A really great music player and manager, iTunes is IMO just terrible, so I hope the amaroK team will make amaroK 2.0 available for OS X.
- kopete, for multi protocol IM.
- A good filemanager with network (fish, ftp etc) capacity (konqueor) so I can use easily transfer files over network.
- And a lot of small games to pass the time in the two hours I spend on train each day to and from work.

Music player: If not iTunes then maybe Songbird, Cog or maybe VLC with a cool skin?
IM: Why Adium of course! There are even ports of Adium skins and extras to Kopete :)
File magager: Well... For FTP there's allways Cyberduck. I'ts agreed that the built in File manager in OS X is outdated. Let's hope for a new one in OS 10.5!

Check out this list for other open source mac apps: http://www.opensourcemac.org/

by Schalken (not verified)

I think its fantastic that KDE applications be portable to Windows and Mac OSX, because at the moment if someone considers making an application for Linux/Unix, it means it (generally) won't be available on more popular platforms without adding some layer of abstraction like XUL or actually fork/port it. Now that will no longer be true! This is therefore a huge stepping stone in promoting software development on open platforms.

I just hope its easy to make sure a KDE app is sexy and integrated on all three platforms. This raises a few other questions as well. What happens to KControl and the configuration that it sets on these platforms? Will the printing and file management interfaces still work with native dialogs while appearing as one to the developer?

by devon gleeson (not verified)

If people become comfortable using the greatness that is KDE apps under OS X they are more likely to try it out on their PC. Also I must say this made my day. I love kde apps like digikam and amarok and I use them religiously on my linux/gnu desktops. But to put it simply os x has better wireless support for when I'm on the move. I've been wanting to port, or see some one port these apps to OS X, because I hate the X11 sweet for the mac platform. Keep up the good work I'm looking forward to KDE 4.

by Iano (not verified)

Any chance of Kile being ported. Honestly, I can't live without it.

by david Waites (not verified)

I, too, would really appreciate having Kile ported. For me, it is really the only reason to run KDE on my Mac. Kile is also really the most useful of the TeX/LaTeX editors that is out there, having features that its little brother TeXmaker doesn't have. I have tried to get it going myself, but I don't have the Mac programming skills to succeed.

by iStarTAC (not verified)

Another guy who thinks Kile is the best LaTeX IDE and can't live without it :|

by Hugo Pacheco (not verified)

you have a kde3 port of kile in mac fink unstable packages, however it still lacks some integration with my latex installation.

by Tero Keski-Valkama (not verified)

Also the clipboard integration doesn't work pre-KDE4.

So copying and pasting text between OS X applications and X applications, and consequently between OS X and KDE3 does not work. This is a huge pain with Kile.

I'm under an impression that KDE4 should fix the clipboard integration, since it is not based upon X11 anymore.