Hack: Copy KDE Connect config from one device to another

KDE Connect stores the allowed commands on the device that is controlled. But there does not seem to be a way to copy these registered commands from one device config to another.

The configured commands are stored in

~/.config/kdeconnect/LONGID/kdeconnect_runcommand/config

# like
~/.config/kdeconnect/655060ebd2d84c10991dd578a7b76fe9/kdeconnect_runcommand/config

If you have multiple devices registered, go through them and look for a file with the commands in them. you can search through the files using ripgrep

cd ~/.config/kdeconnect

rg "Unlock Screen" # or so

To detect the device you want to copy to, create a new command and name it “test123” etc. , then search for that word or see which folder was added (only one level of folders is shown as “modified” in Dolphin, so ripgrep might be faster.

Then copy the contents from the file including the commands to the file including the placeholder “test123” command.

It still does not show up, so from the new device you want the commands to work on, click on the pen to open the command editor on the controlled device. They show up but are not sent to the controlling device yet. Open any entry to edit it, and just save it again, now the commands are sent to the device.