KDEConnect: Difference between revisions

From KDE Community Wiki
(Undo revision 82098 by JulienM (talk))
(→‎Windows Store: Add note to update release notes)
 
(95 intermediate revisions by 22 users not shown)
Line 1: Line 1:
<translate>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.</translate>
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.


<translate>== What is KDE Connect? ==</translate>
== What is KDE Connect? ==


<translate>KDE Connect is a project that enables all your devices to communicate with each other. Here's a few things KDE Connect can do:
'''KDE Connect''' is a project that enables all your devices to communicate with each other. Here are a few things '''KDE Connect''' can do:
* Receive your phone notifications on your desktop computer and reply to messages
* Receive your phone notifications on your desktop computer and reply to messages
* Control music playing on your desktop from your phone
* Control music playing on your desktop from your phone
Line 12: Line 12:
* Share files and links between devices
* Share files and links between devices
* Browse your phone from the desktop
* Browse your phone from the desktop
* Control the desktop's volume from the phone</translate>
* Control the desktop's volume from the phone




<translate>To achieve this, KDE Connect:
To achieve this, '''KDE Connect''':
* implements a secure communication protocol over the network, and allows any developer to create plugins on top of it.
* 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 component that you install on your desktop.
* Has a KDE Connect client app you run on your phone.</translate>
* Has a KDE Connect client app you run on your phone.




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


