Wechsel auf KDE SC 4.4

Einige werden es ja wissen, dass ich aktuell an meiner Masterthesis arbeite und dafür Akonadi aus der KDE Plattform in Version 4.4 einsetze. Es ist für meine Aufgabenstellung die perfekte Lösung. Nun nutze ich viele der Neuerungen in KDE SC 4.4 – nicht nur von Akonadi, sondern auch die neu Lösung des Systemabschnitts (Status Notifiers).

Nun hatte ich das Problem, dass ich das ganze schlecht testen konnte. Da die Status Notifier in KDE SC 4.3 nur experimentell waren und die API sich geändert hat, konnte meine 4.4 Anwendung nicht mit dem 4.3 Workspace „sprechen“ und die Funktionalität war nicht vorhanden. Meine Lösung für das Problem ist eigentlich ein zweiter X Server in dem eine reine 4.4 Sitzung läuft. Unglücklicherweise meint mein System aktuell sich aufzuhängen, wenn ich zwischen X Sessions wechsel. So auch heute als ich wieder testen wollte.

Da ich mittlerweile soweit bin, dass ich über den Einsatz im Produktivsystem nachdenke (d.h. ich vertraue meiner Implementierung so weit, dass ich sie auf meine E-Mails loslassen werde und keine Angst mehr vor Datenverlust habe) brauche ich eine 4.4 Sitzung. Also nach dem freeze bedingten Neustart hat es mir gereicht und anstatt in die 4.3 Sitzung hab ich zum ersten Mal mein Produktivsystem in das selbstkompilierte 4.4 gestartet.

Bisher hatte ich 4.4 immer nur zum Testen eingesetzt und das ist ja nicht wirklich vergleichbar. Nun sehe ich also zum ersten Mal im produktiven Einsatz die Früchte der Arbeit des letzten halben Jahres. Und ich bin wirklich begeistert. Das System fühlt sich bedeutend flüssiger an, die leichten Animationen fallen nicht störend auf, sondern machen das System angenehmer. Auch meine eigenen Implementierungen machen sich sehr gut: Alt+Tab ist eine tolle Verbesserung im Vergleich zu vorher und auch Aurorae gefällt mir gerade sehr gut – mittlerweile gibt es ja einige nette Themes. Von den anfänglichen Performance Problemen merke ich auch nichts mehr. Generell ist das Vergrößern der Fenster bedeutend angenehmer geworden.

Insgesamt fühlt sich 4.4 schon sehr rund an. Die Veränderungen sind größtenteils gering aber sehr nützlich. Hier sei bespielhaft die Verbesserungen von KRunner erwähnt: das Interface erscheint nun von KWin animiert an der oberen Bildschirmkante, die Einstellungen sind direkt in das Interface integriert und es gibt bedeutend mehr und sinnvolle Runner (auch einen von mir 😉 ).

Mit der jetzt von mir eingesetzten Version, die in etwa der Beta 2 entspricht, bin ich sehr zuversichtlich, dass 4.4 ein tolles und rundes Release wird. Wenn man mal überlegt wo die Community vor zwei Jahren stand… Nun haben wir die Säulen mit Nepomuk und Akonadi endlich integriert und der KDE Plasma Desktop ist einfach nur umwerfend. Ich war ja schon von 4.0 begeistert (vom technischen Standpunkt aus gesehen), aber dass sich das Produkt so hervorragend entwickelt, hätte ich dann doch nicht für möglich gehalten. Wer jetzt noch KDE 3.5 will, ist selber Schuld 😉

=-=-=-=-=
Powered by Blogilo

About click through interfaces

I just read about Colibri and that motivated me to write a blog post I wanted to write for a long time. First of all I think it’s an improvement that the Ayatana notifications are now packaged and not patched into the system as in Karmic – one of the reasons why I am using Debian, now 😉 (I still think that notifications are a central part of the workspace and that a downstream should respect it’s upstream’s decision on that point.)

But that’s not the point of this post. I want to talk about click through. Aurélien advertises the Colibri notifications as click through, that you can interact with the window underneath. I think that is the failure by design of the Ayatana notifications. The fact that it’s missing actions in the notifications is just a consequence of it.

So what’s the problem with the click through? It requires compositing. A click through is only useful if the window you click through is translucent. But we do not always have compositing. There are systems where it still doesn’t work – even new ones. There are users who don’t want to use it and there are situations when kwin just turns it off due to bad performance.

