The Purpose of things

Hi,

For once this is not a post about KDE Connect (at least not directly). Besides KDE Connect I also work on several other KDE projects, one of them being the awesome Purpose framework created by Aleix Pol.

After Nate highlighted my latest work on Purpose (the new share menu in Dolphin) in his blog post I received quite some feedback. I’m glad that many people like the idea, but I also received some criticism/suggestions for improvements. This is always welcome as long as it is fair and objective. This was true for most comments, but unfortunately not all of them. I won’t even bother to reply to unfair and personal attacks for a useful feature, but rather like to respond to appropriate criticism and inform you about my future plans for Purpose.

First of all, for those who don’t know what Purpose is, it is an extensible framework to fulfill the developer’s purpose while providing an abstraction. Right now the only use-case is exporting/sharing a file, but more could be added in the future. It is used by Dolphin, Spectacle, Okular and other KDE applications and can export files to Email, Telepathy, KDE Connect, Nextcloud, Telegram (I did that one myself), Twitter, Imgur and many more.

For the share menu in Dolphin’s I received some critisism/suggestions for improvements:

  • Send via Bluetooth and send via KDE Connect are still separate in Dolphin’s context menu and should be in the ‘Share’ sub-menu as well. I 100% agree on that. In fact send via KDE Connect is already in the ‘Share’ sub-menu and I’ve uploaded a patch to remove the old entry. As for Send via Bluetooth: Someone would need to turn Bluedevils FileItemActionPlugin into a Purpose plugin. I’ll probably do it myself as soon as I find the time for it.
  • Dolphin’s context menu will be even more cluttered with this. It actually achieves the opposite. By combining actions like Send via Bluetooth and Send via KDE Connect into a sub-menu the top-level menu will be less cluttered.
  • I’m not going to use it, so I don’t want to have it. You can disable it in Dolphin’s settings.
  • I’m never going to use option XY, but it’s still there. Fair point. Some options are loaded conditionally, so e.g. the Telegram option is only present if Telegram is actually installed. For others this is not the case. I’m planning to make a config module to en-/disable options.
  • I don’t want to share my files by accident. Virtually all of the options require more than one click to do something, so it needs a weird accident to actually do something unwanted.

I’d love to see more applications/services adopting Purpose. So if you are a developer interested in integrating your application with Purpose please get in touch with me and we will figure out a solution. I’m especially looking at you, fellow KDE developers 😉

Happy sharing 🙂

KDE Connect on Plasma Mobile

The digital world has changed over the last 10 years. The usage of mobile devices skyrocketed whereas the desktop market is stagnating. The trend is also going towards smaller and convertible devices. The mobile market is controlled by two major corporations. One of them is religiously cutting down your personal freedom and aiming towards a walled garden proprietary ecosystem, the other one is disrespecting your privacy enormously. With Plasma Mobile the KDE community is envisioning a mobile experience that is giving you maximal freedom while ensuring your privacy. It seems like a bold venture, but we have to at least try, right?

Plasma Mobile would not be a true KDE project without the same degree of integration with the desktop as we already have with Android devices. Therefore we aim to make Plasma Mobile a first-class citizen of KDE Connect.

How far are we?

Thanks to Aleix Pol there is a suitable UI for KDE Connect on Plasma Mobile already in our git tree. I was able to run it on Plasma Mobile. It has some rough edges, but is basically functional.

IMG_20180607_192146

Some features that work so far:

  • Control media players
  • Remote mouse input
  • Lock the remote device
  • Find the remote device
  • Receive files
  • Receive remote commands

IMG_20180607_192849

Why do I care about Plasma Mobile at all?

Chances are high that you won’t be dropping your Android phone for Plasma Mobile anytime soon. But even then you will be profiting from our efforts. To achieve feature parity with Android we will need to port some of the Android features to C++/Qt. This will benefit all your connected devices that run the C++ version of KDE Connect, e.g. other desktop devices, Sailfish OS phones or phones/tablets running another version of Linux (e.g. Ubuntu Touch). The new UI also provides room to integrate some controls that are only available on Plasma right now. This will improve the KDE Connect experience for non-Plasma desktop users.

Sounds great, what can I do?

You want to help? Awesome! I created a meta-task on Phabricator to track the current progress. It contains all the things that should be done as sub-tasks. Some of them are ideal beginner tasks. Just pick one you like and don’t be shy to ask for help. You don’t even need to have a phone running Plasma mobile to do it, you can develop it on your desktop machine and thanks to the awesome Kirigami Framework it will run on Plasma Mobile automagically. What are you waiting for?

