June 05, 2017

Aunque leer las noticias en formato rss se ha convertido en algo cada vez más obsoleto, yo lo sigo utilizando como fuente de conocimiento e inspiración para la creación de artículos para el blog. Hace poco descubrí que existía RSS Indicator, un lector de rss para nuestro escritorio Plasma que me ayuda a seguir con atención algunas de las webs que más me interesan.

RSS Indicator, un lector de rss en tu escritorio Plasma – Plasmoides de KDE (76)

Hace unos años, antes del boom de las redes sociales, la gente perdía invertía su tiempo escribiendo blogs. De esta forma, se generaba mucha información interesante que era susceptible de convertirse en un buen artículo. El número de ellos era numero y si no querías pasearte por todos los blogs que te interesaban debías aprender a usar los rss.

Lamentablemente, el número de blogs sobre Software Libre ha disminuido y muchos usuarios y desarrolladores han optado por escribir menos y compartir por las redes sociales más. De hecho, nuestro amigo Yoyo opina que los bloggers estamos condenados a la extinción ya que además tenemos a otro depredador acechándonos: los podcast. Personalmente, creo que todavía hay sitio para los blogs aunque su calidad debe ir en aumento.

Pero volvamos al tema de esta entrada. A pesar de todo, todavía sigo muchas webs y blogs, así que los rss siguen siendo importante para mi, así que el otro día se me ocurrió probar el plasmoide RSS Indicator y me quedé sorprendido.

RSS Indicator

Se trata de uno de los plasmoides oficiales de KDE que se encarga de  mostrarte en el escritorio las nuevas entradas de las páginas webs que tú le indiques con lo que no te puedes perder las más interesantes. Además es interactivo ya que:

  • Te muestras los artículos leídos sobre el total de las fuentes.
  • Si poner el ratón sobre un artículo te muestra una previsualización del mismo.
  • Con el botón derecho abre el artículo en el navegador.
  • Con el botón izquierdo lo marca como leído.

Además, sus opciones de configuración son simples pero cubren la mayoría de las necesidades: tiempo de refresco, listado de fuentes, número de artículos opciones de acción de los botones del ratón, etc.

En definitiva, un buen plasmoide para hacer que nuestro fondo de escritorio sea un poco más útil.

¿Qué son los plasmoides?

Para los no iniciados en el blog, quizás la palabra plasmoide le suene un poco rara pero no es mas que el nombre que reciben los widgets para el escritorio Plasma de KDE.

En otras palabras, los plasmoides no son más que pequeñas aplicaciones que puestas sobre el escritorio o sobre una de las barras de tareas del mismo aumentan las funcionalidades del mismo o simplemente lo decoran.

Hi, this is going to be a quick review of what I did last week

Just a little about how cantor works

Cantor is divided in two main parts:

Worksheets –  An interface that allows user to interact with available back ends. Each worksheet is associated with one back end

Back ends –  Back ends are implemented as plugins

The whole back end architecture is divided in several parts. I am going to discuss the ones on which I worked last week

Classes:
* Back end – Stores static information about back ends, like name, version , what all features(syntax highlighting, tab completion etc) a back end supports

* Session – This is where a connection to back end is established and destroyed. To be specific, the method login() is used for initiating a connection  and logout() is used for ending the connection with back end

* Expression – Every command sent by the user is treated as an Expression . The class is also responsible for storing the result of the expression

Last week I successfully completed:
* Establishing connection with Qalculate back end
* Using streams for I/O
* Parsing the output returned by Qalculate

Qalculate_v1

That’s it for this blog. If you have any questions/suggestions, please get in touch.

Cheers!


Hi everyone, is everything ok? I hope so.

Today, I will talk about my week working on Krita during this first week of the coding period.

1. Implement a new output widget to scripter

In the start I'm intending to implement just a "clear" action to the output widget, but I figure out that this behavior can happen in other moments. What is it? My widgets can have children and your children can have children... Sometimes, I need to communicate with then from a different widget through the uicontroller. Now, in the findWidget method, I need to send two arguments: root/parent widget (A widget registered in the uicontroller when the scripter starts) and the searched widget (optional). The second one must be a child of the root widget.

My implementation in a nutshell:

  • findWidget method improved
  • New OutputWidget with the clear action inside it.
  • ClearAction that clears the OutputTextWidget
  • I change the old OutputWidget to OutputTextWidget

Review D6057 and created and commit pushed to my remote branch.

2. Trying to discover a problem with Scripter’s debugger.

That's a problem that I figure out some weeks ago and promise to myself that I would implement that. I will try to explain that in a few words: It's HARD.

When I tested the debugger feature some time that was working properly to all Python/PyQt scripts, including some basic method from the Krita API. Someday, I resolve to test all the methods in the API and ... SURPRISE... some methods was not working properly, but why?.

I tested this method in the normal execution and everything was OK, so I told to my mentor about it and he said, it could be a problem in the SIP or C++ code, then I relax and I focused in my exams and GSoC proposal (yeah, I was approved xD).

When I was selected to GSoC, this problem was in my mind and I promise to myself that I would try to understand that.

The first thing to understand my problem is to understand how I implemented this feature, so I did this prints below.

GSOC

The action that starts the debugger, calls the "start" method in DebugController, create an object that represents the current debugger class and calls start method in the Debugger. You can see a snippet of the debugger class, showing the start method.

GSOC

If you understand a little about asyncio, you know that the line 90 is waiting a asyncronous call. I'm using async, because I don't know when the Queue in display is not empty.

I have another process running executes the Debugger class that innerits from bdb.Bdb. Everything is working well, exept for one thing: I can't writein shared objects(Krita objects). When I started this implementation, I didn't figure out that and now, I have a huge problem.

I did try to solve that using threading module, but when I use this another problem is created, because if we try to write in some object that's in use, we have a race condition(Nooooo) and resolve that, my friends, it's really awful :/.

I have some ideas to solve this using generators from python with yield to save a state from debugger session, but I will try this in the future, because I need to implement some plugins to YESTERDAY.

3. Planning to implement a generic plugin/script to setColorSpace

  • I will implement a script or plugin to setColorSpace where the parameters can be selected from the script.

  • I need do implement one method to each set of parameters in the C++/SIP API.

  • Implement a method to validate the join of this parameters

That’s it for now, until the next week. See ya!!

June 04, 2017

I have been very happy with my printer except for one thing my printer uses a melzi board. The only issue is there is only one firmware for melzi. This makes testing firmwares in AtCore more difficult since I can’t test on a real machine. In order to do that I need to move to a RAMPS kit. This will allow me to flash just about any firmware that I want. I will keep the details to a minimum for this post would be really long otherwise.

IMG_20170512_150149.jpgRAMPS kit

After ordering the nessasary parts all the extra stuff I needed to complete this project I can finally begin. The first step is to build the ramps kit and then install some firmware with a sane configuration. For the first firmware I have decided to go with Repetier 0.92 since its the same as my old firmware.Using repetiers web configuration tool I ran thru all the steps only changing the required items. I was able to download and build this firmware and flash it in no time. The first test of the firmware and the screen didnt show anything. Checking the config I can see that I picked the wrong screen. With that fixed I could discover my next problem the control knob moved backward from what I was used to, it was to fast and had to high a repeat rate . So after a few more configs attempts I was able to get everything worked out and my board was now loaded with firmware.

IMG_20170518_174733Mid board swap

Time to take the old control box apart and wire up the new one.. There is only one problem the plugs dont all fit on the new. Every wire needs new connectors. I made all my crimps, wireed the new board and fired up the machine. But there were problems. Y moved in the wrong direction and the Z motors were spinnng wrong. It didn’t take long before I had these issues fixed. With the motors all checked and working I was ready to try the heaters. That was when the fun really started, almost instantly you could see smoke and the mosfet for the bed was burning up. This killed that ramps board so i had to order another.

