KDEConnect: Difference between revisions

From KDE Wiki Sandbox
(A few fixes in preparation to fill the page)
(Marked this version for translation)
 
(36 intermediate revisions by 11 users not shown)
Line 1: Line 1:
<languages />
<languages />
<translate>
<translate>
== What is KDE Connect? ==
== What is KDE Connect? == <!--T:1-->


<!--T:2-->
'''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's a few things '''KDE Connect''' can do:




* Receive your phone notifications on your desktop computer and reply to messages</translate>
<!--T:3-->
* Receive your phone notifications on your desktop computer and reply to messages</translate>
<translate>
<translate>
<!--T:4-->
* Control music playing on your desktop from your phone</translate>
* Control music playing on your desktop from your phone</translate>
<translate>
<translate>
<!--T:5-->
* Use your phone as a remote control for your desktop</translate>
* Use your phone as a remote control for your desktop</translate>
<translate>
<translate>
<!--T:6-->
* Run predefined commands on your PC from connected devices. See the list of example commands for more details.</translate>
* Run predefined commands on your PC from connected devices. See the list of example commands for more details.</translate>
<translate>
<translate>
* Check your phones battery level from the desktop</translate>
<!--T:7-->
* Check your phone's battery level from the desktop</translate>
<translate>
<translate>
* Ring your phone to help finding it</translate>
<!--T:8-->
* Ring your phone to help find it</translate>
<translate>
<translate>
<!--T:9-->
* Share files and links between devices</translate>
* Share files and links between devices</translate>
<translate>
<translate>
* Browse your phone from the desktop</translate>
<!--T:10-->
* Browse your phone from your desktop</translate>
<translate>
<translate>
* Control the desktop's volume from the phone
<!--T:11-->
* Control the desktop's volume using your phone</translate>
<translate>
<!--T:87-->
* Send SMS from your desktop
 
== Installation== <!--T:14-->
 
<!--T:88-->
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.
 
<!--T:12-->
Despite 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 file a [https://bugs.kde.org/enter_bug.cgi?product=kdeconnect bug report]. 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.
 
<!--T:89-->
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].
 
<!--T:90-->
There was some development of a '''KDE Connect''' client app for iOS in 2014 (see [https://invent.kde.org/wxiao/kdeconnect-ios source code]) which sat still for a couple of years until it was picked up again in around 2018-19 with a couple of patches and TLS support. In 2021, a [https://invent.kde.org/lucaswzx/kdeconnect-ios-2021-testing '''major project'''] was started to revamp much of the old codebase with newer frameworks and possibilities of further expansion.
 
<!--T:91-->
'''KDE Connect''' is also available on [https://openrepos.net/content/r1tschy/sailfish-connect sailfish-connect] and we are working on bringing it to other Linux-based phones (Plasma Mobile, PostmarketOS etc.)
 
<!--T:92-->
[https://kdeconnect.kde.org/download.html See KDE Connect download page]
 
== Overview == <!--T:31-->


<!--T:32-->
This is the documentation page for '''KDE Connect'''. You can see the community page here [https://community.kde.org/KDEConnect community.kde.org/KDEConnect] which explains what '''KDE Connect''' is and how to install it.


Despite common misconception, you can use '''KDE Connect''' on all desktop environments. Since most 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 bug. There are multiple ways to enhance the KDE Connect experience on non-Plasma desktops. If you are a GNOME user you might prefer '''GSConnect''', a GNOME shell extension. For desktops with AppIndicator support (Budgie, Cinnamon, LXDE, Pantheon, Unity), indicator-kdeconnect is available.  
<!--T:33-->
'''KDE Connect''' has two parts. The desktop program and the phone app.


'''KDE Connect''' for the moment only supports Android and SailfishOS. The '''KDE Connect''' developers are working on supporting more phone os (plasma mobile, postmarketOS, etc. ).
==Pairing two devices together== <!--T:24-->


== Installation==
<!--T:25-->
First, you need to open '''KDE Connect''' on your computer ''and'' phone. You should now be able to see in each screen the name of the device you wish to pair with. If it's not working, make sure that the two devices are connected to the same network and that there isn't any firewall blocking the two devices from seeing each other. See the [[Special:myLanguage/KDEConnect#I_have_two_devices_running_KDE_Connect_on_the_same_network.2C_but_they_can.27t_see_each_other|troubleshooting section]].


Before using '''KDE Connect''', you need to install it on your computer through your distro's repositories and your phone.
<!--T:26-->
[[File:KDE_Connect_computer_sync.png|700px|center]]


You can install '''KDE Connect''' on your computer by searching it on '''Discover''' or using one of the following commands:
<!--T:27-->
[[File:KDE_Connect_android_sync.jpg|300px|center]]


<!--T:28-->
You can now request pairing in one of the two devices. The other device will show a prompt asking to accept the pairing request. Confirm it and that's it! Your devices are now paired.


* On Debian, Ubuntu and Ubuntu-based distros: sudo apt install kdeconnect
<!--T:29-->
* On Fedora: sudo yum install kdeconnect
While a typical configuration might include one computer and one phone, it's also possible to pair two computers instead.
* On openSUSE: sudo zypper install kdeconnect
* On Arch and Arch-based distros: sudo pacman -S kdeconnect OR yay -S kdeconnect


== Browser Integration == <!--T:93-->


A more complete guide explaining how to install KDE software on your computer is available [[Special:myLanguage/Tutorials/Install_KDE_software|here]].
<!--T:94-->
[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.


On your phone, '''KDE Connect''' is available on the [https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp Play Store] or on [https://f-droid.org/en/packages/org.kde.kdeconnect_tp/ F-Droid].</translate>
== Changing Device Names == <!--T:34-->


<translate>  
<!--T:35-->
For '''SailfishOS''', you can find more information in the [https://openrepos.net/content/piggz/kde-connect community store].
You can only change the name of your device on the device itself. So if you want to change the name of your computer then you must use the desktop program and if you want to change the name of your phone or tablet you must make the change in the '''KDE Connect''' app. Once a device is renamed, it will automatically sync with all other connected devices.


<!--T:73-->
[[File:KDEConnectRename.png|1000px|center]]


==Pairing two devices together==
== Running KDE Connect over OpenVPN == <!--T:95-->


First, you need to open '''KDE Connect''' on your computer ''and'' phone. You should now be able to see in each screen the name of the device you wish to pair with. If it's working, make sure that the two devices are connected to the same network and that there isn't any firewall blocking the two devices from seeing each other. See the troubleshooting section available in the [https://community.kde.org/KDEConnect#I_have_two_devices_running_KDE_Connect_on_the_same_network.2C_but_they_can.27t_see_each_other Community wiki].  
<!--T:96-->
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 the remote control to give a presentation.


[[File:KDE_Connect_computer_sync.png|4000px|center]]
=== Set up OpenVPN === <!--T:97-->


[[File:KDE_Connect_android_sync.jpg|300px|center]]
<!--T:98-->
If you have your own server with a public-facing IP address, you can set up '''OpenVPN''' yourself. It is not the easiest piece of software to set up, but by following a setup tutorial such as [https://openvpn.net/howto.html this one], you should be able to manage.
 
<!--T:99-->
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.
 
<!--T:100-->
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.
 
<!--T:101-->
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 the '''OpenVPN for Android''' client works well: [https://play.google.com/store/apps/details?id=de.blinkt.openvpn openvpn]
 
<!--T:102-->
Once both devices are connected, test that they are able to communicate over the VPN by trying to do a network ping between them.
 
=== Configure KDE Connect === <!--T:103-->
 
<!--T:104-->
If your '''OpenVPN''' instance is set up for bridging, '''KDE Connect''' should work just like on a local network.
 
<!--T:105-->
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!
 
==Available Plugins == <!--T:36-->
 
===Battery Monitor=== <!--T:37-->
 
<!--T:38-->
''"Show your phone battery next to your computer battery."''
 
<!--T:74-->
By enabling this, the '''KDE Connect''' widget on your panel tray will display your phone's battery.
 
<!--T:75-->
[[File:KDEConnectBattery.png|500px|center]]
 
===Clipboard=== <!--T:39-->
 
<!--T:40-->
''"Share the clipboard between devices."''
 
<!--T:76-->
With this, you can simply copy text from your computer and it will be immediately available to paste on your phone, and vice-versa. This does not work with images though.
 
====Auto-sync on Android 10+==== <!--T:134-->
Android 10 prevents apps from accessing the clipboard to prevent malicious apps from accessing your data. This makes the clipboard plugin in KDE Connect uncomfortable to use.
 
=====Magisk Module (root only)===== <!--T:135-->
If you are rooted, you can use a Magisk module to remove this restriction.


You can now request pairing in one of the two devices. The other device will show a prompt asking to accept the pairing request. Confirm it and that's it! Your devices are now paired.
=====Log Reading===== <!--T:136-->
If you have a build containing commit [https://invent.kde.org/network/kdeconnect-android/commit/edc655da5ac1eb5c3027c8556cc62037a1d4c5ac edc655da5ac1eb5c3027c8556cc62037a1d4c5ac], you can enable the READ_LOGS permission in order to enable a workaround to clipboard sync.


While a typical configuration might include one computer and one phone, it's also possible to pair two computers instead.
<!--T:137-->
Run these commands:


{{Construction}}
<!--T:138-->
<syntaxhighlight lang="bash">
adb -d shell pm grant org.kde.kdeconnect_tp android.permission.READ_LOGS;
adb -d shell appops set org.kde.kdeconnect_tp SYSTEM_ALERT_WINDOW allow;
adb -d shell am force-stop org.kde.kdeconnect_tp;
</syntaxhighlight>


== Overview ==
<!--T:139-->
''How does it work?''


This is the documentation page for '''KDEConnect'''. You can see the community page here [https://community.kde.org/KDEConnect] which explains what '''KDEConnect''' is and how to install it.
<!--T:140-->
With log reading enabled, KDE Connect watches its own log. If it sees a line indicating that it has been denied access to read the clipboard, it pops up an invisible window to the foreground, grabs the clipboard, and closes the window.


KDEConnect has two parts. The desktop program and the phone app.
===Contacts=== <!--T:141-->


== Changing Device Names ==
<!--T:142-->
''"Synchronize contacts between devices"''


You can only change the name of your device on the device itself. so if you want to change the name of your computer then you must use the desktop program. If you want to change the name of your phone or tablet you must make the change in the phone app. Once a device is renamed it will automatically sync with all other connected devices.
<!--T:143-->
This plugin silently synchronizes contacts, in vcard format, from your phone to your desktop.


== Plugins ==
<!--T:144-->
As of this writing, the synchronization is one-way, with data being sent from the Android implementation to the desktop, to be consumed by any application which uses the KPeople library with the KPeopleVCard plugin, such as the KDE Connect SMS app.


===Battery Monitor===
====VCard Location==== <!--T:145-->


Show your phone battery next to your computer battery.
<!--T:146-->
On non-Windows platforms, contact cards are written to ''QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/kpeoplevcard"''. This might be configured differently by your system, but normally resolves to ''~/.local/share/kpeoplevcard''.


===Clipboard===
<!--T:147-->
On Windows, the path resolves to ''%LocalAppData%''.


Share the clipboard between devices.
===Inhibit Screensaver=== <!--T:41-->


===Inhibit Screensaver===
<!--T:42-->
''"Inhibit the screensaver when the device is connected."''


Inhibit the screensaver when the device is connected.
<!--T:43-->
This makes sure that your screensaver will not run while your device is connected.


===Multimedia Control Receiver===
===Multimedia Control Receiver=== <!--T:44-->
''"Remote control your music and videos."''


With this feature, you can remote control your music and videos. You can also change the application sound volume.
<!--T:45-->
With this feature, you can control your music and videos remotely, with pause/play, previous/next, 5 s before/later. You can also change which media player to control, in addition to application and system volume.


<!--T:46-->
[[File:KDEConnectMultimediaControlReceiverAndroid.png|300px|center|Multimedia control receiver with KDE Connect in Android]]
[[File:KDEConnectMultimediaControlReceiverAndroid.png|300px|center|Multimedia control receiver with KDE Connect in Android]]


===Pause Media During Calls===
===Pause Media During Calls=== <!--T:47-->
''"Pause music/videos during a phone call."''


Pause music/videos during the call. This features can be powerfully combined with the [[Special:myLanguage/Plasma-browser-integration|Plasma Browser Integration]]. For example, when you are listening to some music on Youtube, the music will be paused during the call.
<!--T:48-->
Pause music/videos during a call. This feature can be powerful when combined with [[Special:myLanguage/Plasma-browser-integration|Plasma Browser Integration]]. For example, when you are listening to some music on Peertube or Youtube, the video will be paused whenever you receive a call.


<!--T:49-->
You can configure this option to pause only when you pick up your phone or directly when your phone starts to ring. You can also decide if you want to only pause the media player or/and mute the system sound.  
You can configure this option to pause only when you pick up your phone or directly when your phone starts to ring. You can also decide if you want to only pause the media player or/and mute the system sound.  


===Ping===
===Ping=== <!--T:50-->
 
<!--T:51-->
''"Send and receive pings."''
 
<!--T:52-->
This serves to test your connection to a given device. Once selected, a "Ping!" will appear as a notification on your receiving device.
 
<!--T:53-->
On your desktop, you can send a ping through the KDE Connect settings or through the widget on the tray.


Send and receive ping
<!--T:54-->
On your phone, you can send a ping through the upper right hamburger menu on the '''KDE Connect''' app.


<!--T:55-->
[[FIle:KDE_Connect_ping_android.jpg|center|300px|Send a ping to your computer with android]]
[[FIle:KDE_Connect_ping_android.jpg|center|300px|Send a ping to your computer with android]]


===Receive Notifications===
===Receive Notifications=== <!--T:56-->
 
<!--T:57-->
''"Show your phone notifications on your computer and keep them in sync."''
 
<!--T:58-->
This keeps you in touch with what happens on your phone! Any notifications you receive on your phone will be shown in your computer. Some notifications, such as those of Instant Messengers (IM) like Telegram can be replied on the fly through the computer notification itself.
 
===Remote File System Browser=== <!--T:59-->
''"Browse the remote device filesystem using SFTP."''
 
<!--T:60-->
This allows you to access your phone storage! When enabled, a device will appear in Dolphin with which you can navigate your external storage.
 
<!--T:77-->
[[File:KDEConnectBrowse.png|1000px|center]]
 
<!--T:78-->
[[File:KDEConnectViewBrowser.png|500px|center]]
 
===Ring My Phone=== <!--T:61-->
''"Find your lost phone by making it play an alarm sound."''
 
<!--T:62-->
This also serves to test your connection to a given device, and by ringing your phone remotely, you can quickly find its location!
 
<!--T:79-->
[[File:KDEConnectRing.png|500px|center]]
 
===Run Commands=== <!--T:63-->
''"Execute console commands directly."''
 
<!--T:64-->
With '''KDE Connect''', you can run predefined commands on your computer by pressing buttons on your phone!
Instructions on how to add a command are shown in [[Special:myLanguage/KDE_Connect/Tutorials/Adding_commands|userbase]]. A set of useful commands can also be found [[Special:myLanguage/KDE_Connect/Tutorials/Useful_commands|here]].
Some sample commands, such as suspend and lock screen, are also available.
 
===Send Notifications=== <!--T:65-->
''"Broadcast this computer's notifications, so they can be shown on other devices."''
 
<!--T:80-->
This is pretty self-explanatory: notifications from your computer will show up on your phone.
 
<!--T:66-->
You can configure if you want to send the notification description, the icons pertaining to the application and persistent or very important notifications.
This keeps you in touch with what happens on your computer! Any notifications you receive on your computer will be shown in your phone.
 
===Share and Receive=== <!--T:67-->
''"Receive and send files, URLs or plain text easily."''
 
<!--T:81-->
This integrates your desktop and your browser so that you can right-click on files or links and send it immediately to your phone!
 
<!--T:82-->
Files show the right-click option "Send to phone via KDEConnect" and will send the file directly, showing it among your notifications.
 
<!--T:83-->
Links show the right-click option "Open on phone" and will automatically open your phone's default browser on the chosen website. Really handy!
 
<!--T:68-->
When receiving files from your phone into your computer, they will go to your Downloads folder by default. If you wish, you can change that too.
 
===Telephone Integration=== <!--T:69-->
''"Show notifications for incoming calls."''
 
<!--T:70-->
Whenever you get a call on your phone, a notification telling you which number is calling appears. Paired with "Pause media during calls", you'll surely be able to answer readily and never lose a call!
 
===Virtual Input=== <!--T:71-->
''"Use your phone as a touchpad and keyboard."''
 
<!--T:84-->
With this enabled, by going to your phone app and selecting Remote input, a touch screen will immediately be available for you to control your computer mouse, similarly to a touchpad. One touch equals one click.
 
<!--T:85-->
The keyboard icon in the upper right allows you to type on your phone and see the result on your computer too.
 
<!--T:72-->
If you press the hamburger menu right by its side, you'll be able to send right and middle clicks.
 
===Presentation control=== <!--T:86-->
It is possible to control presentations using the previous/next slide button. When the device is locked, you can use the volume up/down button to do that. You can also highlight something using the laserpointer. Just move your phone and the blue circle will follow! Using the hamburger menu, you can toggle fullscreen (F5) or quit the presentation (Esc).
 
== Permissions Explanations and Tutorial Videos == <!--T:155-->
 
<!--T:156-->
From time to time, Google will require video submissions to prove that we use permissions in ways which are allowed by Play Store policies. Those videos are gathered here for future reference, but also because they provide nice tutorials of how to use certain features, and are also useful to demonstrate permissions usage to a wider audience.
 
=== Android Mouse Receiver (Accessibility Permission) === <!--T:157-->
 
<!--T:158-->
In order to be a fake input device, Android requires that we take the Accessibility permission. The mouse receiver plugin is demonstrated in the following video.
{{#ev:youtube|PQ-Oubt4Rks}}
 
=== Other Permissions === <!--T:159-->
 
<!--T:160-->
This video demonstrates several KDE Connect features, in particular it demonstrates how KDE Connect uses certain privacy-impacting permissions, such as the SMS permissions.
{{#ev:youtube|QGHzXpX0vtk}}
 
== Troubleshooting == <!--T:106-->
 
</translate><span id="I have two devices running KDE Connect on the same network, but they can't see each other"></span><translate>
 
=== I have two devices running KDE Connect on the same network, but they can't see each other === <!--T:107-->
 
<!--T:108-->
'''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.
 
