4

I've tried both copying /etc/xdg/autostart/kdeconnectd.desktop to ~/.config/autostart and editing it and editing it directly but it didn't help.

Update: Looks like it's from /usr/share/dbus-1/services/org.kde.kdeconnect.service and I don't see any way to disable DBus services.

int_ua
  • 8,892

4 Answers4

3

For those who don't need to use KDE Connect even occasionally: you can just uninstall it. At least on my Kubuntu 22.04 setup, kdeconnect is an optional package

Expurple
  • 139
2

The easiest way to disable this service is to rename its desktop launcher:

sudo mv /etc/xdg/autostart/org.kde.kdeconnect.daemon.desktop /etc/xdg/autostart/org.kde.kdeconnect.daemon.desktop.bak

After reboot it won't start automatically anymore. If you wish to revert this behavior, just rename its launcher back.

Update: Aforementioned method, which worked in Kubuntu 20.04, doesn't work anymore in 24.04: renamed desktop file still starts the service. Most proposals, mentioned by @mYnDstrEAm in the comment, aren't applicable in this case.

To disable kdeconnect autostart in 24.04, copy /etc/xdg/autostart/org.kde.kdeconnect.daemon.desktop file to ~/.config/autostart/ and add the next line to it:

 X-KDE-autostart-condition=kdeconnect:General:Autostart:false

After reboot lsof -i shouldn't show kdeconnect in its output anymore.

Nevertheless, this daemon will start if you visit "KDE Connect" in the System Settings or initiate it with the widget from the system tray.
Any systemd rules won't help, as this daemon starts via dbus. To prevent its autostart completely, copy /usr/share/dbus-1/services/org.kde.kdeconnect.service file to the folder ~/.local/share/dbus-1/services/ and replace "Exec" parameter there with:

Exec=/usr/bin/false

Now, according to journalctl, it will try several times to start the service and give up.

Both files in home folder override the system ones, so this prohibition should survive possible package updates.
Hints are taken from this bugreport.

whtyger
  • 5,900
  • 3
  • 36
  • 48
1

I'm not sure how to disable it on autostart, but I asked around on the kde forums and got:

qdbus org.kde.kde /modules/kdeconnect [start|stop]

You can use tab completion with qdbus

I think it's only per-session.

https://forum.kde.org/viewtopic.php?f=66&t=140535

guntbert
  • 13,475
0

As of 2025 and KDE Plasma 6.3.5, the up-to-date variant of this answer seems to be:

qdbus org.kde.kdeconnect.daemon /MainApplication exit

or one of:

kquitapp5 kdeconnnect
kquitapp6 kdeconnnect

(which basically does the same thing as qdbus above).

Fonic
  • 101