After a few days of waiting I receved my new ramps board and an external mosfet for the heated bed. With those installed every thing was ready to be put into the old case. I had to made a ramps holder that didn’t push the reset button . I did this by printing a few ramps holders and chopping them up and glueing them back together in way that worked in my case.

IMG_20170520_144837Boards mounted in the old case

After that hack job was assembled I still needed to mount the mosfet board. Luckly I was able to find another mount and modify it to mount on the two unused melzi mouning posts.I also needed a way to get some space inside the case and a place to put my usb B external plug so we can plugin the ramps nicely from outside the case. I modified a 120mm fan adaptor to include space for my usb port and put the whole thing together to test. Its been working fine for about two weeks now and its printed about half of its new homes parts.


Para  cualquiera que quiera involucrarse en algún proyecto del Software Libre la asistencia a un evento comunitarios es casi imprescindible. Y aunque la asistencia es libre y gratuira es aconsejable que la organización tenga un ligero recuento de los posibles asistentes. Es por ello que quiero compartir con vosotros que ya está abierto el registro de #akademyes y #akademy 2017 de Almería y que, por supuesto, estáis invitado a hacerlo y así conocernos (o reencontrarnos) el próximo julio.

Abierto el registro de #akademyes y #akademy 2017 de Almería

Como ya sabréis muchos de los lectores del 20 al 21 de julio se celebra en la maravillosa ciudad de Almería Akademy-es 2017, el encuentro anual de usuarios,simpatizantes y desarrolladores de KDE de España.

Además, este año será la antesala de Akademy 2017, el mismo encuentro pero a escala internacional, que se celebrará del 22 al 27 del mismo mes y que viene cargado de grandes charlas e interesantísimos grupos de trabajo.

Es por tanto una oportunidad única para conocer de lleno a la Comunidad KDE en casi toda su extensión y que recomiendo sin lugar a dudas.

Abierto el registro de #akademyes y #akademy 2017 de Almería

Hace un días que se abrió el registro para ambos eventos con el que los organizadores quieren prever la asistencia a los mismos al tiempo que se pide un poco de información para confeccionar el identificador y otros aspectos más banales como necesidades alimentarias.

Para registrarse simplemente debéis acceder a la página de eventos y utilizar vuestra identidad de KDE. Si no la tenéis es el momento perfecto para abriros una cuenta, evidentemente es gratis y os será útil para todos los eventos futuros de la Comunidad.

No obstante advetir de un detalle, si vais a asistir a Akademy-es no olvidéis marca la opción al apuntar los días que estaréis por Almería. No es extraño que la gente se le olvide este detalle.

En fin, simplemente volver a animaros y …

¡Nos vemos en Almería!

 

June 03, 2017

Vuelven los pack de iconos al blog con Jade, una tema sencillo y colorido para Plasma 5 que especialmente diseñado para ser utilizado con el tema Jade-1 y basado Faenza and Mint-X. 

Jade, un tema de iconos plano para Plasma

El diseñadormadmaxms nos nos presenta Jade, un nuevo pack de iconos sencillos, claros y coloridos basado  en Faenza y Mint-X con los que podemos decorar de una forma diferente nuestro escritorio, como podemos ver en la imagen inferior.

Jade

Para conseguir una mejor harmonía en el escritorio, su creador nos aconseja utilizar el tema visual verdoso en combinación con blanco llamado Jade-1 y que podemos encontrar en Gnome Look.

Hay que destacar que este es el segundo pack de iconos de madmaxms que presento en el blog ya que este desarrollador ya nos ha ofrecido Obsidian.

Y como siempre digo, si os gusta el pack de iconos podéis “pagarlo” de muchas formas en la nueva página de KDE Store, que estoy seguro que el desarrollador lo agradecerá: puntúale positivamente, hazle un comentario en la página o realiza una donación. Ayudar al desarrollo del Software Libre también se hace simplemente dando las gracias, ayuda mucho más de lo que os podéis imaginar.

Más información: KDE Store

Cómo instalar Jade

Para instalar este tema tenéis que hacerlo a mano, es decir:

  • Bajaros el tema en formato comprimido
  • Descomprimirlo en la carpeta /home/USERNAME/.local/share/icons (la carpeta jade, la que contiene el tema con el index.theme)
  • Ahora iniciamos el Lanzador de aplicaciones o Kickoff
  • Clicamos en la Preferencias del sistema.
  • Ahora pinchamos en Apariencia del espacio de trabajo.
  • Ahora nos vamos a la sección de Iconos y ya deberíamo ver el nuevo pack en la lista de packs de iconos.
  • Ahora simplemente seleccionamos el pack y pulsamos Aplicar.

Tras unos segundos ya tendremos el flamante pack en nuestro sistema.

Podéis ver el proceso en imágenes en esta entrada del blog.

June 02, 2017

Some while ago I wrote about a little git hook that automatically sets up your commit author identity after git clone based on the remote origin address. Recently I learned that in git 2.8 a new pre-push hook was introduced, and I immediately knew it will fix my second biggest pain point: accidentally pushing directly into git instead of Gerrit.

If you often switch between different projects where some use Gerrit for code review and some don’t, it’s very easy to just mistakenly do

git push master

when in fact you wanted to

git push HEAD:refs/for/master

There are some tricks how to make it harder for you to accidentally do this, like creating a “gpush” alias that pushes to refs/for/master and disabling pushing into the ‘origin’ remote by changing the push URL to something invalid. That, however, is not perfect because there are still ways how to by-pass it. And it becomes complicated if you use more than one remote and it’s clumsy if you sometimes do want to push directly into git (for example to submit a large patch series).

With a custom pre-push hook, we can check if the remote that we are pushing into is a Gerrit instance and then check if the remote ref that we are pushing into is a “Gerrit ref” (refs/for/foo) instead of a regular branch and we can have a nice “Are you sure you want to do this?” prompt:

#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# (C) 2017 Daniel Vrátil <dvratil@kde.org>
# License: GPL

import os
import sys

def remoteIsGerrit(remoteName, remoteUrl):
    # if the remote is called "gerrit", assume it's Gerrit
    if 'gerrit' in remoteName:
        return True
    # if the remote URL contains the default Gerrit port, assume it's Gerrit
    if ':29418/' in remoteUrl:
        return True

    # TODO: Add custom checks to match your non-standard Gerrit configuration

    return False

def main():
    # name and URL of the remote we are pushing into is passed as arguments
    if not remoteIsGerrit(sys.argv[1], sys.argv[2]):
        # If we are not pushing into gerrit, then simply allow the push
        return

    # The pushed refs are passed in via stdin
    for line in sys.stdin:
        # line = "localRef localRev remoteRef remoteRev"
        remoteRef = line.split(' ')[2]
        # Check if the remoteRef contains the typical Gerrit 'refs/for/foo'.
        if not remoteRef.startswith('refs/for/'):
            print('!!')
            print('!! You are pushing directly into git instead of Gerrit !!')
            print('!! Do you want to continue? [y/N] ', end = '', flush = True)
            if open('/dev/tty', 'rb').readline().decode().strip().lower() == 'y':
                return
            else:
                sys.exit(1)


if __name__ == "__main__":
    main()

Save this a file as “pre-push” and move it into .git/hooks/ folder in your local repository clone. Remember to make the script executable.

Here is how it works: trying to push into “gerrit” remote to branch “5.9” directly gets intercepted by our new hook and if you press ‘n’ the push gets aborted. If I would’ve pressed ‘y’, then the push would proceed.

$ git push gerrit 5.9
Enter passphrase for key '/home/dvratil/.ssh/id_rsa.qt':  
!! 
!! You are pushing directly into git instead of Gerrit !! 
!! Do you want to continue? [y/N] n
error: failed to push some refs to 'ssh://dvratil@codereview.qt-project.org:29418/qt/qtbase.git'

Now when we try to push to the correct ref (refs/for/5.9) the hook accepts the push without any complaints:

$ git push gerrit HEAD:refs/for/5.9
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 407 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2)
remote: Processing changes: new: 1, refs: 1, done    
remote: 
remote: New Changes:
remote:   https://codereview.qt-project.org/......
remote: 
To ssh://dvratil@codereview.qt-project.org:29418/qt/qtbase
 * [new branch] HEAD -> refs/for/5.9

