How to start listening incoming SMS on Linux via KDEConnect

59 Views Asked by At

I'm using KDEConnect to send and receive SMS through my Android phone.

KDE Connect only supports sending SMS via command line, but does also support receiving SMS through KDE Connect SMS (the GUI application). Since I needed to receive SMS within my script, I just listened to dbus (via dbus-monitor | grep 'my expected start').At this point I am able to receive the SMS and my script works just fine.

However, when I disconnect and reconnect KDE Connect and then try to run my script; sending SMS works but dbus-monitor is unable to receive the incoming SMSs. If I start KDE Connect SMS and click on the recipient, it waits a bit and then loads the SMSs from that recipient. Then I'm free to close the GUI application. My script works after that point.

I assume the GUI application performs some dbus registration somehow. How can do the same manually within my script? What should I need to examine first?

0

There are 0 best solutions below