Consider the situation that you are a user of a non composited environment and the notifications are shown on the upper right as in Aurélien’s screenshot. A notification appears and you click on it so that it goes away, because you do not know that they are queued. The window underneath the notification will be closed in the worst case if the click hit the close button. That’s probably not what Joe User expects. So when the environment is non-composited a click-through is a no go. The same is true if the notification is opaque or hardly translucent. But based on the description they fade away, so that is not a problem.

A solution to the non-composited environment is to make the notifications not click through when compositing is turned off. But that has drawbacks as well. Consider the situation that an experienced user knows about the click through and suspends compositing (something I do quite often). Now a notification appears and he wants to interact with the window underneath as he knows the geometry. The click is eaten by the notification although he expects that it goes through. So in that case we have a behavioral change which is in my opinion as bad as the not expected click through.

So we see as soon as compositing is turned off it breaks. So the fault in the Ayatana specification in my opinion is that functionality depends on visual representation. I’m pretty sure such a mistake would not have happened in Plasma as there are devs who can’t use compositing: "Erm you want to do that? I don’t have compositing that wouldn’t work for me." In kwin as well we ensure that compositing only adds additional features without breaking anything if compositing is turned off that is all compositing features are optional effects.

And just to make sure: this is of course no critic to Aurélien’s work. AFAIK he joined Canonical after the spec was designed and he just implemented the KDE part. I also appreciate that Ayatana is now using KDE’s status notifier spec instead of inventing yet another solution. So most of my critics on Ayatana’s approach which drove me away from Kubuntu are not valid any more (except the point mentioned in this post).

=-=-=-=-=
Powered by Blogilo

Fensterdekoration hinter transparenten Fenstern

Gestern kurz vor dem harten Feature Freeze für KDE SC 4.4 hat KWin noch ein tolles neues Feature erhalten: die Fensterdekoration kann hinter transparenten Fenstern gezeichnet werden. Seht selbst:

Aktuell wird dies in Aurorae, der einzigen transparenten Deko, unterstützt, aber noch von keiner Anwendung. Da dies aber als Erweiterung des Standards vorgeschlagen ist, dürfte es in Zukunft Anwendungen geben, die dies nutzen. So hab ich mal gelesen, dass Mozilla für Firefox ein solches Feature nutzen möchte. Dies ist nun die Lösung auf der X11 Plattform.

=-=-=-=-=
Powered by Blogilo

Window decoration behind translucent windows

Yesterday evening just before the hard freeze a nice feature was added to KWin: window decoration painted behind translucent windows. Have a look:

Currently it’s supported by Aurorae, our only translucent decoration, and I think there are no applications yet which use the feature. But as it is proposed as an addition to EWMH I’m sure there will be in future. Somewhere I read that Mozilla Firefox wants to use translucent backgrounds. So that is your solution for the X11 platform.

Well this feature illustrates that we need a blur effect 😉

=-=-=-=-=
Powered by Blogilo

Working on KWin Shaders

This weekend I worked on some KWin OpenGL Shaders. That is I wanted to bring back the blur effect. It seems like many users want to have the effect and well with translucent window decorations a nice blur is kind of needed (yes we get compared to Windows 7 and that blur is really well done). The first results look very promising: it’s fast and doesn’t render artifacts to the screen. But I decided to not rush it into 4.4 as there are still some minor glitches around the decoration shadows which render the nice Oxygen glow useless. As well the blurring is not yet as nice as one produced by Krita. I will merge the branch as soon as trunk is open again and so we will have a blur effect in 4.5 again 🙂

But blurring is not the only OpenGL shader I started to work on this weekend: I started to implement a shader to replace the complete fixed functionality rendering of KWin. Our current rendering uses lots of OpenGL 1 commands as we also want to support older hardware. We have some OpenGL 2 shaders like the blur which replace parts of the fixed functionality.

In OpenGL 3 the fixed functionality is deprecated, in OpenGL ES 2.0 it’s even completely removed and replaced by the programmable pipeline. So getting the rendering completely into a shader is a prerequisite for using the new awesome stuff of OpenGL 3 like geometry shaders as well for porting KWin to OpenGL ES.

So why porting to OpenGL ES? Well I would like to see KWin running on Hardware like the N900 🙂 I think that KWin although developed for the desktop would be a nice window manager for small devices. We have some outstanding effects and a great decoration API as well as a nice SVG decoration engine when you don’t want to write your own decoration. And of course we see that some projects use Clutter based window managers for their small screen systems and it would be nice to provide an alternative, a window manager which is rock solid and has been used with compositing enabled by default for now almost a year – in some distributions already since KDE 4.1. And last but not least optimizing for small devices is useful for desktop systems as well.