To have the hook automatically copied into every new repository that you clone, save it as “pre-push” into .git-templates/hooks/ and run the following command:

git config --global init.templatedir ~/.git-templates

Git will automatically copy everything from the ‘templatedir’ into the .git directory after every new git clone, so you don’t need to bother with doing that manually. Unfortunately for all your existing checkouts, you have to copy the hook manually

June 01, 2017

KStars has a long history and many developers touched the >136000 lines of C++ codes. The goal of my GSOC project to do a major overall improvement and bring the modern C++ features to improve the stability as well as fix the memory handling errors. I have the following goals in June to make KStars better:

May 30th to June 26th:

 ● Add ccache support
 ● Add hardening support to the CMake build system (improve security)
 ● Add Clang specific improvements to the CMake build system
 ● Add Clang sanitizers to the CMake build system
 ● Run the KStars application with the sanitizers enabled and fix all memory error found by these tools
 ● Add Unity build to the CMake build system to cut the build time
 ● Refactor codes to modern C++11/C++14 what I get in touch while fixing bugs.
 ● Add documentation about the improvements and the sanitizers to the wiki pages.

My mentor: Jasem Mutlaq

After all that FreeBSD shuffling, I’m going to move myself, too. For the past six years I’ve been commuting by train to Utrecht, where I worked at the Dutch Association of Audiological Centres on patient systems, financing, some data analysis and all the other stuff that happens in a small organization with a broad remit (also “help! the website is down!”). Starting today I’ll be moving less far, and commuting to my office upstairs instead.

As of today, I’m an independent contractor; the domain cnossos.nl which I registered ages ago when I last worked with Sebas is now in use.

As of today, I’m working with Blue Systems on the Calamares Installer Framework. Not a KDE project, but an independent, Qt-based, Free Software project used by Linux distro’s like Manjaro and Netrunner (which in turn ship KDE Plasma Desktop images). As a FreeBSD person, it feels a little weird to be writing Linux installers, but I have a secret hobby project for Calamares, too: adding ZFS install support and maybe even getting it to work as a FreeBSD installer. But that’s hobby, outside of the regular maintainence work I’ll be doing.

As of today, I’m working with the ARPA2 project on LDAP tooling and the IdentityHub project. That’s a lot of bit-banging, sometimes in C, which feels a little primitive when coming from a C++ background (I should look at Go sometime).

As of today, I’m still working with the Dutch Association for the Evaluation of Hearing Aids, but only as their occasional website-and-database-futzing dude.

As of today, I’m a full time freelance Free Software contributor. I’ve got a mantra: “if I use it, I’ll aggressively improve it”. Which means there’s plenty of patches coming down the line, for Charm time tracker for one thing.

May 31, 2017

This is the second post in my GSoC series. You can read the first one here.

When creating anything from scratch you really have to choose the best resources and tools for the job: if you are baking a cake you want the best ingredients, if you are building a table you want the best wood. The same goes for creating software, one should alwasy aim at using the best technologies availbale.

Finding the best tools in Web Development is sometimes not an easy task, this field moves so fast that one can’t possibly keep up with all the new libraries, frameworks and methodologies (That’s why sites like Days Since Last JavaScript Framework exists).

The best possible way to find the right combination of tools for a project is by experimenting with as many tools as possible, discarding the one you don’t like and keeping the one you like the most (or, sometimes, dislike the less).

And this is exactly what I started to do in the last months. I got out of my web development comfort zone and gave a try to some new things. Some I didn’t like and many others I loved. Yes, sometimes it felt like this article but I am learning tons of new stuff, which is what matters.

During this Google Summer of Code I will keep experimenting and use many of the concepts I learnt recently: let’s wait no more, here is an overview of what I will be using to create WikiToLearn new frontend.

Frontend

Since we are building a PWA the most (and for many use cases, the only) important thing to consider is the frontend technologies.

Since we are building something a little bit complex it is definitely worth it to use some kind of frontend framework. There are many out there (React and Angular are probably the most popular) and after trying a few of these I decided to choose Vue.js.

Vue Logo

Not only it is one of the most lightweight (and fast) framework available, it is actively developed and has an awesome and welcoming community. It is far from being as popular as React or Angular but in the near future I hope it will reach their popularity, because it deserves it.

I choose it because it is simple enough for newcomers but powerful for experienced users. Its templating language is also very easy to understand: I never liked React and its JSX.

Out of the box it only provides the minimal required functionalities: it is more of a micro framework that you can complete with additional (but alwasy optional) libraries. In our case we will use Vuex for state management (think of it as a global variable which does control the state of the application) and vue-router for route managament (it does basically control which parts of the interface to display based on the links you click).

Writing code

For writing HTML code for components and views we decided to use pug instead of plain HTML. This is because pug forces you to indent your code properly (in the same way Python does): it may seems like a small reason but this means that one is forced to write clearer code, something very important when working on a open source project.

For styling the interface we are using Sass. We have been using this for some time and it does it job very well. Since we already have some parts of the interface styled in Sass it will be easy to port them.

For Javascript we will be writing ES6 Javascript: this allows us to write cleaner and easier to understanand code, all thanks to the syntatic sugar it provides. Of course many browsers don’t understand ES6, that’s why we are transpiling it to ES5 Javascript using buble.

Bundling with webpack

A few years ago there were Bash scripts, then grunt came, then gulp. Nowadays everyone is moving to webpack. Although all the previous mentioned solutions are still valid (and one may say compltely different from webpack), webpack does allow faster development and better building for production.

Webpack

When executing our build-for-production configuration, webpack takes care of many interesting tasks:

  • delete unused code and minify used one
  • compile pug to HTML, Sass to CSS, ES6 to ES5
  • localize the PWA to different languages
  • inline images by converting them to Base64
  • build an HTML file with all the scripts and styles already linked
  • automatic generation of a service worker for caching
  • much more

Although all of these (actually not all) were probably possible with the existing tools it is definitely worth it to invest time in learning webpack: with webpack you just specify the configuration, without defining the work pipeline (in Gulp you had to control which tasks to execute in which order).

Coding Conventions

Since it is very important to write consistent code in term of conventions, we will be using linters all over the codebase. Most importantly we will lint the source Javasript (via EsLint), using Google’ style guide as a base, but we will apply a few customizations to it. We will also lint our CSS via stylelint.

Linters will be running both when developing and when building for production, forcing the developer to fix the existing code according to the linters: you won’t be able to run your code unless it is written correctly.

And yes, we will be using tabs, not spaces: this is where EditorConfig is very important:

EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs.

Backend

Server Side Rendering

Since we want to keep basic compatibility for people without Javascript and for slow devices we decided to implement server side rendering.

This means that every request will be pre-rendered server side before reaching the browser; Most of the Web Application out there don’t pre-render the code, sending to the browser just an almost empty page, leaving to the browser the work to render the interface: this means that if you don’t have JS enabled, you are out of luck, nothing will display.

With SSR, even if you don’t have JS, you will at least be able to use the basic functionalities of the website, such as reading pages.

Serving the PWA

For serving the PWA to the public we will use a Node.js server, running Express. Node.js is absolutely needed because we want server side rendering: without it we could have used just a simple HTTP server such as Apache or nginx.

The template

In the past months I have been developing (together with another friend of mine) a Vue-based PWA boilerplate project which serves as a starting point for everyone looking to develop a progressive web app with Vue.

I was going to develop this template anyway regardless of GSoC, because right now there is not a single example project out there with as many features as this one: as soon as I head I was selected I began finalizing the details especially needed for WikiToLearn.

Template for a PWA The generic template: very simple

If you are interested on the template it is available on Github. Don’t worry, there is plenty of documentation that explains everything.

What’s next?

I will be now forking the template and start using it as a base for the WikiToLearn PWA. I will be publishing the project on KDE’s git: check it out here

