KDEConnect: Difference between revisions

From KDE Community Wiki
mNo edit summary
mNo edit summary
Line 33: Line 33:
mkdir build
mkdir build
cd build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..</code>
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
make
make install
make install

Revision as of 10:13, 30 March 2018

This is the community page for KDE Connect. Feel free to edit it! It should contain useful and up to date resources for both users and developers.

What is KDE Connect?

KDE Connect is a project to communicate across all your devices. For example, with KDE Connect you can receive your phone notifications on your desktop computer, control music playing on your desktop from your phone, or use your phone as a remote control for your desktop. To achieve this, KDE Connect:

  • implements a secure communication protocol over the network, and allows any developer to create plugins on top of it.
  • Has a component that you install on your desktop.
  • Has a KDE Connect client app you run on your phone.

This video from 2013 demonstrates some other cool features: https://www.youtube.com/watch?v=KkCFngNmsh0

More info at Albert Vaka's blog.

Installation

You will most likely find the KDE Connect desktop component as a package in your distribution's repos. If you use a desktop environment other than KDE's Plasma, you might also want to install indicator-kdeconnect, that provides a system tray as a GUI for other desktops.

The app for Android can be found in both the Google Play Store and the free and open store F-Droid. There was some development of a KDE Connect client app for iOS in 2014 (see source code) and supposedly a client app for Blackberry (where?).

If you use the Firefox browser, this cool extension lets you send links in the browser to the phone app.

An alternative native extension for Chrome/Chromium (or compatible) and Firefox users, lets you "send pages and content from your browser to connected KDE Connect devices, via browser action or context menu." See its Github page for installation instructions.

Building KDE Connect (Desktop)

If you want to build KDE Connect yourself, you'll first need to grab the code from git.

git clone git://anongit.kde.org/kdeconnect-kde.git

KDE Connect uses cmake as a build system, which will tell you if you missed any dependencies. To configure use

cd kdeconnect-kde
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
make install

If you are intending to develop KDE Connect or experience a crash and are asked to give a backtrace, build KDE Connect with debugging symbols:

cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug..</code>

The easiest way to install KDE Connect is to run sudo make install. You can also install KDE Connect to a location of your choice, but you'll have to setup the paths etc. to make it work. Also, you'll need to run kdeconnectd manually, since DBus doesn't know about it.

Building KDE Connect (Android)

The code is at git://anongit.kde.org/kdeconnect-android.git. Install Android Studio to build the app and install it to your phone. Using the emulator is possible, but need an advanced networking setup, or you won't be able to connect to your desktop.

Troubleshooting

I have two devices running KDE Connect on the same network, but they can't see each other

KDE Connect uses dynamic ports in the range 1714-1764 for UDP and TCP. So if you are behind a firewall, make sure to open this port range for both TCP and UDP. Otherwise, make sure your network is not blocking UDP broadcast packets.

ufw

If your firewall is ufw, you can open the necessary ports with:

sudo ufw allow 1714:1764/udp
sudo ufw allow 1714:1764/tcp
sudo ufw reload

firewalld

If your firewall is firewalld, you can open the necessary ports with:

sudo firewall-cmd --zone=public --permanent --add-port=1714-1764/tcp
sudo firewall-cmd --zone=public --permanent --add-port=1714-1764/udp
sudo systemctl restart firewalld.service

Fedora firewall

In Fedora there is a program to configure the firewall. Open Firewall Configuration (the program's filename is firewall-config), and in Zones > Services check the kde-connect service.

My KDE Connect crashes or restarts when trying to pair with another device

Sometimes, a corrupt config file may cause KDE Connect to crash when trying to pair with a device. In that case, deleting the config ~/.config/kdeconnect might help.

Can I run KDE Connect without a display server?

Yes, you can pass the command line argument `-platform offscreen` to the daemon (eg: `killall -9 kdeconnectd; /usr/lib/libexec/kdeconnectd -platform offscreen`)

My problem is not in this list :(

In case you find a bug and want to report it, you can do so in the KDE bugtracker: http://bugs.kde.org

Development

If you are interested in contributing to KDE Connect, please join the mailing list of the project. You might also want to read Albert Vaca's development blog.

You can find the sources in the following repositories:

You can submit patches on our Phabricator. This wiki page has more details on how this process works. Should this be your first patch, it's good to know that it might take some time before your patch is reviewed (typically within a week though), and you'll probably have to make some changes a couple of times. That's not because you're new or because your code is code, that's what happens for all reviews (even for long-time contributors).