So after spending some hours hacking the basic window rendering is implemented in a shader and if the shader is bound no deprecated OpenGL functions are used. Not only the basic rendering is supported, but some effects like present windows, desktop grid or even cover switch (as long as not using multiple screens) work as well. Other effects like cube, all shader effects or important benchmarking tools like fps are completely broken 😉 (Nevertheless my completely unprofessional benchmark called “top” looks very promising – kwin is not shown any more when idling or just doing a few repaints).

I don’t know when I will have something that could be shared as my development time is currently very limited and I only work on KWin at weekends. As well for the OpenGL ES part it could be a problem that I don’t have any hardware 😉 For OpenGL 3 it’s no problem as the drivers I use support it. I hope to have it in a state to push to trunk when it gets unfrozen.

=-=-=-=-=
Powered by Blogilo

Neuer KWin Spaß

Heute war irgendwie der große “wir bereiten KWin auf KDE 4.4 vor” Tag. Es wurde der Window Tabbing Branch gemerged. D.h. KWin unterstützt nun Tabs für Fenster, man kann beliebige Fenster zu einer Gruppe zusammenfügen. Wer also wie in Chromium für jede Webseite einen eigene Browserinstanz haben will ohne viele Fenster, hat nun eine Lösung. (Natürlich hat KWin keine Ahnung, dass die Tabs z.B. ein Browser sind und bietet daher auch keine Unterstützung für Neu Laden, etc.)

Tabbing ist standardmäßig aktiviert, man muss nur die Fensterdekoration mittels mittlerer Maustaste Drag&Drop auf eine andere Deko ziehen. Mit Oxygen sieht das auch richtig toll aus. Andere Dekos unterstützen es noch nicht, ich hoffe die Zeit zu finden Unterstützung in Aurorae zu implementieren. Mehr Infos zu Tabbing findet man hier.

Ich hätte mich dieses Wochenende auch mit Tabbing beschäftigen können, stattdessen hab ich Present Windows und Desktop Grid verheiratet. D.h. wenn man Desktop Grid aktiviert, werden die Fenster mittels Present Windows angeordnet und das ganze sieht dann so aus:

Von KWin

Desktop Grid nutzt dabei Internas von Present Windows, leider ist es (noch) nicht möglich den Filter oder die Mauskürzel zu verwenden. Dazu müssten die Effekte schon verschmolzen zu werden, oder nach dem neuen Channel Topic:

One effect to rule them all. One effect to find them,
one effect to bring them all and in the darkness bind them
in the Land of KWin where the Wobbliness lies.

=-=-=-=-=
Powered by Blogilo

Desktop Grid with Present Windows

One effect to rule them all. One effect to find them,
one effect to bring them all and in the darkness bind them
in the Land of KWin where the Wobbliness lies.

I wanted to present a video of it, but recordmydesktop does not want to record my desktop. So here is only a screenshot of new KWin fun:

Von KWin

Desktop Grid uses Present Windows (if activated) to lay out the windows as you might know from the previews of GNOME Shell or Mac OS Spaces. In the not existing video you can see that dragging the windows from one desktop to the other is nice and smooth. As soon as the dragging starts the windows on the starting desktop will be rearranged and the window, which is being moved is, bound to the cursor. When dropping the window onto another desktop the windows start to rearrange immediately.

The Present Windows effect has a proxy which allows other effects to call some of the methods from Present Windows. So Desktop Grid uses the proxy to get the layout for a group of windows. The proxies are also used in other effects, e.g. Sliding Popups disables the Fade animation and CoverSwitch uses a proxy to get the thumbnail bar from BoxSwitch.

Other goodies from Present Windows like filtering or mouse actions are not used. Therefore the effects have to be merged to become the one effect to rule them all. (Yes The Lord of the Rings is currently again the book on my bedside table.)

=-=-=-=-=
Powered by Blogilo

KWin Cube Gears

Ich hab ein Versprechen gebrochen, das Versprechen niemals den sinnlosesten Compiz Effekt in KWin zu implementieren: cube gears. Ich war gestern nicht motiviert genug um produktiv zu arbeiten und hab gedacht “schau dir doch einfach mal an wie Compiz die Zahnräder darstellt”. Ich hab’s mir angeschaut und es gibt nicht viele Compiz Abhängigkeiten, es werden einfach Zahnräder gezeichnet. Also hab ich den Code genommen und in den KWin Würfel eingefügt und ein Zahnrad war da. Irgendwie witzig, dass der unwichtigste Effekt portierbar ist, und alle nützlichen an Unmöglichkeit grenzen 😉