In the next weeks I will be developing the first few features for the web app, focusing on the browsing and reading functionalities.

Let me know what you think about this post in the comments. Expect another post as soon as I have something good to show you.

Qt 5.9 has just been released!

This release marks two important milestones for the Qt Project. The first is that now the Qt 5 series has had more releases than any other Qt version ever (the last release of the Qt 4 series was Qt 4.8). The second milestone is that Qt 5.9 will be a Long Term Support release, therefore providing to many users a stable foundation to build their applications upon.

KDAB has been a significant contributor to this release, as shown by the number of commits by KDAB developers merged into Qt. In this blog post I will showcase some of the most outstanding contributions to Qt 5.9 developed by KDAB engineers. continue reading

The post KDAB contributions to Qt 5.9 appeared first on KDAB.

Quoting from a message Tobias C. Berner sent to the kde-freebsd mailing list:

The development repository that the KDE-FreeBSD team uses to work on the KDE for FreeBSD is moving to github. For a long time we have been using’, an SVN repository kindly hosted by PC-BSD and iX Systems. At this point in time, we believe that moving to github will make the ports a bit more accessible for users and align our ports-development effort better with the way upstream (that is, with official FreeBSD ports) works. We would like to express our thanks to PC-BSD for hosting us all this time, in particular Josh Paetzel for administering the repository. In the coming days we will be updating documentation to reflect the new source of KDE-FreeBSD ports.

The repository can now be found at freebsd/freebsd-ports-kde, where the plasma5 branch is a ports tree with all the updates from the old svn repository.

The main difference between the old svn repository and the new one is, that like gnome@ and xorg@, we now have a complete portstree. So the kdemerge script previously used is obsolete — however, this also mean, that we will lag behind ports-master, which we will try to sync with every weekend.

Thanks also to bapt@ for helping set up this ports tree, and kwm@ for helpful suggestions based on what the GNOME-FreeBSD team has done.

We’re updating the documentation (in the KDE Community Wiki), but mostly things will be simpler, and it may make sense to simply checkout /usr/ports from the KDE-FreeBSD ports tree instead of anything else. We’ll continue to call it “Area51”, even if that string doesn’t occur in its name anymore.

May 30, 2017

Cutelyst the Qt / C++11 web framework just got another important release.

WebSocket support is probably a key feature to have on a modern web framework, Perl Catalyst doesn’t look like it wasn’t designed with it in mind, the way I found to do WS there wasn’t intuitive.

Qt has WebSocket support via QWebSockets module, which includes client and server implementation, and I have used it for a few jobs due lack of support inside Cutelyst. While looking at it’s implementation I realized that it wouldn’t fit into Cutelyst, and it even had a TODO due a blocking call, so no go.

I’ve looked then at uWSGI implementation and while it is far from being RFC compliant or even usable (IMO) the parser was much simpler, but it required that all data was available to parse. Since messages can be split into frames (really 63bits to address payload was probably not enough) and each frame has a bit to know if the message is over, which uWSGI simply discards, thus any fragmented message can’t be merged back.

WebSockets in Cutelyst have an API closer to what QWebSocket has, but since we are a web framework we have more control over things, first on your websocket endpoint you must call:

c->response->webSocketHandshake()

If the return is false just return from the method to ignore the request or it might be the case that you want the same path to show a chat HTML page, this can happen if the client didn’t sent the proper headers or if the Engine backend/protocol doesn’t support WebSockets. If true you can connect to the Request object and get notified about pong, close, binary and text (UTF-8) messages and frames, a simple usage is like:

connect(req, &Request::webSocketTextMessage, [=] (const QString &msg) {
  qDebug() << "Got text msg" <webSocketTextMessage(msg);
});

This will work as a Echo server, the signals also include Cutelyst::Context in the case you are connecting to a slot.

Cutelyst implementation is non-blocking, a little faster than QWebSockets, uses less memory and passes all http://autobahn.ws/testsuite tests, it doesn’t support compression yet.

systemd socket activation support was added, this is another very cool feature although it’s still missing a way to die the application on idle. On my tests with systemd socket activation, Cutelyst started so fast that the first request that starts it takes only twice the time it would take if Cutelyst was already running.

This release also include:

  • Fixes for using cutelyst-wsgi talking FastCGI to Apache
  • Workaround QLocalServer closing down when an accept fail (very common when used on prefork/threaded servers)
  • Fixed when using cutelyst-wsgi on threaded mode, POST requests would use the same buffer corrupting or crashing.
  • A few other fixes.

Due WebSockets plans for Cutelyst 2 are taking shape, but I’ll probably try to add HTTP2 support first since the multiplexing part is might make Cutelyst Engine quite complex.

Have fun https://github.com/cutelyst/cutelyst/archive/v1.7.0.tar.gz


Plasma 5.10 is just out with many spangly new features to make your desktop run smoother.

Being able to group and ungroup windows in the task bar is a small but handy feature when you turn it on.

Having icons back on the desktop is on by default incase you want to mess up your desktop.

Future proofing is happening with improvements to Wayland (install plasma-workspace-wayland if you want to try it out) and experimental support for Snaps.

KDE neon User Edition 5.10 is out now with the latest packages.  Grab it and try out or just upgrade for existing users.

 

 



Plasma 5.10

KDE Plasma 5.10

Monday, 30 May 2017. Today KDE has released Plasma 5.10 with new features across the suite to give users an experience which lives up to our tagline: simple by default, powerful when needed.


Panel Task Manager





Middle Mouse Click to Group

Task Manager, the list of applications in the panel, has gained options for middle mouse click such as grouping and ungrouping applications.

Several other improvements here include:

  • Places jump list actions in File manager launchers (e.g. pinned Dolphin in Task Manager now lists user places)
  • The icon size in vertical Task Managers is now configurable to support more common vertical panel usage patterns
  • Improved app identification and pinning in Task Manager for apps that rely on StartupWMClass, perl-SDL-based apps and more


Folder View Is the New Default Desktop



Spring Loading in Folder View

Folder on the Desktop by Default

After some years shunning icons on the desktop we have accepted the inevitable and changed to Folder View as the default desktop which brings some icons by default and allows users to put whatever files or folders they want easy access to. Many other improvements have been made to the Folder View include:

  • Spring Loading in Folder View making drag and drop of files powerful and quick
  • More space-saving/tighter icon grid in Folder View based on much user feedback
  • Improved mouse behavior / ergonomics in Folder View for icon dnd (less surprising drop/insert location), rectangle selection (easier, less fiddly) and hover (same)
  • Revamped rename user interface in Folder View (better keyboard and mouse behavior e.g. closing the editor by clicking outside, RTL fixed, etc.)
  • Massively improved performance in Folder View for initial listing and scrolling large folders, reduced memory usage
  • Many other bug fixes and UI improvements in Folder View, e.g. better back button history, Undo shortcut support, clickable location in the headings, etc.
  • Unified drop menu in Folder View, showing both file (Copy/Move/Link) and widget (creating a Picture widget from an image drop, etc.) drop actions
  • It is now possible to resize widgets in the desktop by dragging on their edges and moving them with Alt+left-click, just like regular windows


New Features Everywhere

Lock Screen Now Has Music ControlsLock Screen Now Has Music Controls

 

Software Centre Plasma SearchSoftware Centre Plasma Search offers to install apps

 

Audio Volume Device MenuAudio Volume Device Menu

