KDE Connect CLI | A gift to Future Self

terminal-icon

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.

Installation

Install using your favorite graphical package manager or in the terminal.

openSUSE

sudo zypper install kdeconnect-kde

Debian Based

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:

kdeconnect-cli -l

That will give you output something like this:

– TouchPADD: device_ID (reachable)
– SkyHigh: device_ID (reachable)
– Icarus: device_ID (reachable)
– Nexus5X: device_ID (reachable)
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
kde connect pair notification

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.

Final Thoughts

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.

kdeconnect-cli --help

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.

Further Reading

https://community.kde.org/KDEConnect

https://en.opensuse.org/SDB:KDE_Connect

KDE Connect – Mobile and Desktop Convergence

MX Linux | Review from an openSUSE User

BunsenLabs Linux | Review from an openSUSE User

https://lineageos.org/

Advertisements

2 thoughts on “KDE Connect CLI | A gift to Future Self

  1. This is very intersting, for all the non-plasma desktops it’s a great way to use kdeconnect, and if you want, a little script piped to rofi and you have a GUI made by yourself

    Like

Leave a Reply to juacq97 Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s