<!--T:148-->
Check that the process is listening on the network:
 
<!--T:149-->
<syntaxhighlight lang="bash">
sudo netstat -tunelp | grep -i kdeconnect
</syntaxhighlight>
 
<!--T:150-->
Are the ports open/blocked?
 
<!--T:151-->
<syntaxhighlight lang="bash">
netcat -z -v <your-phones-ip> 1714-1764
</syntaxhighlight>
 
<!--T:152-->
Example output:
 
<!--T:153-->
Connection to <your -phones-ip> 1716 port [tcp/*] succeeded!
 
<!--T:154-->
You also get lots of Connection refused, but you need 1 “succeeded”
 
<!--T:161-->
If the the network connection is not the problem, you might try starting from a clean configuration again:
 
<!--T:162-->
<syntaxhighlight lang="bash">
killall kdeconnectd
mv ~/.config/kdeconnect ~/.config/kdeconnect.bak
</syntaxhighlight>
 
==== ufw ==== <!--T:109-->
 
<!--T:110-->
If your firewall is '''ufw''', you can open the necessary ports with:
 
<!--T:111-->
<syntaxhighlight lang="bash">
sudo ufw allow 1714:1764/udp
sudo ufw allow 1714:1764/tcp
sudo ufw reload
</syntaxhighlight>
 
==== firewalld ==== <!--T:112-->
 
<!--T:113-->
If your firewall is '''firewalld''', you can open the necessary ports with:
 
<!--T:114-->
<syntaxhighlight lang="bash">
sudo firewall-cmd --permanent --zone=public --add-service=kdeconnect
sudo firewall-cmd --reload
</syntaxhighlight>
 
==== Firewall Configuration (firewall-config) ==== <!--T:115-->
 
<!--T:116-->
Open Firewall Configuration (<code>firewall-config</code>). In '''Zones''' ➔ '''Services''', check the kde-connect service.
 
<!--T:117-->
Make sure you choose the "Permanent" '''Configuration:''' option in the drop-down menu at the top, otherwise rebooting will discard your settings changes.
 
==== iptables ==== <!--T:118-->


Show your phone notifications on your computer and keep them in sync.
<!--T:119-->
If your firewall is '''iptables''', you can open the necessary ports with:
<syntaxhighlight lang="bash">
sudo iptables -I INPUT -i <yourinterface> -p udp --dport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT
sudo iptables -I INPUT -i <yourinterface> -p tcp --dport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT


===Remote File System Browser===
<!--T:120-->
sudo iptables -A OUTPUT -o <yourinterface> -p udp --sport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT
sudo iptables -A OUTPUT -o <yourinterface> -p tcp --sport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT
</syntaxhighlight>


explanation here
===  KDE Connect crashes or restarts when trying to pair with another device === <!--T:121-->


===Ring My Phone===
<!--T:122-->
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.


explanation here
=== KDE Connect Android app crashes === <!--T:129-->


===Run Commands===
<!--T:130-->
If the KDE Connect Android app crashes, you might be able to get more information about the crash by using '''adb logcat'''.


With KDE Connect, you can run from your phone with only one click predefined commands on your computer.
<!--T:131-->
There is a tutorial about adding new command in [[Special:myLanguage/KDE_Connect/Tutorials/Adding_commands|userbase]]. A set of useful commands can also be found [[Special:myLanguage/KDE_Connect/Tutorials/Useful_commands|here]].
Set up ADB using the [https://developer.android.com/studio/command-line/adb official instructions]


===Send Notifications===
<!--T:132-->
The following command should list all information relevant to your crash. Run '''adb logcat''' *before* triggering the crash.


explanation here
<!--T:133-->
<syntaxhighlight lang="bash">
adb logcat --pid=$(adb shell pidof -s org.kde.kdeconnect_tp)
</syntaxhighlight>


===Share and Receive===
=== Can I run KDE Connect without a display server? === <!--T:123-->


explanation here
<!--T:124-->
Yes, you can pass the command line argument <code>-platform offscreen</code> to the daemon (eg: <code>killall -9 kdeconnectd; /usr/lib/libexec/kdeconnectd -platform offscreen</code>)


===Telephony Integration===
=== GSConnect === <!--T:125-->


explanation here
<!--T:126-->
'''GSConnect''' is an independent project which implements the '''KDE Connect''' protocol into GNOME and uses the same Android app. If you are running '''GSConnect''', please visit that project's [https://github.com/andyholmes/gnome-shell-extension-gsconnect/wiki GitHub page] first for support. If you and the '''GSConnect''' team determine the issue is the Android app or protocol, feel free to report those in the '''KDE Connect''' bug tracker.


===Virtual Input===
=== My problem is not in this list :( === <!--T:127-->


explanation here
<!--T:128-->
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>
</translate>

Latest revision as of 08:46, 26 January 2023

What is KDE Connect?

KDE Connect is a project that enables all your devices to communicate with each other. Here's 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 phone's battery level from the desktop
  • Ring your phone to help find it
  • Share files and links between devices
  • Browse your phone from your desktop
  • Control the desktop's volume using your phone
  • Send SMS from your desktop

Installation

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.

Despite 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 file a bug report. There are multiple ways to enhance the KDE Connect experience on non-Plasma desktops. If you are a GNOME user you might prefer GSConnect, a GNOME shell extension. For desktops with AppIndicator support (Budgie, Cinnamon, LXDE, Pantheon, Unity) indicator-kdeconnect is available.

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) which sat still for a couple of years until it was picked up again in around 2018-19 with a couple of patches and TLS support. In 2021, a major project was started to revamp much of the old codebase with newer frameworks and possibilities of further expansion.

KDE Connect is also available on sailfish-connect and we are working on bringing it to other Linux-based phones (Plasma Mobile, PostmarketOS etc.)

See KDE Connect download page

Overview

This is the documentation page for KDE Connect. You can see the community page here community.kde.org/KDEConnect which explains what KDE Connect is and how to install it.

KDE Connect has two parts. The desktop program and the phone app.

Pairing two devices together

First, you need to open KDE Connect on your computer and phone. You should now be able to see in each screen the name of the device you wish to pair with. If it's not working, make sure that the two devices are connected to the same network and that there isn't any firewall blocking the two devices from seeing each other. See the troubleshooting section.

You can now request pairing in one of the two devices. The other device will show a prompt asking to accept the pairing request. Confirm it and that's it! Your devices are now paired.

While a typical configuration might include one computer and one phone, it's also possible to pair two computers instead.

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.

Changing Device Names

You can only change the name of your device on the device itself. So if you want to change the name of your computer then you must use the desktop program and if you want to change the name of your phone or tablet you must make the change in the KDE Connect app. Once a device is renamed, it will automatically sync with all other connected devices.

Running KDE Connect over OpenVPN

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 the remote control to give a presentation.

Set up OpenVPN

If you have your own server with a public-facing IP address, you can set up OpenVPN yourself. It 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.

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.

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.

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 the OpenVPN for Android client works well: openvpn

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

Configure KDE Connect

If your OpenVPN instance is set up for bridging, KDE Connect should work just like on a local network.

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!

Available Plugins

Battery Monitor

"Show your phone battery next to your computer battery."

By enabling this, the KDE Connect widget on your panel tray will display your phone's battery.

Clipboard

"Share the clipboard between devices."

With this, you can simply copy text from your computer and it will be immediately available to paste on your phone, and vice-versa. This does not work with images though.

Auto-sync on Android 10+

Android 10 prevents apps from accessing the clipboard to prevent malicious apps from accessing your data. This makes the clipboard plugin in KDE Connect uncomfortable to use.

Magisk Module (root only)

If you are rooted, you can use a Magisk module to remove this restriction.

Log Reading

If you have a build containing commit edc655da5ac1eb5c3027c8556cc62037a1d4c5ac, you can enable the READ_LOGS permission in order to enable a workaround to clipboard sync.

Run these commands:

adb -d shell pm grant org.kde.kdeconnect_tp android.permission.READ_LOGS;
adb -d shell appops set org.kde.kdeconnect_tp SYSTEM_ALERT_WINDOW allow;
adb -d shell am force-stop org.kde.kdeconnect_tp;

How does it work?

With log reading enabled, KDE Connect watches its own log. If it sees a line indicating that it has been denied access to read the clipboard, it pops up an invisible window to the foreground, grabs the clipboard, and closes the window.

Contacts

"Synchronize contacts between devices"

This plugin silently synchronizes contacts, in vcard format, from your phone to your desktop.

As of this writing, the synchronization is one-way, with data being sent from the Android implementation to the desktop, to be consumed by any application which uses the KPeople library with the KPeopleVCard plugin, such as the KDE Connect SMS app.

VCard Location

On non-Windows platforms, contact cards are written to QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/kpeoplevcard". This might be configured differently by your system, but normally resolves to ~/.local/share/kpeoplevcard.

On Windows, the path resolves to %LocalAppData%.

Inhibit Screensaver

"Inhibit the screensaver when the device is connected."

This makes sure that your screensaver will not run while your device is connected.

Multimedia Control Receiver

"Remote control your music and videos."

With this feature, you can control your music and videos remotely, with pause/play, previous/next, 5 s before/later. You can also change which media player to control, in addition to application and system volume.

Multimedia control receiver with KDE Connect in Android
Multimedia control receiver with KDE Connect in Android

Pause Media During Calls

"Pause music/videos during a phone call."

Pause music/videos during a call. This feature can be powerful when combined with Plasma Browser Integration. For example, when you are listening to some music on Peertube or Youtube, the video will be paused whenever you receive a call.

You can configure this option to pause only when you pick up your phone or directly when your phone starts to ring. You can also decide if you want to only pause the media player or/and mute the system sound.

Ping

"Send and receive pings."

This serves to test your connection to a given device. Once selected, a "Ping!" will appear as a notification on your receiving device.

On your desktop, you can send a ping through the KDE Connect settings or through the widget on the tray.

On your phone, you can send a ping through the upper right hamburger menu on the KDE Connect app.

Send a ping to your computer with android
Send a ping to your computer with android

Receive Notifications

"Show your phone notifications on your computer and keep them in sync."

This keeps you in touch with what happens on your phone! Any notifications you receive on your phone will be shown in your computer. Some notifications, such as those of Instant Messengers (IM) like Telegram can be replied on the fly through the computer notification itself.

Remote File System Browser

"Browse the remote device filesystem using SFTP."

This allows you to access your phone storage! When enabled, a device will appear in Dolphin with which you can navigate your external storage.

Ring My Phone

"Find your lost phone by making it play an alarm sound."

This also serves to test your connection to a given device, and by ringing your phone remotely, you can quickly find its location!

Run Commands

"Execute console commands directly."

With KDE Connect, you can run predefined commands on your computer by pressing buttons on your phone! Instructions on how to add a command are shown in userbase. A set of useful commands can also be found here. Some sample commands, such as suspend and lock screen, are also available.

Send Notifications

"Broadcast this computer's notifications, so they can be shown on other devices."

This is pretty self-explanatory: notifications from your computer will show up on your phone.

You can configure if you want to send the notification description, the icons pertaining to the application and persistent or very important notifications. This keeps you in touch with what happens on your computer! Any notifications you receive on your computer will be shown in your phone.

Share and Receive

"Receive and send files, URLs or plain text easily."

This integrates your desktop and your browser so that you can right-click on files or links and send it immediately to your phone!

Files show the right-click option "Send to phone via KDEConnect" and will send the file directly, showing it among your notifications.

Links show the right-click option "Open on phone" and will automatically open your phone's default browser on the chosen website. Really handy!

When receiving files from your phone into your computer, they will go to your Downloads folder by default. If you wish, you can change that too.

Telephone Integration

"Show notifications for incoming calls."

Whenever you get a call on your phone, a notification telling you which number is calling appears. Paired with "Pause media during calls", you'll surely be able to answer readily and never lose a call!

Virtual Input

"Use your phone as a touchpad and keyboard."

With this enabled, by going to your phone app and selecting Remote input, a touch screen will immediately be available for you to control your computer mouse, similarly to a touchpad. One touch equals one click.

The keyboard icon in the upper right allows you to type on your phone and see the result on your computer too.

If you press the hamburger menu right by its side, you'll be able to send right and middle clicks.

Presentation control

It is possible to control presentations using the previous/next slide button. When the device is locked, you can use the volume up/down button to do that. You can also highlight something using the laserpointer. Just move your phone and the blue circle will follow! Using the hamburger menu, you can toggle fullscreen (F5) or quit the presentation (Esc).

Permissions Explanations and Tutorial Videos

From time to time, Google will require video submissions to prove that we use permissions in ways which are allowed by Play Store policies. Those videos are gathered here for future reference, but also because they provide nice tutorials of how to use certain features, and are also useful to demonstrate permissions usage to a wider audience.

Android Mouse Receiver (Accessibility Permission)

In order to be a fake input device, Android requires that we take the Accessibility permission. The mouse receiver plugin is demonstrated in the following video. {{#ev:youtube|PQ-Oubt4Rks}}

Other Permissions

This video demonstrates several KDE Connect features, in particular it demonstrates how KDE Connect uses certain privacy-impacting permissions, such as the SMS permissions. {{#ev:youtube|QGHzXpX0vtk}}

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.

Check that the process is listening on the network:

sudo netstat -tunelp | grep -i kdeconnect

Are the ports open/blocked?

netcat -z -v <your-phones-ip> 1714-1764

Example output:

Connection to <your -phones-ip> 1716 port [tcp/*] succeeded!

You also get lots of Connection refused, but you need 1 “succeeded”

If the the network connection is not the problem, you might try starting from a clean configuration again:

killall kdeconnectd
mv ~/.config/kdeconnect ~/.config/kdeconnect.bak

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 --permanent --zone=public --add-service=kdeconnect
sudo firewall-cmd --reload

Firewall Configuration (firewall-config)

Open Firewall Configuration (firewall-config). In ZonesServices, check the kde-connect service.

Make sure you choose the "Permanent" Configuration: option in the drop-down menu at the top, otherwise rebooting will discard your settings changes.

iptables

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

sudo iptables -I INPUT -i <yourinterface> -p udp --dport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT
sudo iptables -I INPUT -i <yourinterface> -p tcp --dport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT

sudo iptables -A OUTPUT -o <yourinterface> -p udp --sport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT
sudo iptables -A OUTPUT -o <yourinterface> -p tcp --sport 1714:1764 -m state --state NEW,ESTABLISHED -j ACCEPT

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.

KDE Connect Android app crashes

If the KDE Connect Android app crashes, you might be able to get more information about the crash by using adb logcat.

Set up ADB using the official instructions

The following command should list all information relevant to your crash. Run adb logcat *before* triggering the crash.

adb logcat --pid=$(adb shell pidof -s org.kde.kdeconnect_tp)

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)

GSConnect

GSConnect is an independent project which implements the KDE Connect protocol into GNOME and uses the same Android app. If you are running GSConnect, please visit that project's GitHub page first for support. If you and the GSConnect team determine the issue is the Android app or protocol, feel free to report those in the KDE Connect bug tracker.

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 bug tracker.