There are so many other improvements throughout the desktop, here's a sample:

  • Media controls on lock screen
  • Pause music on suspend
  • Software Centre Plasma Search (KRunner) suggests to install non-installed apps
  • File copying notifications have a context menu on previews giving access to actions such as open containing folder, copy, open with etc
  • Improved plasma-windowed (enforces applet default/minimum sizes etc)
  • 'desktop edit mode', when opening toolbox reveals applet handles
  • Performance optimizations in Pager and Task Manager
  • 'Often used' docs and apps in app launchers in addition to 'Recently used'
  • Panel icons (buttons for popup applets, launcher applets) now follow the Icons -> Advanced -> Panel size setting in System Settings again, so they won't take up too much space, particularly useful for wide vertical panels
  • Revamped password dialogs for network authentication
  • The security of the lock screen architecture got reworked and simplified to ensure that your system is secured when the screen is locked. On Linux systems the lock screen is put into a sandbox through the seccomp technology.
  • Plasma's window manager support for hung processes got improved. When a window is not responding any more it gets darkened to indicate that one cannot interact with it any more.
  • Support for locking and unlocking the shell from the startup script, useful especially for distributions and enterprise setups
  • Audio Volume applet has a handy menu on each device which you can use to set is as default or switch output to headphones.


Improved touch screen support



Virtual keyboard on Log In and Lock Screen

Virtual keyboard on Log In and Lock Screen

Touch Screen Support has improved in several ways:

  • Virtual Keyboard in lock screen
  • Virtual Keyboard in the login screen
  • Touch screen edge swipe gestures
  • Left screen edge defaults to window switching
  • Show auto-hiding panels through edge swipe gesture


Working for the Future with Wayland

We have put a lot of work into porting to new graphics layer Wayland, the switch is coming but we won't recommend it until it is completely transparent to the user. There will be improved features too such as KWin now supports scaling displays by different levels if you have a HiDPI monitor and a normal DPI screen.

Keyboard layout support in Wayland now has all the features of X11:

  • Layout switcher in the system tray
  • Per layout global shortcut
  • Switch layout based on a policy, either global, virtual desktop, application or per window
  • IPC interface added, so that other applications can change layout.


Plymouth Boot Splash Selection



Plymouth KControl Module

Plymouth KControl Module

A new System Settings module lets you download and select boot time splashes.


Bundle Packages



Selecting a file using file chooser portal, invoking openURI portal and notification portal

Flatpak integration with xdg-desktop-portal-kde: selecting a file using file chooser portal, invoking openURI portal and notification portal

Experimental support for forthcoming new bundle package formats has been implemented. Discover software centre has gained provisional backends for Flatpak and Snappy. New plugin xdg-desktop-portal-kde has added KDE integration into Flatpak packaged applications.

Support for GNOME’s Open Desktop Ratings, replacing old Ubuntu popularity contest with tons of already existing reviews and comments.


Full Plasma 5.10 changelog

1 month of GSoC is already over and the coding period has officially begun. Here’s a highlight of what I did and what I plan to do for this week

Most of the time of community bonding period was spent giving college exams. By the time my exams got over,  I only had a week left to make something useful of the community bonding period time.

The last week started with a discussion with my mentor , where we decided which API to use to port the back ends.  We had to  decide between QProcess and KProcess. Just a brief of what these APIs do:

QProcess is used to start external programs and to communicate with them. The communication between QProcess and the external program happens through channels. The three standard channels used for communication are
Standard output(stdout): supplies regular console output
Standard error(stderr): supplies the errors that are printed by the process
Standard input(stdin): provides input to the process

KProcess is no different from QProcess. It inherits QProcess and extends it by by some extra and useful functionality

Since a few of the back ends of cantor were already using KProcess, we had to decide whether we actually need KProcess or whether QProcess will suffice our needs. The best  way to  decide this  was to port a back end which makes use of KProcess to QProcess.

Port of Scilab to QProcess

The port process was pretty simple and did not take more than an hour to port and test. The test was performed  on various inputs including plot commands.
You can have a look at the commit that actually does the port
Since Everything worked fine, we decided to move forward with QProcess and use it for other back ends

Plan for this week

The very first back end I have decided to work on is Qalculate. Qalculate at the moment uses libqalculate library for all the calculations.
To get rid of libcalulate, we will be making use of qalc which is the command line interface for Qalculate
This week  I’ll be concentrating on setting up basic communication  between Cantor and  Qalculate using  qalc

Let the hacking begin!


May 29, 2017

The KDE/FreeBSD website has been around for a long time. It has been the repository of much (well, maybe some) wisdom around KDE-on-FreeBSD. But as a repository of knowledge, it has been rather limited in recent years: it lives in KDE’s source-code repositories, and as such has a pretty high barrier to entry. You need a KDE developer account to edit it, for one. And then, editing PHP files in git is not fun, if you’re trying to contribute documentation, howto’s, or screenshots.

So the content has almost entirely migrated to the KDE Community wiki.

The community wiki is described as:

Community.kde.org is the working area for the KDE community. It provides a place for sharing information within the community, including policies, guidelines and coordination.

That’s most of what f.k.o does, so putting it somewhere more accessible, and easier to edit, makes sense.

There’s only two things really left in git: the team page, describing who is on the team, and the in-memoriam page for Alan Eldridge. Neither of those is, in my opinion, up for community-editing-debate.

So now’s the time for FreeBSD-using KDEsta’s, and KDE-using FreeBSDudes, to get the content together!

Few hours to go for the start of the coding period of GSoC, and here are my plans for the first week.

As mentioned in my proposal, I will be starting off with the Pilot a Submarine activity. In this week, I will be focusing on the tutorials and the basic structure of the levels of the activity as follows (may be subject to change, depending on feedbacks):

  • There will be 10 levels approximately in the activity, in 3,4,3 format (first 3 = beginner level, next 4 = intermediate and last 3 = challenging)
  • The initial levels will be tutorial levels. It will be mostly used to explain the various components of the submarine: the enigne, rudders and the air tanks. This will take up the 3 basic levels, with each of the components being explaned in each of the first three levels.
  • The intermediate level will mostly contain items like obstacles and jewels in the form of pickups to increase the difficulty curve of the levels
  • The final challenging levels (the number of levels of this types may be reduced to one, depending on the difficulty) will require the player to react a bit faster, the “gate” (from the original “Pilot a Submarine” activity) will be closing instead of opening and the player will need to complete the level before the gate closes, thus require the player to act faster compared to that of the previous intermediate levels.
  • If time permits me, I will move on to implement the functionalities of the submarine using box2d. Also, I will be looking forward to improving the controls of the submarine to make it more intuitive for the children to understand. Any suggestions regarding it is always welcome!

More in depth on the progress of the implementation and mockups of the levels will be posted in the blog, as the work progresses.

For any feedbacks related to the plans, feel free to contact me regarding it:

  • Email: rudra.nil.basu.1996@gmail.com
  • Freenode IRC nick: rudra / rudra_

Following blog post from Patrick Griffis about new themes support in Flatpak, we started working on supporting this new feature too. Currently wherever you start a Qt application, it would always look like a KDE application or something would be missing, like icons so you would end up with bad experience and mixed feelings. This is going to change now as we now support Gnome in form of icons, widget style and Qt platform theme and with this, when you run a Qt application in Gnome, it will look definitely better and more natively than before. We packaged regular adwaita icons which are used by default in Gnome as extension of freedesktop runtime. For widget style we use adwaita-qt style, which is a Qt style attempting to look like Gtk’s adwaita and the most important part putting this all together is QGnomePlatform, a Qt platform theme which reads your Gnome configuration and applies it to running Qt applications. QGnomePlatform also enforces Qt apps to use adwaita icons and adwaita-qt style by default so that’s another reason why it is important. Both adwaita-qt and QGnomePlatform projects are by the way authored by Martin Bříza, a collegue of mine from Red Hat so if you meet him in person somewhere buy him a beer for that he cares about Qt integration in Gnome :). Now coming to a question how to install this and make it work. Basically all you need to do is install following extensions and you shold be done:

flatpak install kderuntime org.freedesktop.Platform.Icontheme.Adwaita
flatpak install kderuntime org.kde.KStyle.Adwaita
flatpak install kderuntime org.kde.PlatformTheme.QGnomePlatform

Your Qt apps running in flatpak should then automatically pick up all of these extensions without any further modification, same way it does automatically when you run it outside the sandbox. Simply done!. I’m also aware that there are more Gtk themes, like adwaita-dark or high-contrast, both are also available in form of Qt style and we will probably package them later, but at this point it is mostly proof of concept that this can be done and works nicely. You can follow our wiki page if you want more information about runtimes, repository with applications and so on and from me it’s all for now.

