After Marco had added initial support for WAC apps to Plasma, at open-slx, we spent a few cycles on taking this to a next level. WAC apps are apps written in HTML5 which are shipped as packaged websites with everything needed included in the package. On top of the normal webbrowser APIs, WAC apps can access a set of API calls that allow access to various aspects of the underlying system, device and network information, contacts, hardware such as camera, accelerometer, location sensors, etc.).
Most of the hard work is already done by the excellent webkit. The parts needed in Plasma and KDE are support for loading the package format, and allowing access to certain system APIs. Marco has written an AppletScript Plugin, which basically wraps the WAC format into a Plasmoid so it can be loaded into any Plasma Shell (Plasma Desktop, Netbook, Active, MediaCenter, etc).
Implementing the WAC-specified APIs turns out to be quite a bit of work. I have started on the DeviceStatus API, and on my laptop, HTML5/WAC apps are now able to access system information such as software versions and battery status. The complete WAC API is quite big, so right now we only support a small subset. The basics are done, and with growing support in this API, we’re able to run more and more apps on Plasma devices.
In the screencast, you see how WAC apps are running inside Plasma Desktop. One interesting thing I’m explaining is the permission model, so I’d like to go a bit more into details about this. WAC apps have the concept of so-called features. The app can check which features are available on a given platform, and then provide or remove features. Plasma’s equivalent to this concept are extensions, which maps a bit, but not too differently. I’ve added a translation mechanism between those two, so what the app is now asking for is access to specific Plasma extensions, very much like our JavaScript Plasmoids.
Everything is running inside a sandbox (in our case a webkit container inside Plasma), so it is quite easy to restrict everything beyond the browser’s DOM API. When working on the permission model, I reflectd about how the user actually handles these permissions. Many people seem to complain that even if the app announces which APIs it wants to access, the user still does not really have a choice beyond all-or-nothing, so most people end up blindly OK’ing whatever the app wants. The code for WAC in Plasma is set up in a way that we can allow access only to certain bits of the API, disallow access or — and that’s the catch — fake access. Fake access means that we tell the app that we support certain APIs, but we will only deliver empty or bogus data, so the app still works, but our address book is not in jeopardy of being sent to some blackhat in a far away country.
I’ve compiled an update to the Balsam Professional Plasma Active packages in the last weeks, they are now are available for your upgrading pleasure. While the packages work very well in my testing, they are still only development snapshots, so if you’re happy with your current Plasma Active, and you need to be absolutely sure everything keeps working, I’d advise not to upgrade. In all other cases, you’re in for a good performance kick, a lot of bugfixes and a few new, but important features.Instead of boring you, my dear audience, with a long piece of text, I got out my webcam and recorded a screencast of these packages running on my viewtab (an Atom-based 10 inch tablet). Lay back and watch.
In the screencast, I’m showing the general workspace UI, as well as a few new apps and features, file browsing, microblogging, news reading workflows, which we’ve been improving lately.
The packages work fine on wetab and exopc tablets, and most likely also on other Intel-based tablets. Builds for various ARM flavours are available throught the Mer project. As Balsam Professional 12.1 is compatible to openSUSE, they will also work there. If you want to install the packages in your desktop, be advised that this might mess with your desktop sessions, so that’s essentially at your own risk.
The Balsam Packages are made available by open-slx and built and served from our Open Build Service.
Plasma Quick is KDE Plasma’s user interface toolkit which brings system and data integration, theming and artwork and tools to build workspace and mobile applications to the world of QtQuick. Plasma Quick provides everything needed to build high-quality apps. PlasmaExtras provides an extended set of Plasma QtQuick components.
In Plasma 4.8, we released a set of QtQuick (QML) components that are providing an implementation of Qt Quick’s standard component API. While QtQuick itself only provides very basic components for texts, for example, Plasma Component’s Text Input adds an integrated look & feel to them. Often, you will find that in your app, you’ll also need a few higher level widgets, ui elements with a higher degree of intgration. PlasmaExtras has now been added to our git master tree, so it will be released with KDE SC 4.9 in July.
So, what does PlasmaExtras contain right now? One very important thing is that it adds an image loader, which allows the runtime to resolve theme-internal URLs, such as image://appbackgrounds/contextarea, giving you themed application backgrounds.
ResourceInstance adds support for Share Like Connect. Basically, ResourceInstance exports the currently viewed or active document (or “Thing” really), identified by a url and a name. Share Like Connect provides a standardised mechanism to share and “like” information. It also gives you the tools to connect a document to an Activity, which makes collecting information on a certain topic easy. Adding share like connect support to your application becomes as easy as:
// Example in an imaginary webbrowser
import org.kde.plasma.extras 0.1 as PlasmaExtras
[...]
PlasmaExtras.ResourceInstance {
uri: webbrowser.currentUrl
name: webbrowser.pageTitle
}
A default set of animations allows the developer to streamline app-internal animations with the rest of the ui. It also allows us to provide a set of high-quality and fast animations, app developers can just reuse them in their ui:
The ParallelAnimation, which we compose when our button is clicked will start all its children at once. A ScriptAction is not an animation per se, but runs a bit of inlined javascript (usually, you can just call another function here which does the real work). Both are run in parallel, so this pattern can be used to hide computational tasks in an elegant way. This way, you can of course also combine animations, or run them in sequence (using SequentialAnimation { … }).
We’ve also added a few Label subclasses, Title, Heading and Paragraph, which theme the standard Plasma Components Label to provide more consistent layout of static texts.
import org.kde.plasma.extras 0.1 as PlasmaExtras
[...]
Column{
PlasmaExtras.Title { text: "Fruit sweetness on the rise" }
PlasmaExtras.Heading { text: "Apples in the sunlight"; level: 2 }
PlasmaExtras.Paragraph { text: "Long text about fruit and apples [...]" }
[...]
}
There is also an experimental App class in PlasmaExtras. The goal of this component is a container for apps that is adaptive to the device. It provides a basic workflow pattern around different parts of your app and navigation between them. This is achieved by providing separate areas, such as toolbars, navigation and content. Since we’re still experimenting a bit with this stuff, this one needs a bit more work.
More examples can be found in the gallery app, which is also shown in the screenshot, it’s in the kde-runtime git module under kde-runtime/plasma/declarativeimports/test/. The API documentation gives you an overview about available classes, properties and signals, and also contains code examples. Over time, I expect PlasmaExtras to grow a bit and provide more useful things for developers.
Most of these components have already been in use for some time in Plasma Active. they’ve now “moved up” in the hierarchy being made available on more systems. They are a nice example how work is shared across formfactors in Plasma, and how the Desktop UI benefits from development on mobile systems.
These days, the Plasma Active team (and a few people new to it) is meeting in Darmstadt, kindly hosted by basysKom to work on Plasma Active. Our topics range from closer integration of social networks and instant messaging to more hardcore topics such as our developer story (Plasma SDK, OBS workflows) and getting to run the thing on more devices, especially working on the system integration for the Spark tablet, that will become available to users in May. The meeting room is still buzzing with people fixing bugs, sharing knowledge, packaging, testing and (in my case, writing a blog).
Two topics that have been pretty important have been integration of social networks into the Plasma Active user experience, our plan here is to use Akonadi for collecting and caching stream from various social network sources, for example Facebook, Twitter, Google+ and others, and using Nepomuk for connecting this data from different sources to people we know. The problem of “Metacontact” (people you actually know, interact with in contrast to addressbook entries / email or IM addresses) seems to be “mostly solved” and in the process of implementation on various sides — KDE PIM, Telepathy, so we can use that as departure point to create a more natural view on your social surroundings. Now, a cunning plan that is well aligned with other components such as PIM (via Kontact Touch) exists, and we can move to the fun part: implementing it. This part will be spearheaded by Martin Klapetek, who has spent a lot of thinking on this topic.
Another important topic is our “Developer Story”. We identified three levels of target “users” for this: App developers of “simple” apps (meaning apps that can be done in pure QML / Plasma Quick and which don’t need C++ parts (we’re extending the possibilities here all the time), more complex apps that use C++ (Kontact Touch, Calligra Active, but also other apps that are being ported to Active UI guidelines and being made touch-friendly). This group will be served by a well-defined process involving ready-made cross-compilation environments in the form of virtual machine images. A third group (and likely the smallest) is the group of system developers. This topic needs a bit of work still, so in the areas where the tools provided by the fantastic Mer project do not suffice, we rely on passing on our knowledge in the traditional way: i.e. catch us on the mailing list or IRC, and we’ll try to help.
A special guest who arrived today is Mer’s Martin Brook, who has been very active in the Active team in the past months already, and who brought Plasma Active to a whole array of devices. It’s wonderful to welcome new people to the community, and it really rocks to see how effortlessly people who never met each other in person, and who come from quite different angle sit down and do great things together.
At KDE, we take licensing of our software very seriously. In order to make licensing code more straight-forward for developers, and easier to evaluate for third parties, we’ve created the licensing policy which can be found on Techbase. With this tool, we provide guidelines for developers which licenses to choose for their code, so that it matches pieces of software that it is shipped alongside with. It also provides insight for those who would like to distribute KDE software to get an idea how our software is structured, license-wise.
There’s another, not too widely known tool we created a few years ago: The Fiduciary License Agreement, or in short FLA. The FLA is a tool that reduces the headache and work for us in case in the future a license used by us need a change. The FLA is a tool to make this process easier, especially in cases where it would otherwise be impossible (imagine the death of a developer, as an example).
The FLA is simply a mechanism that allows the KDE e.V., as steward of the KDE community, to relicense a piece of code in case the original developer cannot do that anymore. Within this process, the KDE e.V. is bound by strict rules. First of all, it has to act within its mission, which is (paraphrased) to do good for KDE and Free software. If you’re interested in a more complete explanation of this, I’d suggest to read Carlo Piana’s article about it.
Signing the FLA is not mandatory for contributing to KDE, but it does make it easier to deal with unforeseen problems, and thus it can save someone in the future a lot of headaches. (Hopefully, for different reasons, we’ll never run into this case, but you never know.) Even if it’s not mandatory, it’s is, as I explained still a very good idea to sign the FLA. If you care about KDE’s future, please consider doing this. You can download the FLA document on ev.kde.org, and send it to our office in Berlin (address is one the same website). You might recall that I’ve written about this topic earlier — so if those guys sign it, you should, too! :-)
Two weeks ago, we had an exciting parcel arrive in the KDE e.V. office, originating from KDAB. KDAB is a software consultancy, which employs many talented KDE hackers, who still contribute to KDE, either in their Free time, or in time alotted by KDAB. The parcel contained FLAs from many KDE contributors who work for KDAB, and KDAB has organised a batch-signing of those FLAs. Obviously, we’re very happy to see this happen, as it future-proofs KDE’s licensing significantly.
Dived Japanese Garden and White Rock yesterday, after refreshing my Scuba diving skills. I’m doing that at New Heaven Diving on Koh Tao, Thailand, a smallness diving operation who do a lot of work in marine life conservancy. I really dig their regular reef cleanup efforts, and their mission to turn more diving schools into marine life conservancy agents. In the process of experiencing the fantastic underwater world, it gives a lot of background to environmental (and underlying socio-economical) problems.
Among yesterday’s highlights were a blue-spotted stingray, porcupine fish, trigger fish, various scorpionfish and thousands of other cute and sometimes curious sea creatures.
I’ve also started using my underwater camera with so far very promising results. I need to work a bit on handling of the cam, but over the course of today’s photos, I am quite thrilled of the results after about just one hour of diving with it. As I didn’t bring my laptop or tablet, uploading those will have to wait until I’m back home in early March — until then some impressions from my phone camera will have to suffice.
Plasma Active‘s goal is develop an elegant, Free user experience for the device spectrum, for example touch-based tablets. Active Settings is a modular application hosting configuration user interfaces for apps and the system.
With Plasma Active Two, we released a first version of Active Settings, an app that lets you configure a few key parts of your system, such as time settings, and options for web browsing. Plasma Active Two contains a first stable, but still fairly bare-bones release, with only two modules.
Active Settings provides a one-stop shop for app and system settings, and an interface for developer to ship settings user interfaces with their applications, or extend Active Settings with custom, or vendor-specific modules. Active Settings is a shell that loads, and displays a number of modules, in order to add a module, the app doesn’t need any code changes. This is done using KDE’s plugin system and Plasma packages.
Embeddings settings modules
In order to achieve a higher degree of consistency, settings modules can be loaded both from the settings app, and directly inside applications. This is done using a new set of QML bindings, which provide a settings loader item. This item is designed to lazy-load the settings plugin, so you can avoid touching config files, or loading a complex UI on startup and rather do it when the UI is needed, keeping startup times of your app low.
In the screenshots, you can see the web browser module running in the settings app. I’ve also integrated the settings dialog into the dashboard of the web browser, so you can easily change things while browsing. Settings are synchronized across applications.
Workflow and design
Active Settings modules get loaded into the settings app. Often you will find that embedding these pieces of UI into your app makes the workflow more natural, as it puts things into context, which means you don’t have to switch to another app to change settings, both is possible. One of the reasons we want to share this code between apps and the general settings app is to present a more consistent UI. Along with the work on the guts of Active Settings, Thomas Pfeiffer has started to work on a HIG, human interface guidelines for designing settings dialogs. These guidelines complement the implementation nicely, and will make it easier for developers to write apps that feel naturally integrated into the system. One thing we’re implementing in Active is instant apply of settings, so you’ll only find those “apply” buttons very rarely (we’re still discussing a few corner cases). Active Settings uses the new Plasma QML Components, providing a standard implementation of the Qt Components API. Plasma Components can appear in different variations, in Active we default to the touch-friendly components. This of course makes it easier to share settings dialogs across devices, as we can provide standard widgets optimized for a given input method, screen form factor, etc..
Writing a settings module
We have now made it very easy to write settings plugins. A new set of QML bindings allow loading and embedding dialogs by providing components for the shell and loading of the modules, and a few pre-made bindings for domain-specific settings (time for example). These bindings allow you to ship a Plasma package containing your QML code, data files, images, etc. with your application, and have it available both in the settings app, and also in your own application. You can write pure QML settings modules, and it is very easy to extend your module with C++ code, which is automatically loaded and can export additional functionality to your QML runtime. These plugins are in principle really light-weight with minimal build dependencies (basically QObject, KPluginFactory and kdelibs’ macros for plugins), so deployment is made rather easy. Even if you’re doing a QML-only app, you can still provide a compiled plugin for the settings with it.
The API is designed to be minimal, the plugins can be very light-weight, as they’re basically exporting QObject-deriven classes to the QML runtime. Of course you can go completely wild here. Plasma packages provide a loading mechanisms for “pieces of UI” written in QML. This mechanism makes it very easy to share parts of the UI across different applications. As these packages do not contain compiled code, they’re architecture independent, small and easy to share and deploy. I’ve described the whole process of writing your own Active Settings module on TechBase, so hop over there if you’re interested in more details.
Those familiar with kdelibs’ classes and frameworks such as KControl, System settings, KCModule will not be surprised that much of this architecture has been inspired by these fine shoulders of giants. :)
For some time, I’ve been the more or less proud owner of a Sony Vaio VPC Z12 laptop. It’s quite a nice machine with a Core i5 CPU, a fast SSD and a superb FullHD panel at 13″. Hardware support on Linux hasn’t been great however, so it needed some fiddling to get everything working properly for me. Well, everything I care about at least.Here are some pointers that might help somebody getting things set up.
Power Consumption
Since this model has a hybrid graphics setup, essentially two graphics chips, it drains a lot of power in a default Linux setup. As I do not need the fast NVidia graphics most of the time, I switch the chip off (it’s on by default and consumes a good 10W, even when unused). Needless to say, that this vastly improves battery life.
For this to work, you need to install an updates sony-laptop Kernel module, which will also bring a bunch of other useful features. This module is based on Eva Brucherseifer’s work and continued by Norbert Preining (thanks to both for making my laptop a lot better!), you can find its latest version here. I’ll not go into the details of installing and loading the module, I think if you don’t know how to do that, I should probably not enable you to fiddle with your expensive hardware on this level.
After installing the kernel module, add a bunch of options to your grub command line, I have the following:
Let’s look at the interesting option here: speed_stamina: set this option to 0 for intel only (stamina), to 1 for nvidia only (speed), or two 2 if you want to choose automatically. I haven’t figured out the automatic bits, since it needs some user space components and I don’t care a lot about that at the moment. You can find a bunch of pointers on this useful page, if you’re interested in the details. i915.i915_enable_rc6=1: This option enables a few power consumption improvements that are rather critical. If not enabled, certain devices won’t be powered down properly. If you encounter stability problems with this option enabled, try removing it.
With these options, power consumption goes down from 25W to a 15W, making the battery last about two hours longer on the road while saving the world!
Keyboard backlight, etc.
There’s a few annoyances left. Since I’m very much a nightly hacker, the keyboard backlight is a very useful thing to have — yet it doesn’t work out of the box for me. Again, the sony-laptop kernel module relieves me. It has a good bunch of interesting options, most of them nicely documented in its source code ;). By adding a bunch of actions to one of the scripts run at boot (I’m using /etc/rc.d/boot.local), we fix some issues: This enables the keyboard backlight, and sets its timeout to 30 seconds: (use 0 as timeout setting for no timeout, 1 for 30 seconds, 2 for 60 seconds):
If you look into /sys/devices/platform/sony-laptop/, there is a couple of other interesting files in there: als_*: helps you using the ambient light sensor lid_resume_control: Used to control the behaviour when the lid is opened. 0 means do nothing, 1 means resume from hibernate (S4), 2 means resume from Suspend (S3) and 3 means resume from both. touchpad: Allows you to enable and disable the touchpad at runtime
Sound
In some cases, the laptop doesn’t switch off its internal speakers when you plug in a headphone (which can lead to rather embarrassing situations in public places, believe me). Switching the output from External speakers to headphone in “pavucontrol” (Pulseaudio’s mixer app) is able to change that, though I’m still looking for a more automatic solution here.
Touchpad setup
You may find your touchpad to be lacking some features which are rather critical for ergonomic usage, such as two-finger scrolling or tap-to-click not working. By passing a couple of options to the Xorg touchpad driver, we can enable this functionality. Try putting the following into a file /etc/X11/xorg.conf.d/50-synaptics.conf:
This enabled two-finger scolling, tap-to-click, scrolling on the edges and right mouse button triggering when tapping the lower right corner of the touchpad, making your machine much less frustrating to operate.
I hope these pointers make it easier for some owning the same hardware to get the best out of it.
Plasma Active brings a flexible, elegant, activity-driven user experience to a spectrum of devices. This article is part of a series of articles about different perspectives on Plasma Active. This installment looks at the user story, and aims at answering the questions “what does Plasma Active bring me as a user?”, what are the underlying concepts and how do we plan to achieve these goals.
For the user who wants to enjoy the Internet, multimedia and data away from his laptop or desktop, right now choices are rather slim. This means, for example, that you will choose a platform with some sort of critical mass, meaning that your favourite 3rd party apps are available, enough services supported, etc.. A Free software platform has to bring a lot to the table for users: There’s a lot of cool software available, systems such as Plasma Active offer a system without lock-in to a single vendor, but rather being able to take apps across vendors and devices. Plasma Active already comes with a good amount of interesting widgets, new ones are being developed all the time, the development platform is proven to be stable and working in real world use, and it’s easy for 3rd parties to develop and bring support for (even “4th” party) services. Plasma Active extends the Free software ecosystem into user experiences for devices, bringing a critical mass with it.
I personally use Plasma Active almost every day, I prefer the tablet form factor for “light reading”, checking on news, social networks, the blogosphere. For me it’s an ideal “on the couch in the living room” device, although I tend to use it in trains for reading and watching movies as well. With its powerful email client Kontact Touch it allows me quite conveniently read longer email threads. The virtual keyboard works well enough for entering short texts. For longer texts, I usually either plug in a keyboard and put the tablet into a stand, so it feels more like a ‘stationary laptop’.
User experience central
Plasma Active has been designed, from the ground up for the user. Our goal is to create an elegant experience for the user, with as little friction in the UI as possible. The device(s) support the user’s workflow, are ergonomic to use on a given formfactor. The device should get the work done, be fun to use and flexible enough to easily adapt to the user’s wishes and needs. In our development process, this is strongly reflected by the integral role designers play. Usability and interaction engineering is not an afterthought, but the driving force behind the work we do.
Mind-mapped UX
Contour, Plasma Active’s primary workspace uses semantic technologies to represent to the user. On a low level, this means that the user deals with photos, persons rather than .jpg files and email addresses. The semantic layer provides the data abstraction, including files, online resources, but also more abstract things such as locations. The Contour shell uses this information, and melds it with smart algorithms into a mapping for the user. The building blocks of this mindmap of the user’s digital life are activities. Activities are easily created, customized and removed, and you can use them go group similar items, bookmarks, widgets, apps, images, music tracks or videos. Activities allow you to organize all the interesting things you encounter while using your device. The Share Like Connect feature allows you to interact with these activities, so instead of generally bookmarking a website, you can also directly connect it to one of your activities and have it neatly organized among the rest of your digital artifacts.
Where are we going?
Plasma Active devices are interconnected and work together well, as they offer similar functionality across a range of devices. In Plasma Active One we’ve delivered the first bits that will lead to this goal: The Contour shell which gives a stronger connection between the user, his data and network and the device. In future releases, we will enhance Contour to provide more handles and “background support” to the user. Share-Like-Connect’s like and share features provides stronger connections to the (social) network, a perfect feature for the Free Culture community, and one of the strong selling points of Free Software (even if for many people outside the “geek crowd” perhaps not consciously). It will also be used to easily share anything across devices, imagine watching photos in a group, moving an interesting article from your desktop onto your tablet to read it on the couch or on the go, showing your friends on Facebook, Google+ and other social networks your preferences.