<translate>More info at [http://albertvaka.wordpress.com Albert Vaka's] or [http://nicolasfella.wordpress.com Nico's] blog.</translate>
More info at [http://albertvaka.wordpress.com Albert Vaka's] or [http://nicolasfella.wordpress.com Nico's] blog.


<translate>== Installation ==</translate>
== Installation and Usage ==


<translate>You will most likely find the KDE Connect desktop component as a package in your distribution's repos. If not you can ask them to package it.</translate>
Please see the '''KDE Connect''' [https://userbase.kde.org/KDEConnect Userbase page] for detailed information on the different ways '''KDE Connect''' can be installed and used.


<translate>Despite a common misconception you can use KDE Connect on all desktop environments. Since most of the developers are using Plasma it may occur that a feature is broken or inaccessible on other desktop environments. In this case, please report it as a [https://bugs.kde.org/enter_bug.cgi?product=kdeconnect bug]. There are multiple ways to enhance the KDE Connect experience on non-Plasma desktops. If you are a GNOME user you might prefer [https://extensions.gnome.org/extension/1319/gsconnect/ GSConnect], a GNOME shell extension. For desktops with AppIndicator support (Budgie, Cinnamon, LXDE, Pantheon, Unity) [https://github.com/Bajoja/indicator-kdeconnect indicator-kdeconnect] is available.</translate>
== Build KDE Connect from source ==
KDE Connect is a free/ libre open source software, being developed for over 8 years now.


<translate>The app for Android can be found in both the [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Google Play Store] and the free and open store [https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp F-Droid].</translate>
=== Linux Desktop ===


<translate>There was some development of a KDE Connect client app for iOS in 2014 (see [https://cgit.kde.org/scratch/yangqiao/kdeconnect-ios.git/ source code]) but due to our experience and various technical and organizational factors it's unlikely that we will have official iOS support anytime soon.</translate>
'''KDE Connect''' can be built directly from source using CMake and system-installed dependencies.  


<translate>KDE Connect is also available on [https://openrepos.net/content/piggz/kde-connect SailfishOS] and we are working on bringing it to other Linux-based phones (Plasma Mobile, PostmarketOS etc.)</translate>
Alternatively, you may use a meta-build system like [https://kdesrc-build.kde.org/ kdesrc-build] or [https://community.kde.org/Craft/ Craft],
both of which have the added benefit of leaving your linux installation unaffected and containing the dev files to a single directory.


<translate>== Browser Integration ==</translate>
==== Using a meta-build system ====


<translate>[https://community.kde.org/Plasma/Browser_Integration Plasma Browser Integration] makes KDE Connect even more powerful. It allows you to control content from e.g. Youtube or Netflix from your phone and send browser tabs to your phone. Despite the name it can also be used on non-Plasma desktops.</translate>
* Craft is a cross-platform meta-build system that works quite well on Windows and Linux for KDE Connect devel.
** Set up Craft using [https://community.kde.org/Craft/Linux/ this link], and then visit [https://community.kde.org/KDEConnect/Build_Craft here] for instructions to use Craft to build KDE Connect.
* kdesrc-build is a meta-build system that is used by many long-term KDE developers as their daily driver for KDE devel on Linux. See [https://community.kde.org/KDEConnect/Build_kdesrc-build here] for comprehensive build instructions.


<translate>An alternative native extension for [https://chrome.google.com/webstore/detail/kde-connect/ofmplbbfigookafjahpeepbggpofdhbo Chrome/Chromium] (or compatible) and [https://addons.mozilla.org/en-US/firefox/addon/kde_connect/ Firefox] users, lets you "send pages and content from your browser to connected KDE Connect devices, via browser action or context menu." See its [https://github.com/pdf/kdeconnect-chrome-extension Github] page for installation instructions.</translate>
==== Without a meta-build system ====


<translate>== Running KDE Connect over OpenVPN ==</translate>
KDE Connect uses CMake as its build system, which will tell you if you are missing any dependencies.
See [https://community.kde.org/KDEConnect/Build_Linux here] for build instructions.


<translate>There may be a variety of reasons for using KDE Connect with a VPN. Maybe you have left home and want to run a command or maybe you’re on a public wifi network where your devices aren’t allowed to communicate and you want to use remote control to give a presentation.</translate>
=== Windows ===


<translate>=== Set up Open VPN ===</translate>
KDE Connect is officially supported on Windows.
See [https://community.kde.org/KDEConnect/Build_Windows here] for build instructions.


<translate>If you have your own server with a public-facing IP address, you can set up OpenVPN yourself. OpenVPN is not the easiest piece of software to set up, but by following a setup tutorial such as this one, you should be able to manage: https://openvpn.net/howto.html</translate>
=== Android ===


<translate>In order to allow UDP broadcast packets, which are what KDE Connect uses to automatically discover two devices, OpenVPN needs to be set up for bridging (TAP device). If you use a tun device, you can still manually connect by IP address.</translate>
The most convenient dev-flow way is to pass the [https://invent.kde.org/network/kdeconnect-android project URL] to '''Android Studio''', build the app and install it to your phone.
Remember to uninstall any already-installed KDE Connect app from your target Android device.
You can also build the android app through CLI using gradle.


<translate>If you want to rent a pre-configured OpenVPN service rather than set up your own it should work, but the same considerations about the server settings need to be taken into account.</translate>
You can also run the app in an emulated Android device for devel. See [/Android_Emulator/ here] for instructions.


<translate>Once the server is running, you can use the official OpenVPN client to connect the desktop to the server. There is no official OpenVPN client for Android, but I find that the OpenVPN for Android client works well: https://play.google.com/store/apps/details?id=de.blinkt.openvpn</translate>
=== iOS ===
Since [https://invent.kde.org/network/kdeconnect-ios KDE Connect iOS] is being developed in native frameworks, a recent version of Xcode is required to build the app. However, due to the special entitlements used in the complete version of KDE Connect, it can only be signed by the KDE e.V. development team. A wiki page is currently being written with information on how building and distribution would work and the possible resources available to contributors without macOS access.


<translate>Once both devices are connected, test that they are able to communicate over the VPN by trying to do a network ping between them.</translate>
=== MacOS ===


<translate>=== Configure KDE Connect ===</translate>
'''KDE Connect''' works fairly well on macOS, however there is no official version as of yet. See [https://community.kde.org/KDEConnect/Build_MacOS here] for build instructions.


<translate>If your OpenVPN instance is set up for bridging, KDE Connect should work just like on a local network</translate>
You can get the Nightly Build from the [https://binary-factory.kde.org/view/MacOS/job/kdeconnect-kde_Nightly_macos/ Binary Factory].


<translate>If you are using OpenVPN with a tun device, you will have to manually add your devices by IP. Then, once you connect to the VPN, KDE Connect should automatically detect your device and either connect or be ready for pairing!</translate>
=== Special Mentions ===
Special instructions for specfic topics.


<translate>== Building KDE Connect (Desktop) ==</translate>
==== Plasmoid Development ====


<translate>If you want to build KDE Connect yourself, you'll first need to grab the code from git.</translate>
You can use <code>plasmawindowed</code> to easily run the Plasmoid (even on non-KDE environments).


Set up your dev environment as above, then run <code>make install</code>, then run <code>plasmawindowed org.kde.kdeconnect</code> to launch the Plasmoid and see your changes.
==== Mobile-Friendly QML App ====
The kdeconnect-app component of the desktop version is suitable for mobile Linux environments, too.
==== Desktop SMS Messaging App ====
'''KDE Connect''' has an SMS messaging app which lets you type and view SMS messages from your computer.
It supports basic features and works correctly most of the time.
If you are interested in trying or developing it, you can build it from source.
It is automatically built as part of the rest of '''KDE Connect''' and is output as 'kdeconnect-sms'.
== Development ==
'''KDE Connect''' is a perfect project to start contributing to KDE. You'll need a basic understanding of programming concepts, the rest can be learned by doing. Experience with Android or Qt is beneficial, but not needed.
We have a group to discuss development. You can access it from [https://go.kde.org/matrix/#/#kdeconnect:kde.org Matrix] or [https://libera.chat Libera IRC network] (#kdeconnect). If you cannot find the correct room on Matrix, it might help if you first join the [https://go.kde.org/matrix/#/!OTxETzuhBDbnPqBqbP:kde.org KDE Matrix Space]. You can read more about KDE's use of Matrix [https://community.kde.org/Matrix here] Feel free to ask any development-related questions there. We also have a [https://mail.kde.org/mailman/listinfo/kdeconnect mailing list].
All patches are submitted on Gitlab. The Android repository is [https://invent.kde.org/network/kdeconnect-android here] and the C++ Desktop repository is [https://invent.kde.org/network/kdeconnect-kde here]. Be sure to select the most relevant template. You don't need to assign any reviewers, the developers are subscribed to notifications. Should this be your first patch, it's good to know that it might take some time before your patch is reviewed (we all work on '''KDE Connect''' in our free time), and you'll probably have to make some changes a couple of times. That's not because you're new, that's what happens for all reviews (even for long-time contributors).
There are a couple of tasks marked as Junior Jobs on our [https://phabricator.kde.org/project/board/159/ workboard]. Those have some extra information on how to approach them that help you get started.
=== Setting up KDE Connect Repository for Development ===
'''KDE Connect''' is actually composed of two repositories; one for the Android implementation and one for the C++ (Desktop) implementation. You can have a local clone of both on your computer and the steps to set them up are the same. For these directions, I will use the C++ repository, but if you want the Android repository, just replace every instance of 'kdeconnect-kde' with 'kdeconnect-android'
# Fork the repository
#* With your web browser, open the Web GUI to KDE Connect's GitLab: https://invent.kde.org/network/kdeconnect-kde
#* If you are not already, sign in with your KDE identity by clicking the "Sign In" button in the top left
#* Click the "Fork" button, near the top right
#* Wait for the forking to complete
# Clone your fork
#* Open your new fork in the GitLab web GUI
#* Click the "Clone" button in the top right
#* Select the method of cloning
#** I recommend SSH. This will require you add an SSH public key to your KDE GitLab account.
#** An HTTPS clone will require you to log in with your KDE Identity credentials to push changes.
#* In the folder you want to clone, do 'git clone <cloning path from above>'
You are all set up! See the optional steps for ways to make life easier.
==== Set up second remote (Optional) ====
Having a second remote allows you to have your local 'master' branch track the upstream kdeconnect-kde master branch, so you can easily get all the latest changes.
These steps assume you are using command-line git. If you are using a GUI tool, the steps will be different, but the ideas will be the same.
# On the command line, change to your local repository clone
# Execute:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
git clone git://anongit.kde.org/kdeconnect-kde.git
# Note that we use HTTPS cloning here so that you don't need a verified account to pull changes!
git remote add upstream https://invent.kde.org/network/kdeconnect-kde.git
git fetch upstream
git checkout -b upstream-master --track upstream/master
</syntaxhighlight>
</syntaxhighlight>
# Now whenever there are new changes upstream, simply pull the upstream-master branch, then merge or rebase your local branches onto those changes!
===Development tips===


<translate>KDE Connect uses cmake as a build system, which will tell you if you are missing any dependencies. On some distros you will need to install some development packages. On Ubuntu you can use <code>sudo apt-get build-dep kdeconnect</code> to install all build dependencies. On openSUSE you can use <code>sudo zypper si -d kdeconnect-kde</code>.</translate>
====Restarting the daemon====
 
 
<translate>To configure use:</translate>
Whenever you do a change to KDE Connect you need to restart the daemon for the change to take effect.  
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
cd kdeconnect-kde
killall kdeconnectd
mkdir build
build/bin/kdeconnectd
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
</syntaxhighlight>
To build use
<syntaxhighlight lang="bash">
make
sudo make install
</syntaxhighlight>
</syntaxhighlight>


<translate>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:</translate>
====Debug Logging====
 
By default, most Linux distributions tell Qt to restrict what logging you will see. You can control this using the QT_LOGGING_RULES variable. Running something like the below command will show most all logging.


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..
export QT_LOGGING_RULES="*.debug=true; qt.*.debug=false"
</syntaxhighlight>
</syntaxhighlight>


<translate>If you install KDE Connect in a custom location you'll need to run <code>kdeconnectd</code> manually, since DBus doesn't know about it.</translate>
====DBus inspection====
 
The daemon communicates with various UI components (Plasmoid, CLI, Indicator etc.) over DBus. QDbusViewer allows inspecting the DBus interface provided by the daemon which can be incredibly useful for debugging.


<translate>For instruction on how to integrate it in KDevelop check out this [https://nicolasfella.wordpress.com/2018/03/30/building-kde-connect/ blog post]</translate>
=== Running KDE Connect on an emulator ===


<translate>== Building KDE Connect (Android) ==</translate>
How to setup running '''KDE Connect''' on an emulator is described here [[/Android_Emulator/]]


<translate>You can find the code at git://anongit.kde.org/kdeconnect-android.git. It's easiest to use Android Studio to build the app and install it to your phone. Using the emulator is possible, but need an advanced networking setup (the emulator needs to be on the same subnet as the PC, or you won't be able to connect to your desktop.</translate>
== Release Process ==


<translate>== Troubleshooting ==</translate>
The following sections describe how to release a new version KDE Connect


<translate>=== I have two devices running KDE Connect on the same network, but they can't see each other ===</translate>
=== C++ Application ===


<translate>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.</translate>
==== Tarballs ====


<translate>==== ufw ====</translate>
Tarball releases are handled automatically through KDE's release process. These are typically consumed by downstream distros in their release process.


<translate>If your firewall is '''ufw''', you can open the necessary ports with:</translate>
==== Windows Store ====


<syntaxhighlight lang="bash">
# This should ideally be done at the same time as the .exe upload, using the build from the same version.
sudo ufw allow 1714:1764/udp
# Do some QA on a build you would like to release. Navigate to the [https://invent.kde.org/network/kdeconnect-kde/-/pipelines repository pipelines], grab the latest signed *-sideload.appx of a release (not master) build you would like to test, and put it through the paces. Make sure all the plugins work, and make sure the UI elements look right.
sudo ufw allow 1714:1764/tcp
# Use the microsoftstore pipeline step to upload the .appx to the Microsoft store.
sudo ufw reload
# Open the Microsoft Store partner center.
</syntaxhighlight>
# Update the release notes for the new submissions. (Store listing -> Languages -> English)
# Approve the new release. If you don't have access to the partner center, you need to file a sysadmin ticket, as described [https://develop.kde.org/docs/packaging/microsoftstore/#the-following-submissions here].


<translate>==== firewalld ====</translate>
==== Windows EXE ====


<translate>If your firewall is '''firewalld''', you can open the necessary ports with:</translate>
# This should ideally be done at the same time as the Windows Store upload, using the build from the same version.
# Grab the *.exe and the *.exe.sha256 from the build. Install it, test that it works.
# Upload the .exe, .exe.sha256, -dbg.7z, and -dbg.7z.sha256 to the release network, as described here: https://community.kde.org/ReleasingSoftware#Uploading_the_Tar
# File a sysadmin ticket, and request that the .exe and -dbg.7z files from the build you tested be uploaded to the stable download path, like https://download.kde.org/stable/release-service/23.08.0/windows/
# Once the download files are in the mirror network, update the appstream data like https://invent.kde.org/network/kdeconnect-kde/-/commit/5639905b8dc3c36675bd8c042db7e2849023f6dc
# Follow the steps here to upload to the mirror network: https://community.kde.org/ReleasingSoftware#Uploading_the_Tar
#


<syntaxhighlight lang="bash">
=== Android ===
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
</syntaxhighlight>


<translate>==== Fedora firewall ====</translate>
Before making an Android release we have to:


<translate>In Fedora there is a program to configure the firewall. Open Firewall Configuration (the program's filename is <code>firewall-config</code>), and in '''Zones''' ➔ '''Services''' check the kde-connect service.</translate>
* Bump the version name and number in the [https://invent.kde.org/network/kdeconnect-android/-/blob/master/AndroidManifest.xml AndroidManifest.xml file].
* Create an annotated version tag on git (the name should start with "v").


<translate>Make sure you have chosen the '''Permanent''' Configuration in the drop-down at the top, otherwise these settings will be reset upon reboot.</translate>
==== Google Play Store ====


<translate>==== iptables ====</translate>
We build and sign the APK packages for the Play Store ourselves (we don't use Google's App Bundles which get signed by Google). To release on the Play Store you need two things:
<translate>If your firewall is '''iptables''', you can open the necessary ports with:</translate>
<syntaxhighlight lang="bash">
sudo iptables -A INPUT -i <yourinterface> -p udp --dport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT
sudo iptables -A INPUT -i <yourinterface> -p tcp --dport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT


sudo iptables -A OUTPUT -i <yourinterface> -p udp --sport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT
* Access to the KDE organization on the [https://play.google.com/console Google Play Console].
sudo iptables -A OUTPUT -i <yourinterface> -p tcp --sport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT
* The KDE Connect signing key and passphrase.
</syntaxhighlight>


<translate>===  My KDE Connect crashes or restarts when trying to pair with another device ===</translate>
We build an APK from a git version tag using Android Studio (Build > Generate Signed Bundle/APK and then select APK) and upload it to the [https://play.google.com/console Google Play Console] through the web UI.


<translate>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.</translate>
==== FDroid ====


<translate>===  Can I run KDE Connect without a display server? ===</translate>
The [https://f-droid.org/packages/org.kde.kdeconnect_tp/ FDroid package] is not built by us. It is built and signed by the FDroid build server. Version information is stored in a [https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/org.kde.kdeconnect_tp.yml metadata file on FDroid’s Gitlab]. We don't update the metadata file manually for new releases, though.


<translate>Yes, you can pass the command line argument `-platform offscreen` to the daemon (eg: `killall -9 kdeconnectd; /usr/lib/libexec/kdeconnectd -platform offscreen`)</translate>
FDroid periodically (every 2-3 days) scans our git repo and if there's a new version tagged it will update the metadata and trigger a build automatically. Each build attempt produces logs which can be checked to debug issues.


<translate>===  My problem is not in this list :( ===</translate>
The FDroid community is quite active and they usually reply fast when we open an issue or a MR (eg: to update the app description or some other metadata).


<translate>In case you find a bug and want to report it, you can do so in the [https://bugs.kde.org/enter_bug.cgi?product=kdeconnect KDE bug tracker].</translate>
==== Huawei ====


<translate>== Development ==</translate>
TODO


<translate>KDE Connect is a perfect project to start contributing to KDE. You'll need a basic understanding of programming concepts, the rest can be learned by doing. Experience with Android or Qt is beneficial, but not needed.</translate>
=== iOS ===


<translate>We have a group to discuss development. You can access it from [https://t.me/joinchat/BRUUN0bwMhNfn8FIejA-nw Telegram], IRC (#kdeconnect) or matrix.org (#freenode_#kdeconnect:matrix.org). Feel free to ask any development related questions there, We also have a  [https://mail.kde.org/mailman/listinfo/kdeconnect mailing list].</translate>
==== Apple App Store ====


<translate>You can submit patches on our [https://phabricator.kde.org/project/view/159/ Phabricator]. [https://community.kde.org/Infrastructure/Phabricator This wiki page] has more details on how this process works. For the reviewer, put in #kde_connect. Should this be your first patch, it's good to know that it might take some time before your patch is reviewed (we all work on KDE Connect in our free time), and you'll probably have to make some changes a couple of times. That's not because you're new, that's what happens for all reviews (even for long-time contributors).</translate>
[https://www.youtube.com/watch?v=SSGNnfOv0OU Demo: Using App Store Connect for KDE Connect iOS]


<translate>There are a couple of tasks marked as Junior Jobs on our [https://phabricator.kde.org/project/board/159/ workboard]. Those have some extra information on how to approach them that help you get started.</translate>
TODO: written description of the process

Latest revision as of 19:45, 17 March 2024

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 that enables all your devices to communicate with each other. Here are a few things KDE Connect can do:

  • Receive your phone notifications on your desktop computer and reply to messages
  • Control music playing on your desktop from your phone
  • Use your phone as a remote control for your desktop
  • Run predefined commands on your PC from connected devices. See the list of example commands for more details.
  • Check your phones battery level from the desktop
  • Ring your phone to help finding it
  • Share files and links between devices
  • Browse your phone from the desktop
  • Control the desktop's volume from the phone


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 or Nico's blog.

Installation and Usage

Please see the KDE Connect Userbase page for detailed information on the different ways KDE Connect can be installed and used.

Build KDE Connect from source

KDE Connect is a free/ libre open source software, being developed for over 8 years now.

Linux Desktop

KDE Connect can be built directly from source using CMake and system-installed dependencies.

Alternatively, you may use a meta-build system like kdesrc-build or Craft, both of which have the added benefit of leaving your linux installation unaffected and containing the dev files to a single directory.

Using a meta-build system

  • Craft is a cross-platform meta-build system that works quite well on Windows and Linux for KDE Connect devel.
    • Set up Craft using this link, and then visit here for instructions to use Craft to build KDE Connect.
  • kdesrc-build is a meta-build system that is used by many long-term KDE developers as their daily driver for KDE devel on Linux. See here for comprehensive build instructions.

Without a meta-build system

KDE Connect uses CMake as its build system, which will tell you if you are missing any dependencies. See here for build instructions.

Windows

KDE Connect is officially supported on Windows. See here for build instructions.

Android

The most convenient dev-flow way is to pass the project URL to Android Studio, build the app and install it to your phone. Remember to uninstall any already-installed KDE Connect app from your target Android device. You can also build the android app through CLI using gradle.

You can also run the app in an emulated Android device for devel. See [/Android_Emulator/ here] for instructions.

iOS

Since KDE Connect iOS is being developed in native frameworks, a recent version of Xcode is required to build the app. However, due to the special entitlements used in the complete version of KDE Connect, it can only be signed by the KDE e.V. development team. A wiki page is currently being written with information on how building and distribution would work and the possible resources available to contributors without macOS access.

MacOS

KDE Connect works fairly well on macOS, however there is no official version as of yet. See here for build instructions.

You can get the Nightly Build from the Binary Factory.

Special Mentions

Special instructions for specfic topics.

Plasmoid Development

You can use plasmawindowed to easily run the Plasmoid (even on non-KDE environments).

Set up your dev environment as above, then run make install, then run plasmawindowed org.kde.kdeconnect to launch the Plasmoid and see your changes.

Mobile-Friendly QML App

The kdeconnect-app component of the desktop version is suitable for mobile Linux environments, too.

Desktop SMS Messaging App

KDE Connect has an SMS messaging app which lets you type and view SMS messages from your computer. It supports basic features and works correctly most of the time. If you are interested in trying or developing it, you can build it from source. It is automatically built as part of the rest of KDE Connect and is output as 'kdeconnect-sms'.

Development

KDE Connect is a perfect project to start contributing to KDE. You'll need a basic understanding of programming concepts, the rest can be learned by doing. Experience with Android or Qt is beneficial, but not needed.

We have a group to discuss development. You can access it from Matrix or Libera IRC network (#kdeconnect). If you cannot find the correct room on Matrix, it might help if you first join the KDE Matrix Space. You can read more about KDE's use of Matrix here Feel free to ask any development-related questions there. We also have a mailing list.

All patches are submitted on Gitlab. The Android repository is here and the C++ Desktop repository is here. Be sure to select the most relevant template. You don't need to assign any reviewers, the developers are subscribed to notifications. Should this be your first patch, it's good to know that it might take some time before your patch is reviewed (we all work on KDE Connect in our free time), and you'll probably have to make some changes a couple of times. That's not because you're new, that's what happens for all reviews (even for long-time contributors).

There are a couple of tasks marked as Junior Jobs on our workboard. Those have some extra information on how to approach them that help you get started.

Setting up KDE Connect Repository for Development

KDE Connect is actually composed of two repositories; one for the Android implementation and one for the C++ (Desktop) implementation. You can have a local clone of both on your computer and the steps to set them up are the same. For these directions, I will use the C++ repository, but if you want the Android repository, just replace every instance of 'kdeconnect-kde' with 'kdeconnect-android'

  1. Fork the repository
    • With your web browser, open the Web GUI to KDE Connect's GitLab: https://invent.kde.org/network/kdeconnect-kde
    • If you are not already, sign in with your KDE identity by clicking the "Sign In" button in the top left
    • Click the "Fork" button, near the top right
    • Wait for the forking to complete
  2. Clone your fork
    • Open your new fork in the GitLab web GUI
    • Click the "Clone" button in the top right
    • Select the method of cloning
      • I recommend SSH. This will require you add an SSH public key to your KDE GitLab account.
      • An HTTPS clone will require you to log in with your KDE Identity credentials to push changes.
    • In the folder you want to clone, do 'git clone <cloning path from above>'

You are all set up! See the optional steps for ways to make life easier.

Set up second remote (Optional)

Having a second remote allows you to have your local 'master' branch track the upstream kdeconnect-kde master branch, so you can easily get all the latest changes.

These steps assume you are using command-line git. If you are using a GUI tool, the steps will be different, but the ideas will be the same.

  1. On the command line, change to your local repository clone
  2. Execute:
# Note that we use HTTPS cloning here so that you don't need a verified account to pull changes!
git remote add upstream https://invent.kde.org/network/kdeconnect-kde.git
git fetch upstream
git checkout -b upstream-master --track upstream/master
  1. Now whenever there are new changes upstream, simply pull the upstream-master branch, then merge or rebase your local branches onto those changes!

Development tips

Restarting the daemon

Whenever you do a change to KDE Connect you need to restart the daemon for the change to take effect.

killall kdeconnectd
build/bin/kdeconnectd

Debug Logging

By default, most Linux distributions tell Qt to restrict what logging you will see. You can control this using the QT_LOGGING_RULES variable. Running something like the below command will show most all logging.

export QT_LOGGING_RULES="*.debug=true; qt.*.debug=false"

DBus inspection

The daemon communicates with various UI components (Plasmoid, CLI, Indicator etc.) over DBus. QDbusViewer allows inspecting the DBus interface provided by the daemon which can be incredibly useful for debugging.

Running KDE Connect on an emulator

How to setup running KDE Connect on an emulator is described here Android_Emulator

Release Process

The following sections describe how to release a new version KDE Connect

C++ Application

Tarballs

Tarball releases are handled automatically through KDE's release process. These are typically consumed by downstream distros in their release process.

Windows Store

  1. This should ideally be done at the same time as the .exe upload, using the build from the same version.
  2. Do some QA on a build you would like to release. Navigate to the repository pipelines, grab the latest signed *-sideload.appx of a release (not master) build you would like to test, and put it through the paces. Make sure all the plugins work, and make sure the UI elements look right.
  3. Use the microsoftstore pipeline step to upload the .appx to the Microsoft store.
  4. Open the Microsoft Store partner center.
  5. Update the release notes for the new submissions. (Store listing -> Languages -> English)
  6. Approve the new release. If you don't have access to the partner center, you need to file a sysadmin ticket, as described here.

Windows EXE

  1. This should ideally be done at the same time as the Windows Store upload, using the build from the same version.
  2. Grab the *.exe and the *.exe.sha256 from the build. Install it, test that it works.
  3. Upload the .exe, .exe.sha256, -dbg.7z, and -dbg.7z.sha256 to the release network, as described here: https://community.kde.org/ReleasingSoftware#Uploading_the_Tar
  4. File a sysadmin ticket, and request that the .exe and -dbg.7z files from the build you tested be uploaded to the stable download path, like https://download.kde.org/stable/release-service/23.08.0/windows/
  5. Once the download files are in the mirror network, update the appstream data like https://invent.kde.org/network/kdeconnect-kde/-/commit/5639905b8dc3c36675bd8c042db7e2849023f6dc
  6. Follow the steps here to upload to the mirror network: https://community.kde.org/ReleasingSoftware#Uploading_the_Tar

Android

Before making an Android release we have to:

  • Bump the version name and number in the AndroidManifest.xml file.
  • Create an annotated version tag on git (the name should start with "v").

Google Play Store

We build and sign the APK packages for the Play Store ourselves (we don't use Google's App Bundles which get signed by Google). To release on the Play Store you need two things:

  • Access to the KDE organization on the Google Play Console.
  • The KDE Connect signing key and passphrase.

We build an APK from a git version tag using Android Studio (Build > Generate Signed Bundle/APK and then select APK) and upload it to the Google Play Console through the web UI.

FDroid

The FDroid package is not built by us. It is built and signed by the FDroid build server. Version information is stored in a metadata file on FDroid’s Gitlab. We don't update the metadata file manually for new releases, though.

FDroid periodically (every 2-3 days) scans our git repo and if there's a new version tagged it will update the metadata and trigger a build automatically. Each build attempt produces logs which can be checked to debug issues.

The FDroid community is quite active and they usually reply fast when we open an issue or a MR (eg: to update the app description or some other metadata).

Huawei

TODO

iOS

Apple App Store

Demo: Using App Store Connect for KDE Connect iOS

TODO: written description of the process