Btw. below you can see okular running in flatpak and using adwaita-qt style with adwaita icons.

Hi everyone, is everything ok? I hope so.

Today, I will talk about my week working on Krita during this community bonding period that ends this Wednesday.

I will try to be more concise this week and I will explain what I've made in a short list.

1. Unit tests to Python scripting API

I made previously, the integration of python tests with cmake. Now, I implemented tests to all classes that don’t need a GUI to work, at least partially. I wrote tests to classes below:

  • Action
  • Filter
  • InfoObject
  • Extension

When you implement tests, you naturally find errors. I found some inconsistencies that I fix, but I need to understand others behaviors, like setConfiguration method in the Filter class.

Reviews(D5967 and D5982) created and commits pushed to my remote branch.

2. Improve Scripter plugin

As I told in my introduction for GSOC, I'm intending to use the Scripter to execute and edit scripts.

When I started to work in this plugin, we was using the exec function(python 3) in python to run all the code from the editor, but it's really more complex to implement and maintain the scripter using exec, mainly when using files where we can create classes and all.

Now the implementation creates a python module to refer to files, but the Scripter still using exec when the code is executed without saving files. You can see a peace of code below:

if document:
    spec = importlib.util.spec_from_file_location("users_script", document.filePath)
    users_module = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(users_module)
    users_module.main()
else:
    code = compile(script, '<string>', 'exec')
    empty_scope = {}
    exec(script, {})

If you need more details about my reasons to take this decision please read this comment in the task thread.

3. Krita community

  • I’m following other tasks in the Krita to know what people have made.

  • Talking with my mentors to understand some important implementations.

  • Reading documentation to libkiss. Thanks, Wolthera :).

That’s it for now, until the next week. See ya!!

May 28, 2017

The KDE Continuous Integration system builds KDE software from scratch, straight from the git repositories, and usually from master (or whatever is considered the development branch). It’s been building for Linux for a long time, and has recently been expanded with FreeBSD servers as well. KDE sysadmin has been kind enough to provide two more VMs (with some more compiling “oomph”) so that we can keep up better, and the CI has just been expanded with all of the Plasma products. That means we’re now building KDE Frameworks, and the Plasma desktop.

Results are still in the sandbox, but will eventually end up in the maiin CI.

Frameworks are all blue (good) or yellow (not-quite-good .. but I can’t really tell what Jenkins’ criteria are for making something yellow). Plasma is now in-progress: what we’re trying to do is merge as much as we can from FreeBSD ports to upstream, so that code only needs maintainence once. Today’s small fix is dealing with PAM, where Linux has pam_syslog() defined in the library, and FreeBSD does not.

May 27, 2017

KDevelop 5.1.1 released

We are happy to announce the release of KDevelop 5.1.1, the first bugfix and stabilization release for KDevelop 5.1!

Get it

Together with the source code, we again provide a prebuilt one-file-executable for 64-bit Linux (AppImage), as well as binary installers for 32- and 64-bit Microsoft Windows. You can find them on our download page.

The 5.1.1 source code and signatures can be downloaded from here.

Please give this version a try and as always let us know about any issues you find via our bug tracker.

ChangeLog

Prebuilt binaries

  • Windows installer: Fix missing icons on Windows installers.
  • AppImage: Ship Breeze widget style. T3538
  • AppImage: Ship Sonnet plugins (based on aspell, hunspell, hspell). T4100
  • AppImage: Ship some default colour schemes (to be used with Settings -> Colour Scheme) with AppImage.
  • AppImage: Built with KF5SysGuard support: Enables "Attach to process" in the AppImage. T5878

kdevplatform

  • Do not extract all template preview images, load from archives on demand. Commit. Phabricator Code review D5701
  • Use https://www.google.com instead of http://www.google.de in google selection external script. Commit. Phabricator Code review D5719
  • Use consistent icon names for build stuff, remove left-over legacy icons. Commit. Phabricator Code review D5651
  • Appwizard: fix broken disconnect in ProjectVcsPage. Commit. Phabricator Code review D5536
  • Stop unused & broken exposure of Project object on D-Bus. Commit. Phabricator Code review D5607
  • Appwizard: store chosen vcsPlugin in developer .kdev4 file. Commit. Phabricator Code review D5513
  • Backgroundparser: Relax assert a bit. Commit. See bug #378933
  • Work-around issue in Path(QString) ctor. Commit. See bug #378933
  • Fix preview file wrongly added on project generation from app template. Commit. Phabricator Code review D5314
  • Fix support for multiple files and relative paths in ShowFilesAfterGeneration. Commit. Phabricator Code review D5316
  • Load Template From File dialogs: fix wrong filter strings usage. Commit. Fixes bug #376040. Phabricator Code review D5155
  • Find/Replace in files: Do not wrap content of tooltip for an output line. Commit. Phabricator Code review D5135

kdevelop

  • Install xdg mimetype definition for OpenCL C. Commit. Phabricator Code review D5621
  • Move print from int to unsigned int. Commit. Phabricator Code review D5654
  • Fix build for MinGW. Commit. Fixes bug #379454
  • Look for Cppcheck as RUNTIME dependencies. Commit. Phabricator Code review D5632
  • The OpenCL language is actually called OpenCL C. Commit. Phabricator Code review D5485
  • Remove unneeded mimetype for *.kdevinternal files. Commit. Phabricator Code review D5624
  • Create KAboutData object only after QApp instance, for working translations. Commit. Phabricator Code review D5598
  • CMake - fix bug with dropping changed settings for existing build directory. Commit. Phabricator Code review D5609
  • Drop explicit %{PROJECTDIR}/ from templates' ShowFilesAfterGeneration. Commit. Phabricator Code review D5531
  • Remove unused "VersionControl" entries from kdev4 samples/templates. Commit. Phabricator Code review D5512
  • Fix ShowFilesAfterGeneration to match generated files. Commit. Fixes bug #378499
  • Update Qt logo image. Commit. Phabricator Code review D5278

kdev-python

  • Fix crash in syntax fix-up code. Commit. Partially fixes bug #378827.
  • Pep8: Make pep8 warnings less annoying. Commit. Phabricator Code review D5397

kdev-php

  • Fix duchain unit tests. Commit. Phabricator Code review D5817
kfunk Sat, 05/27/2017 - 10:00
Category

May 26, 2017

A new stable release for KIO GDrive is now available, version is 1.2.0. The main change is the integration with Plasma/KAccounts. Have a look at my previous post for more details.

You can find the link to the source code in the wiki page: https://community.kde.org/KIO_GDrive

Enjoy!

Today we’re releasing Krita 3.1.4. This strictly a bug-fix release, but everyone is encouraged to update.

  • Fix a crash when trying to play an animation when OpenGL is disabled in Krita
  • Fix rendering animation frames if the directory you’re trying to render to doesn’t exist
  • Don’t open the tablet/screen resolution conflict dialog multiple times
  • Don’t scale down previews that are too small in the transform tool: this fixes a rare crash with the transform tool
  • Don’t crash when trying to close the last view on the last document while the document is modified.
  • Fix a crash when cycling quickly through layers that have a color tag
  • Fix loading some Gimp 2.9 files: note that Gimp 2.9’s file format is not officially supported in Krita
  • Fully remove the macro recorder plugin: in 3.1.4, only the menu entries had stayed around.
  • Make it impossible to hide the template selector in the new image dialog; hiding the template selector would also hide the cancel button in the dialog.

Download

The KDE download site has been updated to support https now.

Windows

Note for Windows users: if you encounter crashes, please follow these instructions to use the debug symbols so we can figure out where Krita crashes.

Linux

(For some reason, Firefox thinks it needs to load this as text: to download, right-click on the link.)

A snap image for the Ubuntu App Store will be available from the Ubuntu application store. When it is updated, you can also use the Krita Lime PPA to install Krita 3.1.4 on Ubuntu and derivatives.

