This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Trying to disable kdeconnectd; Understanding services

Tags: None
(comma "," separated)
jasonjayalap
Registered Member
Posts
2
Karma
0
Hi, all.

I'm trying to disable the kdeconnectd (android service) from loading, but I'm having a hard time understanding how to interact with kded and background service daemons.

https://userbase.kde.org/KDE_System_Adm ... d_Services
Doesn't seem to be accurate. I don't see any .desktop file for kdeconnect and I don't see where the Service Manager is.

https://docs.kde.org/trunk5/en/kde-work ... trol/kded/
How do I interact with the service manager?
airdrik
Registered Member
Posts
1854
Karma
5
OS
There's a Service Manager in System Settings under Startup and Shutdown where you can enable/disable various services from starting on startup.


airdrik, proud to be a member of KDE forums since 2008-Dec.
jasonjayalap
Registered Member
Posts
2
Karma
0
Thank you, airdrik

Do you know how to do this from the command line? It's necessary for our project (Whonix).
airdrik
Registered Member
Posts
1854
Karma
5
OS
I don't know for sure, so I did a little bit of perusing of the dbus API, I dug up "qdbus org.kde.kde /modules/kdeconnect [start|stop]" which looks like it should start/stop the kdeconnect module (service?).


airdrik, proud to be a member of KDE forums since 2008-Dec.
User avatar
int_ua
Registered Member
Posts
20
Karma
0
airdrik wrote:There's a Service Manager in System Settings under Startup and Shutdown where you can enable/disable various services from starting on startup.

With kdeconnect 1.0.3 (which is the latest release currently) it's not there. Also I don't see start/stop methods on DBus with qdbusviewer nor on `org.kde.kdeconnect /modules/kdeconnect` neither on `org.kde.kdeconnectd /modules/kdeconnect` and `org.kde.kde /modules/kdeconnect` doesn't exist.
thatguyisjames
Registered Member
Posts
1
Karma
0
I spent some time this morning trying to figure this out. I am not sure why KDEConnect is not used as a standard service so one could just...
Code: Select all
sudo service kdeconnectd [start/stop/status]


What I did find was using pkill you can stop the service.
Then using a find command, found where the actual kdeconnectd binary file was.

I wrote this simple script to start stop and show status if running.
Code: Select all
#!/bin/bash

if [ $1 = start ]
then
        /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd > /dev/null 2>&1 &
        echo kdeconnect started
fi

if [ $1 = stop ]
then
        pkill kdeconnectd
        echo kdeconnect killed
fi

if [ $1 = status ]
then
        ps -e | grep kdeconnectd
fi


This was created on Kubuntu 18.04.

Named the script "kdeconnect", made executable with "chmod +x kdeconnect", and moved it into usr/sbin "sudo cp kdeconnect /usr/sbin", so to stop the service I now type.

Code: Select all
kdeconnect stop


Hope this helps someone out in the future.
zzz
Registered Member
Posts
1
Karma
0
thank you, this was easy to follow and the script really made it awesome


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]