KDE Connect Junior Jobs

One of KDE’s Community goals for the next years is streamlined onboarding of new contributors. It’s very important that new people regularly join the community for various reasons. First of all, there will always be something to do and the more contributors the merrier! But there are also people becoming very inactive or leaving the community and these people need to be replaced. Furthermore new people bring in new and fresh ideas. It’s important to have people from diverse backgrounds in the community. Lack of community diversity manifests in several issues:

  • Lack of language diversity results in poor translations for non-widespoken languages and other internationalization issues
  • Having only English/German/Spanish/French speaking contributors leads to incomplete support for things like right-to-left layouts and CJK characters/input methods
  • Contributors with powerful hardware and good internet connection tend to ignore the need for performance- and bandwidth-efficient solutions
  • An example from KDE Connect: Most of us are from Europe where its common to use messengers like Whatsapp whereas in the USA it’s far more common to write SMS. Therefore we didn’t really had in mind that it’s important to have good SMS integration in KDE Connect until we actually had some people from the US at our sprint
  • People tend to not be aware of different setups other people might have, e.g. having an Android phone without Google Play Services is rare in Europe but common in China

To address these issues I am aiming to ease contribution for everyone. I believe that KDE Connect is a great project to get started in KDE development. After all, it’s the project I got started with myself. The codebase is small and IMHO quite sane. The modular architecture allows you to quickly get cool results without risking to break stuff.

To help you pick a task for your first contribution I started marking tasks as junior jobs on the KDE Connect workboard. I want to provide structured information for each task that helps you diving into it. I hope that other KDE projects will follow our lead.

Now I need your help!

Which information would you like to see in the task description?

What can we, the established developers do to make your first contribution easier?

What were the problems you encountered in your first contribution?

What are the lessons you learned during your first contributions that you want to share with others?

If you already have a KDE Identity account please leave your feedback on the Streamlined onboarding of new contributors or the Junior Jobs task.

If you don’t please leave your feedback here in the comments and I will forward it to the appropriate places.

Your help will improve the overall community and thus the quality of our software in the long term!

 

Volume Control in KDE Connect

Definitely one of the best use cases of KDE Connect is this: Watching a movie while laying in bed or on the couch and controlling your unreachable computer from your phone without needing to stand up. Thanks to our new media control notification you can pause and skip without even unlocking your phone. But what if the movie is too silent? If your media player is implementing the MPRIS2 specifications you are already lucky and can control your players volume from KDE Connect. Plasma Browser Integration even adds that for Browsers. But what if your player doesn’t support it (looking at you, Spotify)? Or you want to control your system volume? Then you are out of luck. Until soon. We are adding a plugin to KDE Connect that enables you to control your system volume from the phone. How cool is that? Another neat little trick is tapping on the volume icon to (un)mute the system.

Screenshot_20180424-000806

Implementation

The idea for this has been around for a while, but it was not until fall 2017 that I actually started implementing it. The implementation relies on PulseAudio. We are aware that not everyone is using it, so we don’t require it and hope that packagers do not make KDE Connect depend on PulseAudio. The first implementation was using the command line tool pactl to set the volume. Assuming you only have one sink it was working pretty well, except there was no easy way to ask for the current volume, so our volume slider would be wrong pretty often. I got around this by parsing the output of pactl in a horrible, horrible line of bash, but it was clear that this was not stable enough to actually go into prod. Also it was still not working with multiple sinks. The logical step was to make use of the libpulse. For some reasons there are a great deal of people that like the C programming language, but I don’t. Especially not the library style that comes with it. What I really didn’t like was the idea of mixing low-level libpulse C code with high-level Qt code. Luckily, the Plasma guys thought the same. The Plasma Volume Applet contains code that was acting as a bridge between the two worlds. So I “borrowed’ that code (isn’t free software amazing?) and after some intense head-against-the-table banging (turns
out both KDE Connect and Plasma PA both have a class ‘Device’ with the same include guard) it was working like a breeze, now even with multiple sinks.

Birth of a Framework

