KDE Connect is an application that I use on a daily basis between my mobile and my desktop or laptop Linux systems. Most of my systems are openSUSE machines running KDE Plasma and the mobile devices are running LineageOS (Android). Up until I decided to run a non-KDE Plasma desktop.
I was given the distinct pleasure in getting to know the KDE Connect Command Line Interface application when pairing devices to a BunsenLabs and MX Linux installation. The main reason for this was to be able to share clipboards and use my HP TouchPad as an input device for the machine.
The commands are mostly easy to use. This is a guide for me, if it works for you, fantastic. If you have no interest in this, that is perfectly fine too.
Install using your favorite graphical package manager or in the terminal.
sudo zypper install kdeconnect-kde
sudo apt-get install kdeconnect
Process to Pair Device
There are two ways you can go about doing this. From the terminal on the non-Plasma system to a system with either Android KDE Plasma or the reverse. I am going to demonstrate this the fun way, which is from the terminal to the GUI systems.
Assuming that you have configured your firewall to allow KDE Connect communication, in short 1714-1764 for UDP and TCP connections, check with your distribution for firewall instructions, or here for the KDE Community instructions. Optionally, here for the openSUSE Instructions.
In the terminal run this to find KDE Connect enabled devices:
That will give you output something like this:
4 devices found
Now that you have identified the devices you will need to pair the device
kdeconnect-cli -d device_ID --pair
On the device you are attempting to connect to, you will see the notification that the a device is attempting to connect
Accept it and move on to the next device you that you wish to connect.
How I am using it
I am using my TouchPADD as another input device for the non-KDE Plasma system, I am also using it to share clipboard contents between machines as well, usually URLs.
There are many more function of KDE Connect you can do in the terminal. You can play around with KDE Connect in the terminal by running.
The only other command I have used is to ping another device
kdeconnect-cli -d device_ID --ping
Since I couldn’t find any resources that plainly explained how to use the terminal commands so it was fitting to jot it down. Hopefully you find this useful.