Jan Grulich

Telegram desktop client for flatpak

Since everyone is talking about flatpak or snappy these days I wanted to try it myself and package some application. I decided to start with telegram desktop client which was suggested to me as an application which would be nice to have packaged for flatpak. Once I saw the build instructions for the first time I thought it’s going to be an impossible task and it almost ended with that result, but I didn’t want to give up. It took me three working days to go through all dependencies and to make it build as the telegram qmake file is written with all paths hardcoded and you need to build it exactly in a way the author intended. I could of course package the binary provided by the author itself, but my intention was to provide a way to test the latest git version. Given that, I think I managed to try almost everything flatpak-builder allows you to do and I have to say I quite enjoyed doing that, because if you want to package an application for flatpak you just need to write a manifest (json file) and declare runtime and sdk you want to use, thankfully upstream already provides most common runtimes you need. Then you just need to define dependencies one by one, where for each of them you can specify whether it should be cloned from git, or if it should be downloaded as an archive or you can even use special type of source called “shell” where you can specify shell commands you want to run. Then flatpak-builder will automatically run configure (or another command you specify, like qmake) , make and make install on every source you define with build parameters you define. This everything is pretty automatized and re-running the build will skip stuff you have already built successfully before or you downloaded before. For most applications writing this manifest is relatively easy and in case you don’t need any specific library which is not provided by any available runtime you can do that pretty fast, even if you do it for the first time, just get some inspiration in another manifest for a similar application and that’s all you need.

To try the telegram desktop client I made the repo created by flatpak-builder available.
You just need to get Gnome runtime first:
$ wget https://sdk.gnome.org/keys/gnome-sdk.gpg
$ flatpak remote-add --gpg-import=gnome-sdk.gpg gnome https://sdk.gnome.org/repo/
$ flatpak install gnome org.gnome.Platform 3.20

And then you can install and run the telegram desktop client:
$ wget https://jgrulich.fedorapeople.org/telegram/keys/telegram.asc
$ flatpak remote-add --gpg-import=telegram.asc telegram-desktop https://jgrulich.fedorapeople.org/telegram/repo/
$ flatpak install telegram-desktop org.telegram.TelegramDesktopDevel
$ flatpak run org.telegram.TelegramDesktopDevel

You can of course build it yourself as well or if you want just check the manifest you can find it here:
https://github.com/alexlarsson/nightly-build-apps

Introducing plasma timekeeper – an applet measuring your activity

Have you ever wondered how much time do you spend reading emails, browsing on internet or hacking? I have! I started thinking about monitoring my activity. Reason for this was that I work from home, where I’m alone and nobody is behind my back watching what I’m actually doing. So I came with an idea to write a simple applet which tracks the time you spent in a certain application by just checking your currently active window (application). The functionality is pretty simple, you switch focus to a window where you do something, the applet starts measuring the time and update it in some interval until you switch to another window and so on. It may not be accurate in case you will be cheating, e.g. you open a video player and start watching a movie while you switch focus to another app to avoid monitoring time spent in the video player. Given this, the purpose of the applet is pretty obvious, it should be just for you, for your personal usage when you have no reason for cheating, because you are interested in these statistics.

Here are screenshots of the current version:

Compact versionPopup window

The applet has a compact version which you can put into your panel, it shows the current active window and the time you spent in there. Once you click on it, it will popup a window showing a list of all applications you used ordered by usage. To extend the basic functionality I added buttons to start/stop monitoring, a button to reset the current statistics (there are even options to reset the statistics on suspend/reset/shutdown in applet configuration) or buttons to blacklist applications you don’t care about.

For those who are interested in trying this little project of mine or they want to contribute and extend it, fix something or report an issue, here’s the link.

Upcoming news in Plasma 5.5

It’s been a while since Plasma 5.4 release and we are now approaching feature freeze for Plasma 5.5 so I would like to share with you what news you can expect in plasma-nm. This time we have major changes only in our connection editor although most of you wouldn’t probably even notice them. This is going to be a short list unfortunately given I have less time and less ideas, but at least something, right?

So, what is new?