It was working really good, but the thought of having 20 files of duplicate code in two KDE projects wasn’t particularly appealing. We decided it would be best to extract the common code into a library that both projects can use. To make this possible the code needed quite some polish. The original author probably didn’t have in mind that it might become a library someday. After some work we now believe that the API can be declared stable and it can be released on KDE Extragear. We aim to make it an official KDE Framework once the code has matured enough. Extracting and releasing it as a library makes it easier for us to maintain it, but it also means that you can use it in your project! Furthermore, since it covers more use cases than just volume control it’s also possible to integrate more PulseAudio related features into KDE Connect easily. We are looking forward to your suggestions!

KDE Connect – Tips, Tricks and Misconceptions

Since my first blog post we got an huge amount of feedback and it’s amazing to see that you are as excited about KDE Connect as we are. This way I want to say “Thank you” for all your kind words and tell you that this kind of positive feedback is what keeps us going.

I would also like to share some tips and tricks about KDE Connect that you might not know yet, but first I would like to clear up a common misconception.

KDE Connect is not tied to Plasma

Many times people claim that KDE Connect is tied to Plasma. KDE Connect can be used with any desktop environment or even no desktop environment at all. A small portion of the UI is only available in Plasma, but most functionality is available on all platforms. However, most KDE Connect developers use Plasma, so issues in other DEs don’t come to our attention in our daily usage. If you find something that can improve the non-Plasma UX, please let us know by filing a bug.

If you are using Gnome you might be interested in GSConnect, a GNOME Shell extension that uses KDE Connects Android app. If you are using another GTK-based desktop you might want to install indicator-kdeconnect.

The misconception that KDE Connect is tied to Plasma likely comes from the fact that on some distros such as Debian the KDE Connect package depends on Plasma. This should not be the case and is highly discouraged by us. Please file a bug against your distros package if that is the case.

Add devices by IP

KDE Connect tries to discover devices in your network automatically. However, for various networking reasons this does not work in all cases. If your devices are not automatically discovered, but you are able to ping one device from another there is a good chance you can pair them by adding the device IP manually. Open up KDE Connect in your phone, go to ‘pair new device’, tap the three dots in the top-right corner and tap ‘Add devices by IP’.

screenshot_20180331-0306087939472913876397211.png

You can both specify IP addresses and hostnames.

Filter notifications

Many messaging apps like Telegram got a desktop or web client. In this case you would get double notifications for each message, one from the phone over KDE Connect and one from the desktop client. In this case you want to take your phone, go to the ‘Plugin Settings’ and select ‘Notification sync’. You will get a list of all your installed apps and can select from which you want to receive notifications.

Runcommand Plugin

We receive a lot of feature request and are thankful for that. The bad news is, we cannot implement all of them. Some use cases are just too special. The good news is, we implemented a plugin that can serve a infinite number of use cases. You can specify commands on your desktop and can run them from your phone anytime. For example you can create a Shutdown command to power off your computer without leaving your bed. You can even create bash or Python scripts (or anything that is executable from bash) to do anything you can imagine. The best news is, it is already there. This has been around for quite a while, but most people didn’t know about it because it’s very hidden. We’re trying to make it more discoverable in an upcoming release. Right now you need to go to the system settings, select the Runcommand Plugin preferences and enter your commands. We’re aiming towards a better UX for this, but even right now, the possibilities are endless.

runcommand

Rename devices

Sometimes you may want to rename one of your devices, e.g. when you have two from the same manufacturer and they show up with the same name. On the desktop side, go to the KDE Connect settings and in the top-left you will find a edit button. It’s the little pencil icon in the above screenshot. On Android it’s a little bit more hidden. Open up the left drawer and tap your devices name (in my case “The phone”) to edit it.

Screenshot_20180401-204210 (1)

Notifications on the phone

One of the most loved features about KDE Connect is receiving your phones notifications on the desktop. But did you know that you can also do it the other way around? All you need to do is go to the settings on the phone and on the desktop, activate the “Receive notifications” plugin on Android and the “Send notifications” plugin on the desktop and enjoy your desktops notifications on the phone.

Keep screen unlocked

Another plugin that’s been around for a while but deactivated by default is the screensaver inhibitor. When you choose to activate it in the settings your screen won’t power off as long as your phone is connected.

Pair Desktop to Desktop

You can not only pair a phone with your desktop device, you can also pair a desktop with another desktop. It isn’t as powerful as connecting a phone with a desktop, but you can still do useful things like sharing files and links. We are looking to extending the capabilities. The same also works for two android devices.

 

I hope I could provide you some useful knowledge that makes you enjoy KDE Connect even more. As usual, if you want to support our development please consider donating to KDE.

Building KDE Connect

