Last updated on November 26, 2020 by Dan Nanni
KDE desktop has long been favored by many Linux geeks because it has every element to fulfill their appetite: customizable every bit of it, aesthetically pleasing desktop effects, openness to adopting new technologies such as semantic desktop, etc. Beyond all these bells and whistles, the KDE desktop community constantly tries to advance the state of the art of the desktop, experimenting with wild new ideas.
One such effort is so-called KDE Connect, which is a brainchild of Albert Vaca, as part of his Google Summer of Code 2013. The objective of KDE Connect is to seamlessly connect all sorts of devices to KDE desktop, so they can talk to each other. KDE Connect currently supports Android device and WiFi network based sharing, but support for diverse device profiles and network backends are planned for the future.
In this tutorial, I will demonstrate how to integrate Android into KDE Linux desktop by using KDE Connect. The (growing) feature set of KDE Connect is as follows.
KDE Connect has two components: KDE desktop component (
kde-connect) and device components (e.g., Android app). Currently, for KDE Connect to work, the desktop computer and an Android device need to be on the same local network (via WiFi). Android app relies on UDP broadcast to advertise its presence to the desktop over the local network. Once paired, Android app communicates with the desktop via a public-key based encrypted channel.
In the following, I will go over how to install and set up KDE Connect on both KDE desktop and Android device.
kde-connect is included in the base repositories starting from 13.10. So simply using
apt-get will do the installation on Kubuntu 13.10 or higher.
$ sudo apt-get install kdeconnect-kde qt5-default qdbus-qt5To install
kde-connecton Kubuntu 13.04 or earlier, you can build it from the source as follows. You can use the same building procedure on Debian KDE.
$ sudo apt-get install build-essential cmake kdebase-workspace-dev libqjson-dev git libqca2-dev $ git clone git://anongit.kde.org/kdeconnect-kde $ cd kdeconnect-kde $ cmake -DCMAKE_INSTALL_PREFIX=/usr ./ $ make $ sudo make install
Installation instruction for Fedora KDE edition is as follows.
$ sudo yum groupinstall "Development Tools" $ sudo yum install gcc-c++ kdelibs-devel cmake qjson-devel qca2-devel git $ git clone git://anongit.kde.org/kdeconnect-kde $ cd kdeconnect-kde $ cmake -DCMAKE_INSTALL_PREFIX=/usr ./ $ make $ sudo make install
The first step after installing
kde-connect is to run the following command as a non-root user, which will activate
kde-connect on the user's KDE desktop.
$ qdbus org.kde.kded /kded loadModule kdeconnect
If successful, the above command should return
Now go ahead and rebuild system configuration cache as follows.
$ kbuildsycoca4 -noincremental
At this point, you should find KDE Connect menu under
Systems Settings (which will remain empty until you pair any Android device).
Connecting an Android device to KDE desktop is straightforward.First, install KDE Connect app on your Android device.
To use most features of KDE Connect, Android 4.1 or higher is recommended. You could still install KDE Connect on up to Android 2.3, but the functionality of KDE Connect will be limited.
After installation, make sure that your Android device and KDE desktop are connected to the same WiFi network.
Launch KDE Connect on Android. You should see the hostname of your KDE destop listed under
Not paired devices.
Click on the hostname, and click on
Request pairing button on the next screen.
At this point, you should see a pairing request notification on your KDE desktop. Simply accept it.
Now you will see your host listed under
Connected devices on Android.
Also, the paired Android phone (e.g., Samsung Droid Charge) will appear in the KDE Connect Settings of your desktop. Now KDE Connect should be fully functional between your desktop and a paired Android phone.
One simple demonstration of KDE Connect is shown as follows, where ping notification sent by Android appears in KDE desktop.
kde-connect from your desktop, run the following commands.
$ qdbus org.kde.kded /kded unloadModule kdeconnect $ kbuildsycoca4 -noincremental
kde-connect is successfully built, but your Android device cannot discover the desktop, check if the firewall on your desktop is blocking traffic from Android device. It uses dynamic ports in the range 1714-1764 for UDP and TCP.
2. If you get the following error while building
kde-connect, this is due to minimum version requirement (0.8.1) of
Could not find a configuration file for package "QJSON" that is compatible with requested version "0.8.1". The following configuration files were considered but not accepted: /usr/lib/x86_64-linux-gnu/ cmake/qjson/qjson-config.cmake, version: 0.7.1 /usr/lib/x86_64-linux-gnu/cmake/qjson/qjson-config.cmake, version: 0.7.1
To fix this problem, you need to download and install the latest
libqjson-dev. For example, on Ubuntu 12.10, downloading and installing the latest
libqjson-dev (and its dependency) from the following locations solves the problem.
$ sudo dpkg -i libqjson0_0.8.1-1_amd64.deb $ sudo dpkg -i libqjson-dev_0.8.1-1_amd64.deb
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.