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,912
  • Standard way to disable services is sudo systectl disable kdeconnectd. You might want to stop it first and might need to mask it (see man systemctl) and can check on the status. – pbhj Sep 07 '22 at 14:58
  • 1
    But there is no kdeconnectd.service, is there? (also there is a typo in systectl, for anyone who wants to try) – int_ua Oct 08 '22 at 12:41
  • Yes, it should be systemctl; yes, you're right systemd does start kdeconnect (on my Kubuntu 22.04) but it doesn't run as a service as you note. – pbhj Oct 08 '22 at 17:23

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
  • Whilst this does disable, the questioner probably wanted the option to run manually. The answer would be better (for novices) if you mentioned how to remove. Welcome to AU. – pbhj Sep 07 '22 at 14:55
  • 2
    That's not what I needed but it's also great news, thanks! Please leave this answer in place, mods. – int_ua Oct 08 '22 at 12:38
  • Thank you for your answer. I was not only trying to disable it but also remove it from my system (it's really useless). And your answer was exactly what I was looking for. – hbobenicio Dec 18 '24 at 11:46
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
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,485
  • Thank you! Unfortunately, I don't see any stop method on any related DBus service with qdbusviewer. What version are you using? I'm on 1.0.3. – int_ua Jun 16 '17 at 16:58
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