OSX

Source code

md5sums

For all downloads:

Key

The Linux appimage and the source tarball are signed. You can retrieve the public key over https here:
0x58b9596c722ea3bd.asc
. The signatures are here.

Support Krita

Krita is a free and open source project. Please consider supporting the project with donations or by buying training videos or the artbook! With your support, we can keep the core team working on Krita full-time.

In the beginning there was …

 

That’s how things start, right? And in the beginning there were punch cards. The UI was rudimentary direct machine language, so we could say there was no UI. So let there be light!

In very simplistic terms that was a screen where one could type text (using a keyboard) and see the same text on the screen … maybe get some feedback on the results of a command. And let the animation begin!

The post What makes for good animation? appeared first on KDAB.

Last year, GDQuest’s Nathan Lovato ran a succesful kickstarter: “Create Professional 2D Game Art: Krita Video Training”. Over the past year, he has produced a great number of videos for Krita, and has helped the Krita team out with release videos as well.

This year, he’s going to teach you how to use your art in a real game. Learn how to use Godot to create games with GDQuest, on Kickstarter now to bring you the first premium course for the engine, with the support of the Godot developers.

During the campaign, you get a free game creation tutorial on YouTube, every day!

Please check it out now, and spread the word: Make Professional 2d Games: Godot Engine Online Course

GDQuest reached the goal in less than 12 hours. Everything above it means more
content for the backers, but also for everyone! GDQuest will also contribute to
Godot 3.0’s demos and documentation. All the money will go to the
course’s production and official free educational resources.

Check out the Free daily tutorials on Youtube!.

May 25, 2017

Qt for Device Creation provides ready disk images for a variety of devices. When you flash it to a device, start enterprise Qt Creator and plug the device in via USB, it will be detected automatically. You are ready to run, debug and profile your applications right on the device. From a user’s point of view the green marker for a ready device just appears.

ready-device

But how do we actually see the device? There have been changes here for 5.9 and in this post I’ll discuss what we ended up doing and why.

How things used to be

Previous versions of Qt for Device Creation use Android Debug Bridge (ADB) for the device discovery. As you can guess from the name, it’s the same component that is used in the development of Android applications. It was a natural choice early in the development of the Boot2Qt when Android was a supported platform along with embedded Linux. But nowadays we focus on embedded Linux only. (In Device Creation with the device images, Qt can of course still be used to build applications on Android.)

Due to requiring Google’s USB drivers, ADB has made installing more complicated than desired for our users on Windows. And when they jumped through the hoops, they could end up with a different version than we tested against. There’s also the risk of mixups with Android development environments, who may include their own versions of ADB. There were also some things missing, which required working around inside our Qt Creator integration.

Recognizing USB devices

So to avoid those issues we decided to decided to write our own debug bridge, which we without extraneous imagination called QDB. It looks for Boot2Qt devices in a similar way as the purpose of other USB devices is discovered. When a device is enumerated in the universal serial bus, it describes its class, subclass and protocol. For example for my mouse the command lsusb -v reveals:

      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse

There is a vendor-defined class 255. We have picked a subclass and protocol inside that which our devices use, thus allowing QDB to find them. Finding them is of course not enough, since there needs to a way to transfer data between the host computer and the device.

Network over USB

ADB implements file transfers and port forwards. It transfers the data over the USB connection using its own protocol. One obvious option would have been to do the same thing. That would have been reinventing the wheel, as was quickly pointed out by many. There was also a second place where duplication of effort to accomplish the same thing was happening. The Boot2Qt plugin for Qt Creator was implementing support for running, debugging and profiling applications with ADB. But Qt Creator also supports these things with any Linux device over SSH through the RemoteLinux plugin. If we were able to use SSH, all of that duplication could be gotten rid of (after the support window for older Qt for Device Creation releases runs out).

Linux allows a device to present itself as an USB Ethernet adapter with the kernel module usb_f_rndis. The device then shows up as a network card in both Linux and Windows. This way we can have a network connection between the host computer and the device, which allows the use of SSH and thus the desired reuse. And apart from Qt Creator activity, the user can also use regular SSH to connect to the device. It has a properly resizing terminal, unlike adb shell! All the other things you might do over the network also become possible, even if the embedded device has no Ethernet socket.

But there’s something we glossed over. Networks don’t configure themselves. If the user would need to set the right IP address and subnet mask on both the computer and the device, then we certainly wouldn’t meet the bar of just plugging in the device and being ready to go.

Configuring the network

Now despite what I just said there actually are efforts for networks to configure themselves. Under the umbrella term zeroconf there are two things of interest in particular: link-local IPv4 addresses as specified in RFC 3927 and mDNS/DNS-SD, which allows finding out the addresses of devices in the network. For a while we tried to use these to accomplish the configuration of the network. However, getting the host computer to actually use link-local addresses for our network adapter proved fiddly and even if it worked there was a bit too long delay. The connection only works after both the host computer and device have gotten their IP which wasn’t predictable. I hope we will be able to revisit mDNS/DNS-SD at some point, because it might allow us to provide device discovery when devices are connected over Ethernet instead of USB, but for now zeroconf required too much configuration.

Another thing which we looked at was using IPv6 link-local addresses. Unlike their IPv4 cousin they are part of the protocol and always available, which would eliminate the delays and configuration burden. Here the downside is that they are a bit more local to the link. An IPv4 link-local IP is from the block 169.254.0.0/16 and you can just connect to it regularly. IPv6 versions use the prefix fe80::/10, but they also require a “scope ID” to describe the network adapter to use. I’d rather not write

ssh user@fe80::2864:3dff:fe98:9b3a%enp0s20f0u4u4u3

That’s superficial, but there was also a more important issue: All the tools would need to support IPv6 addresses and giving these scope IDs. GDB – which we use for debugging – didn’t.

Back to the drawing board. The simplest approach would be picking up a fixed IP address for the devices. That has two issues. First, you can’t connect more than one device. Second, the fixed IP address might already be in use on the host computer. We ended up using the following approach to circumvent these problems: The same process that recognizes the USB devices knows a list of candidate network configurations in the private use IPv4 ranges. When a new device is connected, it looks at the networks the host computer currently has and then picks a candidate that doesn’t conflict. The device is told the configuration, sets its own IP address accordingly and then acts as a DHCP server that provides an IP for the host computer.

After this process is done, the host computer and device have matching network configurations, Qt Creator knows the IP of the device and everything is ready. If you connect a second device, a different candidate configuration is picked, since the first one is already in use. The DHCP server is disabled when the device is disconnected, because otherwise host computer could get an IP from a previous configuration when it is connected again.

The post Device detection in Qt for Device Creation 5.9 appeared first on Qt Blog.

May 24, 2017

LaKademy 2017 group photo

Some weeks ago we had the fifth edition of the KDE Latin-America summit, LaKademy. Since the first edition, KDE community in Latin-America has grown up and now we has several developers, translators, artists, promoters, and more people from here involved in KDE activities.

This time LaKademy was held in Belo Horizonte, a nice city known for the amazing cachaça, cheese, home made beers, cheese, hills, and of course, cheese. The city is very cosmopolitan, with several options of activities and gastronomy, while the people is gentle. I would like to back to Belo Horizonte, maybe in my next vacation.

LaKademy activites were held in CEFET, an educational technological institute. During the days of LaKademy there were political demonstrations and a general strike in the country, consequence of the current political crisis here in Brazil. Despite I support the demonstrations, I was in Belo Horizonte for event. So I focused in the tasks while in my mind I was side-by-side with the workers on the streets.

Like in past editions I worked a lot with Cantor, the mathematical software I am the maintainer. This time the main tasks performed were an extensive set of reviews: revisions in pending patches, in the bug management system in order to close very old (and invalid) reports, and in the task management workboard, specially to ping developers with old tasks without any comment in the last year.