WPA/WPA2 Enterprise validation
WPA/WPA2 Enterprise validation was the only one missing validation in our connection editor and without it we let you to save your WPA/WPA2 Enteprise configuration even when it was wrong or some option was missing. Now you should be able to save your configuration only when it’s valid for NetworkManager. In addition to check for missing properties, we check (in case of TLS authentication) whether provided private key can be decrypted with given private key password (works only for pkcs12 and PEM formats).

New password field widget
Option to show/hide the password and option to not store the password were removed as standalone widgets and they are now part of the password field. I did this to make the UI less complicated and also because I like it, however this introduced some accessibility issues which need to be addressed somehow once I have time to do that (mentioned this here as a commitment that I’ll really do something about that).
plasma-nm-password-widget

Other changes

  • OpenVPN improvements (better properties descriptions, new options)
  • added tooltips to most common options
  • some bugfixes and other minor improvements which are not worth mentioning

Akademy 2015

Akademy is the annual world summit of KDE which was held this year in A Coruña. I was there since July 22 until last Friday July 31 and even these ~10 days were not enough :). The official start was on Friday July 24 with a pre-registration party, where all Akademy attendees could pickup their badges, have some food and mainly drink with people they haven’t seen for a long time or at all. This year organizers also managed to prepare a show for us in form of preparation of Queimada, which is a traditional Galician punch.20150724_223526

20150724_202109

 

 

 

 

 

 

 

 

The next two days were dedicated to talks and started with a keynote presented by Matthias Kirschner. I tried to attend those which were interesting for me and I would say that the most interesting talk was presented by Sebastian Kügler, where he introduced a new mobile platform called Plasma Mobile. This is going to be interesting given the Android and iOS domination, but there is definitely some potential.20150725_100727

 

I also have to mention the talk about sandboxed applications presented by my RedHat colleague Daniel Vrátil. Dan explained what is a sandbox, how it works and what are the benefits of using sandboxes.20150726_170703

 

The end of the weekend was, as usual, dedicated to sponsor presentations and Akademy awards. This year the awards were given to the awesome VDG group because without them the Plasma 5 wouldn’t look so great, to Albert Vaca, who is the main KDE connect developer and to Millian Wolff for his work on KDevelop. The last awards were given Scarlett Clark for her work on CI and to Akademy organizers.

Monday started series of BoFs. On Monday I attended only BoF organized by VDG to discuss the UI of the new traffic monitor feature in plasma-nm, which will be in Plasma 5.4.plotter

 

On Tuesday we had Solid BoF for all developers working on hardware support for KDE. Unfortunately only few people showed up and nobody came to complain. This could be because people don’t know what Solid is or, in better case, everything works as it should. We discussed the current state of various Solid projects and mostly went through plasma-nm issues and missing features and Lamarque also decided to pass on his network management maintainership to me :).

In the evening the same day we had a party. The party was on the terrace of one shopping centre near the venue and was perfect until it started to rain. Then we had to move to a smaller place which was not suitable for so many people, but we enjoyed it despite those minor problems. We were eating delicious food, drinking good wine and dancing at the end so the party couldn’t be better :).20150728_212204_HDR

 

On Wednesday we had a day trip. Originally we were supposed to have lunch at the Hercules tower and then go to the beach, but the weather forecast was not optimistic so the day trip was changed to go to the Aquarium first and then visit the Hercules tower. 20150729_181432

20150729_181325

20150729_18435320150729_193019_HDR

 

 

 

 

 

 

 

 

During Thursday and Friday people are leaving so the attendance of BoFs is not that high as in previous days. I went only to KDE connect BoF just to see what’s going on with this interesting project.

And that’s probably all. This year’s Akademy was perfect and I’m really glad I could be there. The city was nice, the weather was almost perfect, people were friendly and organizers did really good job this year. Thank you all and see you next year!!

 

Plasma-nm 0.9.3.6 release

We have released another plasma-nm version for KDE 4. It’s possible that this release will be the last one, because every distribution is now switching to Plasma 5 and given our irregular releases it’s possible that current distributions wouldn’t pickup the updated version anyway. I’ll keep backporting fixes from Plasma 5 to our KDE 4 branch if possible, so if you want to keep running on KDE 4 from some reason, you will still have a way how to get at least some fixes. There is also a new release of networkmanager-qt for KDE 4, which is required for below mentioned OpenConnect fixes.

