Seasons of KDE is now at an end. My project was to create a new KIOSK tool, which I finished successfully. Or at least I completed all the agreed goals. Confine is still not in a useable state, but a prototype backend and even unit tests for the important parts are finished. Still no real GUI though.
I learned a lot about KDE and Qt the past few months. Participating in Seasons of KDE was a great experience and I would wholeheartedly recommend it for KDE newcomers. But depending on your project it can be a lot of work! I would also like to give a special thanks my mentor Siddharth Sharma, for his support during this project!
Although Seasons of KDE ended, I will continue my work on Confine. Siddharth and I will soon start to plan our next steps towards a stable release of Confine.
To have a working KIOSK tool again, Confine needs to support another key feature of the KIOSK framework: KDE Action Restrictions.
A KDE Application can check if a certain Action is allowed. For example the action logout could be forbidden. So every time the logout action is performed, an application checks, if this action is allowed. Thus a user can still use an application, but certain actions are restricted to him.
These settings are stored in the kdeglobals file, in your KDE profile directory.
For my season of KDE project I had to compile a list of all currently used KDE Action Restrictions. I did a quick search throughout all KDE projects for the use of the KAuthorized framework and published my results in the confine repository. Although Confine is not finished yet, you might found this list beneficial, if you want to configure KIOSK restrictions manually.
Still a lot of KDE applications don’t support KDE Action Restrictions (anymore). For a revival of the whole KIOSK concept it would be highly beneficial, if more application are starting to use KDE Action Restrictions.
As mentioned in my earlier post, the KIOSK framework changed a lot between KDE3 and Plasma. So using the old code and simply port it to kf5 was not an option. My Mentor suggested, I start implementing profile support, which is one of the key feature of KIOSK.
Profiles have a special meaning in KDE, they are directories, were configuration files are being stored. This way you can give a specific user, or a group a certain set of configurations. A useful feature for system administration. In the old days, this was done via /etc/kderc, which saves the profiles, and via a second configuration file to store a mapping between the profiles and the user. For a more detailed explanation have a look at this.
But in kf5 things changed: profiles are now set via environment variables XDG_CONFIG_DIRS and XDG_CONFIG_HOME . These variables contain a list of possible configuration directories. The first entry has top priority, so every program tries to take their configuration from this directory. If no config file could be found, the program looks in the second directory and so on. XDG_CONFIG_HOME takes priority over XDG_CONFIG_DIRS, except for some global configuration options (e.g. kdeglobal).
This fundamental change affects the design for Confine. Suddenly every user can have multiple profiles with different priorities. And this environment variable has to be stored somewhere. Ubuntu has a good guide for this, but things might be different for different distributions, and to make things worse, they might be different for different users, as they use different shells. So the place, where to store these environment variables has to be stored for every user.
Before I started working on my Seasons of KDE project, I already did some Junior Jobs. I reviewed Bugs and fixed a few of them. This helped me a lot to get a little deeper into KDE. Especially in getting to know all the tools, which are being used when developing KDE software.
But I wanted to do something more Complex and so I joined the Seasons of KDE program.
There was a project idea I found interesting: writing a new KIOSK tool. The last one was developed for KDE3 and there was no successor.
So the Idea of Confine was born, a replacement for the old KIOSK tool. I got assigned to a wonderful Mentor, who is also head of this project: Siddharth Sharma.
After I started working on Confine I quickly noticed, that most technical documentation about the KIOSK framework was outdated. And even most tutorials and guides on the Internet only are talking about the old KIOSK implementation from KDE3 and only a few mentions KDE4. KF5 was not mentioned once. So I had to piece together all the information, using old guides, asking my mentor for advice and reading some source code. But I will get more into technical details in the next post.