“Weather Widget” for Plasma 5 -based, Linux Computers

One of the observations which I’ve made about the practical use of Linux, is that in recent years and weeks, the number of weather widgets which we can use to decorate our desktops, and which provide some semblance of forecasting, has become more meager.

I suppose that one important reason may be the fact, that companies cannot extract revenues from operating servers, which simply respond to URL-requests, and which hand out weather information on that basis, for the client software to process as client wishes. Companies will only make profits these days, if they can force their clients to view advertisements.

And so recently I installed a widget, to my Debian / Stretch, Plasma 5 -based desktop computer named ‘Plato’, which is named ‘Weather Widget’, and which has the following display available:


This widget has as option to display information from ‘openweathermap.org‘, which has as intention to remain open and available.

There was a detail in how to get this widget running, that wasted some of my time yesterday, for which reason I’d like to share my experience with the reader. First of all, the preferred way to install this widget is, to right-click on the desktop, and then to left-click on “Add Widgets…”. If the desktop widgets are locked, the command must be given to unlock them first. Then, in the side-bar that appears, we click on “Get new Widgets” (at the very bottom), and then on “Download New Plasma Widgets”. In the window that appears, there’s a search field. In it, type ‘Weather’, and the widget in question should appear as available.

One great plus to adding widgets in this way, is the fact that we can do so, in user space, that is, without requiring root. However, here comes the catch: This widget will only display correctly, under Debian / Stretch, if the following two packages are installed:

  • ‘qml-module-qtgraphicaleffects’
  • ‘qml-module-qtquick-xmllistmodel’

Under other Plasma 5 -capable distributions, the same features may be provided by packages, which are named slightly differently.

Hint: For readers who may be curious, ‘QML’ is a markup language, similar to HTML, but unique to the Qt5 GUI libraries. Qt libraries have had as tradition, to use some subset of HTML, to display rich text. Well Qt 5 has extended this feature, with the ability to display a document-view, that contains ‘QML’. If the package repositories are in any good working order, then the packages which I named above will depend on other packages, which will ultimately pull in QML-support, as well as whatever libraries are needed, for the specific QML features to be displayed.

But, since the scenario additionally seemed to be – at least in my case – that widgets send actual QML to the Plasma 5 desktop manager, for the latter to render, and to do so in a way compatible with the installed compositing, I suppose it might be good to make sure that the following packages are already installed:

  • ‘qml-module-org-kde-kcoreaddons’,
  • ‘qml-module-org-kde-kio’,
  • ‘qml-module-org-kde-kwindowsystem’,

Or, whichever packages provide the equivalent capability, for the user’s desktop management framework. If that happens to be a different framework from mine, then to force the installation of the last three packages named above, would probably throw out whatever desktop manager the user has installed.

Additionally, the standard package for my distribution, which provides support for ‘Plasmoids’ to KDE Plasma, is:

  • ‘plasma-widgets-addons’

Installing these packages requires ‘root’! Not only that, but after these packages have been installed, either the system needs to be rebooted, or a new Plasma 5 session started. Newly-installed widgets will not recognize that these ‘qml’ modules are installed, if they have only been installed as recently as within the same session. And failing to create a new session that’s to use these modules, can cause the error message to appear:

‘qtquick.xmllistmodel is not installed’

In fact, installing the module and then trying to launch the widget, but just obtaining the same error-message, can be frustrating, if the user knows that he has in fact installed the module to his system.

But after the user has done so, he’ll be able to start new sessions, and other users of the same computer will be able to create sessions, within which this widget not only installs, but also displays just fine.

This type of a widget would qualify as an example of ‘out-of-tree’ software. When we click on the meta-package above, to install numerous widgets from the package manager, doing so also installs the packages as dependencies, which the standard widgets require. But as soon as we install something that’s out-of-tree, it becomes the responsibility of the user, or the sysadmin, to make sure the new dependencies are also satisfied.



Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.