Fixed issues in this release:
* bz#341221applet: connection which is being activated is moved to the top
* bz#343606editor: enable/disable actions when a connection state changes
* bz#340703editor: added connect/disconnect actions to the menu and toolbar
* bz#341629editor-ethernet: auto-negotiate state is now properly restored
* bz#341069editor-OpenVPN: added option for server certificate verification
* bz#341397editor-pptp: fixed storing of non-latin characters
* bz#340801editor-vpn: fixed vpn import – IPv4 -> routes -> “Use only for resources on this connection” is not checked all the time
* bz#340717editor-wifi: added frequency and channel to the BSSID dropdown list
* bz#339296OpenConnect: fixed autoconnecting
* bz#309931/bz#334474OpenConnect: fixed storing of secrets
* bz#334901/bz#344411secret agent: displayed proper connection name in password dialog
* bz#342697wifi: fixed displaying of non-ASCII SSIDs

+ many other not mentioned issues

New tarballs can be downloaded here:
http://download.kde.org/stable/plasma-nm/plasma-nm-0.9.3.6.tar.xz.mirrorlist
http://download.kde.org/unstable/networkmanager-qt/0.9.8.4/src/networkmanager-qt-0.9.8.4.tar.xz.mirrorlist

2+ years with network management in KDE

It has been more than 2 years when I was an intern in Red Hat and Lukáš Tinkl, my leader that time, told me that I should take a look what needs to be done around network management in KDE. I started with contribution to libnm-qt (networkmanager-qt now), because there was a plan to have a separated library for NetworkManager and port the applet to use it later. It took me a few months to get familiar with NetworkManager DBus API and implement all missing stuff and I was ready to start porting the applet. Problem was that the old NM applet was not ready at all, its architecture had been done with more network daemons in mind (like wicd) and the code base became really complicated. I still remember that discussion we had about starting from scratch, it was quite tough decision, because we had to drop such huge code base and years of work. Anyway, we decided to go for it and start from scratch and one of the best journeys of my life had begun. It went quite good, we were able to reuse some existing parts from the old applet and we had first release like half year later. Well, quality of first releases is questionable, not everyone liked them we did, but we have learned from mistakes and now I daresay that the version we have after 2 years currently in Plasma 5 is really great and we enjoyed doing it.

But the real reason why I decided to write this blog post is that I wanted to look to some statistics using gitstats after those 2 years of development and share them with you.

Stats about networkmanager-qt

Total files: 363
Total lines: 41876
More stats here.

Table of top contributors since the beginning.
nm-qt-authors

Stats about libmm-qt

Total files: 120
Total lines: 14695
More stats here.

Table of top contributors since the beginning.
mm-qt-authors

Stats about plasma-nm

Total files: 288
Total lines: 40507
More stats here.

Table of top contributors since the beginning.
plasma-nm-authors

NOTE that those statistics do not include contributions to the old NM applet, which some parts are used in both libraries and even in the new NM applet.

Plasma-nm 0.9.3.5 release

I just want to inform you (those who are still running KDE 4) that we released a new version of your favorite network applet. This new release brings to you many bug fixes and should make your life easier. We really recommend to update to the new version as we, not intentionally, introduced some new issues in the previous version. Together with the new release of plasma-nm we also released our libnm-qt library which is also needed if you want to have fixes from plasma-nm properly working.

Summary of fixed issues:
bz#339652 – added missing IPv6 support for OpenVPN connections
bz#333752 – we moved code for checking your current download/upload to QML code and now it just checking for updates only when the applet is opened
bz#329837 – during import of VPN connections we copied your certificates automatically into your home directory, now we are asking whether you want to copy them or keep the path as it is
bz#340306 – fixed initialization of current download/upload speed for mobile broadband connections
bz#338513, bz#338697, bz#339223 – many fixes in secret agent (KWallet) initialization, also added migration for your secrets from plain text files, we dropped their support in the previous version, and store them into KWallet or directly into NetworkManager (if KWallet is not enabled)

You can find new tarballs in usual location, which is [1] for plasma-nm and [2] for libnm-qt.