There were some work to implement new features as well. I finished a backends refactoring in order to provide a recommended version of the programming language for each backend in Cantor. How each programming language has its own planning and scheduling, it is common some programming language version not be correctly supported in a Cantor backend (Sage, I am thinking you). This feature presents a “recommended” version of the programming language supported for the Cantor backend, meaning that version was tested and it will work correctly with Cantor. It is more like a workaround in order to maintain the sanity of the developer while he try to support 11 different programming languages.

Other feature I worked but it is not finished is a option to select different LaTeX processors in Cantor. Currently there are several LaTeX processors available (like pdflatex, pdftex, luatex, xetex, …), some of them with several additional features. This option will increased the versatility of Cantor and will allow the use of moderns processors and their features in the software.

I addition to these tasks I fixed some bugs and helped Fernando Telles, my past SoK student, with some tasks in Cantor.

(Like in past editions)², in LaKademy 2017 I also worked in other set of tasks related to the management and promotion of KDE Brazil. I investigated how to bring back our unified feed with Brazilian blogs posts as in the old Planet KDE Português, utilized to send updates about KDE in Brazil to our social networks. Fred implemented the solution. So I updated this feed in social networks, updated our e-mail contact utilized in this networks, and started a bootstrap version of LaKademy website (but the team is migrating to WordPress, I think it will not be used). I also did a large revision in the tasks of KDE Brazil workboard, migrated past year from the TODO website. Besides all this we had the promo meeting to discuss our actions in Latin-America – all the tasks were documented in the workboard.

Of course, just as we worked intensely in those days, we also had a lot of fun between a push and other. LaKademy is also a opportunity to find old friends and make new ones. It is amazing see again the KDE fellows, and I invite the newcomers to stay with us and go to next LaKademy editions!

This year we had a problem that we must to address in next edition – all the participants were Brazilians. We need to think about how to integrate people from other Latin-America countries in LaKademy. It would be bad if the event become only an Akademy-BR.

Filipe and Chicão

So, I give my greetings to the community and put myself in the mission to continue to work in order to grown the Latin-America as an important player to the development and future of KDE.

Its been some time since I’ve posted any progress for AtCore. Some may wonder what we have been up to ..

  • Implimented a Comand Queue

We would like to get some info from the printer while printing we need to have some method of flow control. AtCore now uses a command queue to send all commands. With the command Queue in place we have to handle stop and Emergency stop differently . For example Emergency Stop should skip the queue and be sent as soon as the button is pressed.

  • Requesting Temperatue from the printer

After you connect to a FW plugin every 5 seconds a m105 will be send to the printer and the temperature results are put onto a pretty graph that Patrick made. In order to make the graph work we need read the M105 return and extract the data from it. While our current methods of parsing this info work its very specific to each firmwares return . Since these string can be differnt between fw versions it can crash so we are working on a way to do this better.

  • Cleaned up the test Client Gui

The test clients GUI needed some love. All the widgets now live within a dock and the docks can be arranged how ever the user likes. I’ve also added a status bar to show the status of AtCore. We’ve also added a print job timer and remaining print time estimate. A Seperate axis control for relative was asked for by a user and I’ve added one that Lays wrote some time ago . It works well and allows for movements on 1, 10 or 25 units

  • Fixed the windows build so that It builds and deploys correctly via craft

Lays has been working hard to get atcore buildable via craft. Now we can build and deploy AtCore (and testgui) from craft. After building we had a problem of not finding the plugins on windows and them not deploying to the correct path.I added some instructions for deploy and tweaked plugin detection on window. Everything is now working well.


Foto em grupo do LaKademy 2017

E chegamos à 5ª edição do encontro latino-americano do KDE, o LaKademy. Nesse tempo todo foi perceptível o crescimento da comunidade na região, em especial no Brasil, ainda que mantendo o fluxo típico dos trabalhos voluntários onde participantes vem e vão de acordo com suas demandas.

Dessa vez o evento saiu das praias cariocas e adentrou um pouco mais para o interior do país, subindo o morro urbano de Belo Horizonte. Cidade aprazível conhecida pelas cachaças, queijos, cervejas artesanais, queijos, ladeiras e queijos, Belo Horizonte combina um ar cosmopolita, com diversas opções de lazer, culinária e mais, com um jeito cordial e solícito típico de seus moradores. Adorei a cidade e espero um dia agendar uma viagem que não seja a trabalho para lá.

As atividades do LaKademy ocorreram nas dependências do CEFET, do final de abril ao início de maio, em pleno feriadão do dia do trabalhador combinado a uma greve geral dias antes. Muitos que participaram do evento (eu incluso) defendiam as pautas da greve, mas não podíamos abandonar o evento após todo o investimento feito pelo KDE. Portanto, fica aqui meu mea culpa sobre esse tema. 🙂

A exemplo das demais edições do evento trabalhei bastante no Cantor, software matemático o qual sou mantenedor. Dessa vez as principais tarefas que desenvolvi podem ser resumidas em um grande esforço de triagem: revisões de patches pendentes, uma extensa revisão para fechar todos os bugs antigos e inválidos existentes, deixando abertos apenas aqueles que importam, e outra revisão nas tarefas pendentes, em especial naquelas que estavam abertas há quase um ano mas cujo os desenvolvedores responsáveis não haviam realizado qualquer movimentação durante o referido tempo.

No campo das funcionalidades, finalizei uma refatoração nos backends para apresentar a versão recomendada da linguagem de programação no Cantor. Como cada linguagem tem seu próprio planejamento, é comum que de uma versão para outra o backend do Cantor comece a se comportar de maneira inesperada ou mesmo deixe de funcionar (Sage, estou pensando em você). Essa funcionalidade apresenta a versão “recomendada” da linguagem para o backend do Cantor, significando que essa versão descrita foi testada e sabemos que funcionará bem com a ferramenta. Isso serve como um workaround para manter a sanidade do desenvolvedor enquanto suporta 11 backends diferentes.

Outra funcionalidade que trabalhei mas ainda não finalizei foi a adição de um seletor de backends LaTeX para usar no Cantor. Atualmente existem muitas opções de processadores LaTeX (pdflatex, pdftex, luatex, xetex, …), alguns deles com muitas opções adicionais. Isso aumentaria a versatilidade do Cantor e permitira que processadores modernos possam ser utilizados no software.

Além dessas funcionalidades houveram correções de bugs e auxílio ao Fernando Telles em algumas tarefas sobre esse software.

Outras tarefas que desenvolvi nessa edição, também a exemplo das demais, foram as relacionadas com o gerenciamento e promoção do KDE Brasil. Nelas, pesquisei como trazer de volta o feed do Planet KDE Português (que o Fred acabou desenvolvendo), atualização dos feeds automáticos nas nossas redes sociais, atualização da conta de e-mail que utilizamos para gerenciar nossas redes, port do site do LaKademy para bootstrap (que acho q o pessoal não vai utilizar pois estão migrando para WordPress) e uma pesada triagem das tarefas no workboard do KDE Brasil. Além de tudo isso, ainda tivemos a famosa reunião de promo onde discutimos ações de promoção para o país e região – tudo também documentado no workboard.

E claro, assim como trabalhamos muito e de forma muito intensa esses dias todos, o LaKademy também é um momento de reencontrar amigos e afetos e se divertir bastante entre um push e outro. É sempre reconfortante encontrar a galera inteira, e fica o convite para que os calouros apareçam sempre.

Uma falta da edição desse ano foi a ausência de não brasileiros – precisamos pensar em estratégias de termos latino-americanos de outros países participando do LaKademy. Seria ruim que o evento passasse a ser tão somente um Akademy-BR.

Filipe e Chicão

Para finalizar, deixo meu agradecimento à comunidade e minha disposição para continuar trabalhando para tornar a América Latina uma região cada vez mais importante para o desenvolvimento e futuro do KDE.


Older blog entries


Planet KDE is made from the blogs of KDE's contributors. The opinions it contains are those of the contributor. This site is powered by Rawdog and Rawdog RSS. Feed readers can read Planet KDE with RSS, FOAF or OPML.