After I shared the link to the KDE Connect Development Telegram group almost 20 people joined within 24 hours. I certainly did not expect such a interest in KDE Connect. When I joined the project about a year ago the hardest part for me was setting up a proper development workflow, meaning configuring, building, installing and debugging the application and interacting with git and Phabricator. To ease your start in KDE Connect development I would like to give you the guide I wish I had back then.

I will show you how to fetch the project, build, run and debug it using KDevelop. It’s an IDE by the KDE Community designed with KDE projects in mind. In theory you can use any IDE you like, if you figure out how to configure it properly.

You probably will find KDevelop in your distros repository. Install and run it.

Go to Project -> Fetch Project…

kdevelop_1

Search for KDE Connect client for KDE and click Get

After the project is fetched you click Next -> Next -> Finished

kdevelop_2

The install prefix determines where KDE Connect will be installed. Choose /usr if you want to override your distros package. In this case you might want to uninstall it.

Hit OK.

If you are getting cmake errors you are missing some development packages. The name of those depend on your distro. For example, the development package for KIO on Ubuntu is called libkf5kio-dev. Google should help you find all required packages for your distro. On Debian/Ubuntu you can use “apt-get build-dep kdeconnect” to install the build dependencies. On openSUSE you can install the dependencies using “sudo zypper si -d kdeconnect-kde”.

After you installed all required packages hit Build in the top-left corner.

Make sure there is no other instance of KDE Connect running by running “killall kdeconnectd”

After it build successfully hit Debug. You will be prompted with a window to configure the launch. You will need to do this only once. Hit Add -> Project Executables -> KDE Connect -> daemon/kdeconnectd . If this does not work you might need to adjust the path to the kdeconnectd binary.

Hit OK and you should have a running KDE Connect built from source!

Now, if you do any changes to KDE Connect you just need to hit Build and Debug again to apply it.

 

KDE Connect – New stuff I

As I said a couple of days ago we got a lot to announce for KDE Connect. This is the first of many posts where I show you what we were up to. It may not be as exciting as you hoped for because the really big features are not-quite-ready, so hang on 🙂

First we squashed some bugs, including a pretty nasty crash in the NotificationsPlugin.

In my first post about KDE Connect I told you about the album cover art on Android. Thanks to Matthijs it now also works when the cover art is a local file, for example when you are using VLC. It already worked when the cover art was a remote URL, for example with Spotify. The cover art is now also shown in the media control notification and added to the Android media session.

When you send an image to you phone the notification now contains a preview of the image. The notification now also has a share button which allows you to quickly do something with the just received file.

Screenshot_20180329-232350

If you use Nautilus as a file manager you will be pleased to hear that KDE Connect now includes a Nautilus extension that allows you to quickly share files across your devices.

As I mentioned before, the exciting features are yet to come.

Now is a perfect time to join our development team! The codebase is stable and allows you to quickly implement new features. If you got a basic understanding of programming you can quickly get a grasp on the technologies we are using (Java/Android and C++/Qt). If you are interested please join our Telegram group. Please note that this is a development group and not a general support group.

Stay tuned!

KDE Connect Sprint

Last weekend the core KDE Connect development team met for a sprint at the amazing Verse office in Barcelona. It was an amazing opportunity to get to know each other (most of us have never met before) and discuss the future of KDE Connect in an amazing and productive atmosphere.

photo_2018-03-26_18-59-41.jpg

We squashed some bugs, implemented new features and laid the foundation for other ones.

Some weeks ago we asked people on Reddit which features they liked to see in KDE Connect. We discussed them extensively and are pleased to say that some of the most requested ones are already in progress.

We will announce more in the next couple of weeks. Stay tuned!

This sprint was only possible because KDE e.V. provides travel support for us. If you want us and other KDE Projects to be able to meet in person more often please consider donating to KDE e.V.

 

KDE Connect – State of the union

Hey there!

We haven’t blogged about KDE Connect in a long time, but that doesn’t mean that we’ve been lazy. Some new people have joined the project and together we have implemented some exciting features. Our last post was about version 1.0, but recently we released version 1.8 of the Android app and 1.2.1 of the desktop component some time ago, which we did not blog about yet. Until now!

We got some fancy new features in place:

Remote Keyboard plugin

I think most of us can agree that typing long texts on the phone sucks compared to typing on a proper keyboard. Before, you could type your text on the desktop and copy & paste it to your phone using our clipboard sync. Now we got an even fancier method: our new Remote Keyboard plugin.
Before using it you need to enable the KDE Connect Remote Keyboard in your phones settings.

