Re: [SailfishDevel] monitor systemd unit from qml

2016-01-28 Thread Tone Kastlunger
Remember, one does not simply state that "stuff works" when handling DBus ;) On Thu, Jan 28, 2016 at 2:12 PM, Michael Fuchs wrote: > Ok, thanks. dbus-monitor is a good idea. > > I already found another solution via the api of the service, so its not > that critical. But it would be more elegant

Re: [SailfishDevel] monitor systemd unit from qml

2016-01-28 Thread Michael Fuchs
Ok, thanks. dbus-monitor is a good idea. I already found another solution via the api of the service, so its not that critical. But it would be more elegant to just use qml. I'm already using a dbus signal to get the status of the wifi connection. So basically caching signals from dbus works.

Re: [SailfishDevel] monitor systemd unit from qml

2016-01-28 Thread Tone Kastlunger
OFC one option is to get your service to send a DBus signal once it's up. But that makes systemd irrelevant. dbus-monitor is your friend; put it to run and start the service, grep the output to understand what's going on (which signals are emitted in particular). Then once you are sure the signal

Re: [SailfishDevel] monitor systemd unit from qml

2016-01-28 Thread Michael Fuchs
No, didn't help either. https://gist.github.com/fuchsmich/354af082fbc4577a4bf5 But thanks anyway. Am 27.01.2016 um 22:07 schrieb Ove Kåven: Den 27. jan. 2016 17:03, skrev Michael Fuchs: There is a signal "PropertiesChanged" defined but it doesn't get emitted, when I start or stop the service.

Re: [SailfishDevel] monitor systemd unit from qml

2016-01-27 Thread Ove Kåven
Den 27. jan. 2016 17:03, skrev Michael Fuchs: There is a signal "PropertiesChanged" defined but it doesn't get emitted, when I start or stop the service. http://www.freedesktop.org/wiki/Software/systemd/dbus/ You could see whether calling "Subscribe()" enables these signals for you. _

Re: [SailfishDevel] monitor systemd unit from qml

2016-01-27 Thread Michael Fuchs
I would just like to know about the state of the service. Is it running or not? My app has a start/stop button for the service, which already works. But it would be nice to know about the state of the service, when the app is starting up. Am 27.01.2016 um 17:19 schrieb r0kk3rz: For what purpo

Re: [SailfishDevel] monitor systemd unit from qml

2016-01-27 Thread Michael Fuchs
6 22:23:33 Тема: Re: [SailfishDevel] monitor systemd unit from qml I would just like to know about the state of the service. Is it running or not? My app has a start/stop button for the service, which already works. But it would be nice to know about the state of the service, when the app is s

Re: [SailfishDevel] monitor systemd unit from qml

2016-01-27 Thread Andrey Kozhevnikov
your own service? -- Исходное сообщение -- От: "Michael Fuchs" Кому: "Sailfish OS Developers" Отправлено: 27.01.2016 22:23:33 Тема: Re: [SailfishDevel] monitor systemd unit from qml I would just like to know about the state of the service. Is it running or not

Re: [SailfishDevel] monitor systemd unit from qml

2016-01-27 Thread r0kk3rz
For what purpose? systemd takes care of monitoring services for you. You can however define various actions which you can hook into on service start/stop/fail .etc http://www.freedesktop.org/software/systemd/man/systemd.service.html On Wed, Jan 27, 2016 at 4:03 PM, Michael Fuchs wrote: > Hi, >

Re: [SailfishDevel] monitor systemd unit from qml

2016-01-27 Thread Andrey Kozhevnikov
https://github.com/CODeRUS/jolla-settings-aliendalvik-button/blob/master/settings/mainpage.qml -- Исходное сообщение -- От: "Michael Fuchs" Кому: "Andrey Kozhevnikov" ; "Sailfish OS Developers" Отправлено: 27.01.2016 22:14:29 Тема: Re: [SailfishDevel]

Re: [SailfishDevel] monitor systemd unit from qml

2016-01-27 Thread Michael Fuchs
ess. afaik you can't watch for state changes of any services. if i'm wrong i would be interested in solution also :) -- Исходное сообщение -- От: "Michael Fuchs" Кому: "Sailfish OS Developers" Отправлено: 27.01.2016 22:03:23 Тема: [SailfishDevel] monitor s

Re: [SailfishDevel] monitor systemd unit from qml

2016-01-27 Thread Andrey Kozhevnikov
тправлено: 27.01.2016 22:03:23 Тема: [SailfishDevel] monitor systemd unit from qml Hi, I would need some help, please. I'm trying to monitor a systemd service unit via dbus from qml. There is a signal "PropertiesChanged" defined but it doesn't get emitted, when I start or

[SailfishDevel] monitor systemd unit from qml

2016-01-27 Thread Michael Fuchs
Hi, I would need some help, please. I'm trying to monitor a systemd service unit via dbus from qml. There is a signal "PropertiesChanged" defined but it doesn't get emitted, when I start or stop the service. Code: https://gist.github.com/fuchsmich/354af082fbc4577a4bf5 The GetAll method work