Hier das Beweisviedeo:

Für die, die das eingebettete Flash nicht sehen: Download

Es gibt ein paar Unterschiede zum Compiz Effekt: die Rotation ist ausgeschaltet weil sie schlecht aussieht. Im Gegensatz zu Compiz nutzen wir keinen Tiefenbuffer und daher kann es zu Darstellungsfehlern kommen. Man sieht sie auch wenn man manuell den Würfel rotiert. Daher bin ich mir unsicher, ob ich den Effekt in KDE 4.4 einfügen werde. Vielleicht ist es ja an der Zeit den Tiefentest in KWin auch zu verwenden (wäre auch in anderen Effekten nützlich – z.B. FlipSwitch und CoverSwitch).

Cube Gears

I broke a promise, the promise to never ever implement the most useless Compiz effect in KWin: cube gears. Well I was not motivated enough to work in a productive way yesterday and thought “just have a look on how Compiz does the gears”. I looked at it and there aren’t many Compiz dependencies, it’s just painting gears. So I just took the code added it into cube and there was a gear. Kind of funny, that the most useless effect can be ported while the useful ones seem to be impossible 😉

Here the video as proof:

For those who don’t see the embedded flash: download

There are some differences to the Compiz effect: the rotation is disabled as it looks very bad. In opposite to Compiz we don’t use the depth buffer and so there can be glitches. You can see them when rotating the cube manually. Because of that I’m unsure if I will add the gears effect to 4.4. Perhaps it’s time to use depth test in KWin as well (would be useful in other effects as well – e.g. FlipSwitch and CoverSwitch).

How to secure your email address correctly on the web

This is a follow-up post to my yesterdays post that obfuscating an email address does not work and is useless. Many comments on the blog post stated that they think that obfuscation helps because the bots are not interested in the obfuscated email addresses.

So let’s recap: we use obfuscation to prevent spam bots from harvesting email addresses. So we obfuscate in a way that

  • Humans are able to read the email address
  • Computers are not able to read the email address

That sounds like a CAPTCHA. If you don’t know the do’s and dont’s of CAPTCHAs I recommend to read the information on captcha.net. One of the most important facts is that you shouldn’t use a CAPTCHA which will break as soon as everybody uses it. That is in the moment the bots start to support it.

Now let’s get back to the obfuscated email addresses. I think we can agree that the obfuscation is conceptually broken. I think we can compare it with cryptography: even that there is no real usecase to attack MD5, nobody would use it to digitally sign important documents any more.

As soon as the harvesters start to search for obfuscated addresses they will find them. If you obfuscate an email address on the web today and in five years the harvesters start to unobfuscate addresses they will find your address. Bad luck.

So instead of using a broken CAPTCHA like obfuscation we should use a secure CAPTCHA like the Mailhide service provided by reCAPTCHA. There are plugins for many programming languages and it can be used to e.g. automatically replace all email addresses in a Mailman archive with a link to the CAPTCHA. It looks like that: jsm@example.com

And solving reCAPTCHAs is mostly much easier than solving the normal CAPTCHAs as you have a complete word and it is probably much easier than solving some obscure obfuscation rule and it helps to digitize books and newspapers and in the end you get a link to click on.

So I know, that you will say “reCAPTCHA belongs to Google and Google is evil. I don’t want Google to give them my email address”. If you think that, rethink. You think that the world’s biggest web harvester is unable to break your used obfuscation? You have never ever sent an email to a gmail/googlemail account? You don’t use Jabber with Google Talk users? You do not have a Google account? Do you really think that Google doesn’t already know your email address? And if you really don’t trust reCAPTCHA, you could still use scr.im to get a tiny, CAPTCHA protected URL. But I recommend to use a well tested CAPTCHA system.

To summary: I agree that you should secure your email addresses on websites. But please do yourself the favor and do it properly. Obfuscation is broken and it is only a matter of time till harvesters start to harvest the email addresses. There are services which provide a secure CAPTCHA to protect email addresses. Please use those. And no this is not an advertisement campaign for reCAPTCHA – it is just the best CAPTCHA service I know. If you know a better and more secure which doesn’t belong to Google, please leave a note 🙂