Screenshot_20180316-205817

Whenever you are confronted with a text input field you can switch to the KDE Connect Remote Keyboard. Then you open up the Plasmoid, click the input field and start typing.

remotekeyboard.png

Big thanks to Holger Kaelberer for implementing this!

 

Reply to Whatsapp and others

Previously you only could reply to SMS, but not other IM apps like Whatsapp. We are pleased to announce that we were able to enable replying for several other messaging apps that support Androids quick reply, including Whatsapp. Please note that it is not within our control which apps are supported and which not.
Big thanks to Julian Wolff for implementing this!

 

Notification icons

On Android, most notifications have some kind of icon, like a contact picture for messaging apps or album art for media player notifications. KDE Connect now forwards those and displays them on the desktop and inside the Plasmoid.
notification.png

 

Runtime permissions

Android Marshmallow introduced a new permission system, giving the users fine-grained control about their apps. To support this new system each plugin got a set of required and optional permissions assigned. If a required permission has not been granted the respective plugin won’t be loaded. If an optional permission has not been granted the plugin will be loaded with reduced features.
Screenshot_20180316-210321

 

Direct share

Android Marshmallow also introduced Direct Share. Using this we enabled you to send files or urls to your desktop without opening KDE Connect.
Screenshot_20180316-213838__01 (1)

 

Plasmoid redesign

Our Plasmoid got some love

Before:

After:

 

Choose ringtone for Find-my-Phone

A small but requested feature is selecting a ringtone for Find-my-Phone.

 

Blacklist numbers

You are now able to blacklist numbers so that calls and SMS are not forwarded to the desktop. This is especially useful when you are using two-factor-authentification with your phone so it won’t get leaked to the desktop.

Those features were implemented by me.

 

Media controller overhaul

Matthijs Tijink has been working really hard on improving the media controller plugin. It now displays the album cover art and a media control notification as well as other polish. Make sure to check out his blog.
Before:

Screenshot_20180316-203437

After:

Screenshot_20180316-201401

Notification:

Screenshot_20180316-204859

 

URL handler

Aleix Pol has implemented an URL handler that enables you to trigger phone calls for example by clicking a tel:// url in your browser.

 

Additionally we have fixed loads of bugs, crashes and papercuts and made many under-the-hood improvements.

There is also a lot going on in related KDE software. Friedrich Kossebau is working on bringing MPRIS support to Gwenview and Okular, enabling controlling slideshows and presentations from KDE Connect. Furthermore we fixed some issues in the MPRIS implementation of Plasma Browser Integration and Elisa (the next-gen KDE music player).
Speaking of Plasma Browser Integration: In case you haven’t, make sure to check out this awesome project which integrates neatly with KDE Connect, enabling you for example to control Youtube videos or Netflix from your phone or to send browser tabs to your phone. Thanks Kai Uwe Broulik for this awesome project!

But this is not the end. We got some more features in the pipeline and this week the core developers are meeting for a sprint to discuss the future of KDE Connect. Some weeks ago we asked people on Reddit which features they like to see and got a ton of valuable feedback. We’ll discuss it and let you know which of them are feasible.

If you are as excited about KDE Connect as we are we would love to see you join our development team. Make sure to subscribe to and ask for help at our mailing list. If you can’t contribute in a technical way but still want to support us consider donating to KDE. Your donations enable us to meet in person and work more closely on KDE Connect and other KDE Software.

 

Faust – Developer Edition

Habe nun, ach! Java,
C# und C++,
Und leider auch PHP
durchaus programmiert, mit heißem Bemühn.
Da steh ich nun, ich armer Tor!
Und habe so viele Compilerfehler als wie zuvor;
Heiße Bachelor, heiße Master gar
Und frage schon an die zehen Jahr
Herauf, herab und quer und krumm
Auf Stackoverflow, gar ziemlich dumm.
Und sehe, dass wir nichts wissen können!
Will auf die Tastaur einhämmern.
Zwar bin ich gescheiter als all die Javascripter,
Python, Scratch und Frontendentwickler
Mich plagen keine Designer und Möchtegerncoder
Fürchte mich weder vor Bash noch Internet Explorer-
Dafür sind mir alle Threads gerissen,
Bilde mir nicht ein etwas über Regex zu wissen
Bilde mir nicht ein, ich könnte etwas lehren,
Die Menschen zu bessern und zu Linux zu bekehren.