[1] – http://download.kde.org/stable/plasma-nm/plasma-nm-0.9.3.5.tar.xz.mirrorlist
[2] – http://download.kde.org/unstable/networkmanager-qt/0.9.8.3/src/libnm-qt-0.9.8.3.tar.xz.mirrorlist

Plasma-nm 0.9.3.4 is out!

After 5 months we are releasing a new version of plasma-nm for KDE 4.x containing a lot of bugfixes, minor design improvements and internal changes (see my previous blog post). This is probably last major release since we are now focused to KF5/Plasma 5 version, but we will be still backporting all fixes and you can expect at least one more bugfix release in future.

You can get a tarball from usual location, compile it from git or wait for an update in your distribution.

Also if you want to discuss things related to plasma-nm personally, suggest new ideas, complain about it, or just buy me or to anyone from our small plasma-nm team a beer you will have an opportunity, because
akademy

Upcoming changes in the next plasma-nm release

It’s been 3 months since the last plasma-nm (Plasma networkmanagement) release and we have been working really hard to bring you again a better release than the previous one. Unlike previous releases, this one is focused on internal changes which are not mostly noticeable on the outside, but I believe they are welcomed.

The most significant internal change is a new model. This one is more complex and easier to maintain and one of it’s advantages is that we can now use it also in the connection editor, so if there is a problem we can just fix it in one place. It should better handle various cases which were not properly handled in previous versions, like when you have more wireless cards. Also various NetworkManager changes are now properly propagated to the applet, i.e. we are not now limited to three connection states (disconnected, connecting, connected) as before, but when you activate your connection you will see the exact device state like “getting IP address” or “waiting for authorization” and so on. Regarding the connection editor, you can now activate/deactivate connections there which is probably something what nobody will use, but since this is possible because of the new model, then why not to add this option.

From visible changes I could mention new notifications. I added various notifications to inform you about successful or failed actions. This is quite useful when you do some action and nothing happens, usually when you are not authorized to do it. You can see new available notifications on the screenshot below.
notifications
Note: This screenshot is from Plasma 5 version and unfortunately not all notifications are also available in KDE 4 version, because I had to change API in libnm-qt (NetworkManagerQt) and this was possible only in the Qt5 version which is not released yet.

We were also working a lot on porting plasma-nm to KDE Frameworks 5 and I’m happy that plasma-nm is now part of Plasma 5 which means it will be released together and regularly also with bugfix releases, so you won’t have to always wait until we decide to bring you a new version. This change came quite late and there were no tarballs previously available until now, so I would really appreciate if you can test it together with the rest of Plasma 5. Regarding the KDE 4 version, we will probably release it together with Plasma 5 release, but if you want to try it now, you can just compile it from git and use branch called 0.9.3.

Here are some screenshots from Plasma 5 version. As you can see Plasma 5 version has a scrollbar o/. Unlike KDE 4 version there is no traffic monitor, because it hasn’t been ported yet, but we will add it in future and details will probably get a new look.
Details Password dialog

I hope you will like all the changes above and please do not forget to report all issues you spotted to our bugzilla.

Plasma-nm is finally out

We would like to finally announce that we are releasing a new version of plasma-nm. It took a lot of time but we hope the result speaks for itself. We focused mainly on design and workflow improvements because a lot of you were disappointed, so we discussed it with various people, blogged about it, did a lot of research etc. Many of you are involved in this release because your comments were valuable. There are also some people, without whom this release wouldn’t be in this state. Björn Balazs from User Prompt, who is a real expert on usability and did a great job in improving usability and shape of plasma-nm. Fabian Bornschein is a talented designer, author of Tilain plasma theme, who created for us a new nice set of icons. We will keep improving design and usability of plasma-nm even after this release, there is still a lot of work and we have also some plans for Plasma Next version and with the new VDG (Visual design group) containing a lot of talented designers, I believe we have what to look forward.

 

As usually, if you want to try this version of plasma-nm, you can compile it from git or download a tarball or wait until your distro packagers prepare an update.

 

Do not forget to report your bugs or send us your ideas. Unfortunately we were not able to include all your requests in this release, but we will try our best in future. Thanks to all involved in this release and we hope you will enjoy it as we enjoyed doing it.
Scroll To Top