<div dir="ltr">Ian,<div><br></div><div>Ok with your patch applied and those debug messages added I do see Requested klauncher to start, but I don't ever see KLauncher replied OK. I do after a bit see "Communication error with launcher, Exiting! as before. If I find some time today I'll dig into why this is happening, we'll see.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 6, 2015 at 3:54 AM, Ian Wadham <span dir="ltr"><<a href="mailto:iandw.au@gmail.com" target="_blank">iandw.au@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jeremy and David,<br>
<div><div class="h5"><br>
On 06/02/2015, at 2:26 AM, David Faure wrote:<br>
> On Thursday 05 February 2015 06:23:32 Jeremy Whiting wrote:<br>
>> Ian,<br>
>><br>
>> I've applied this patch here to kinit framework and built it. I then tried<br>
>> launching kdeinit5.app by running<br>
>> /Applications/KDE/kdeinit5.app/Contents/MacOS/kdeinit5 klauncher which<br>
>> seemed to run ok and didn't complain about not being able to communicate<br>
>> with klauncher. I then started kanagram to check if the ghns would work now<br>
>> that klauncher is running, but it complained (kio complained I guess) about<br>
>> not being able to start klauncher5. I think I'm not testing this correctly<br>
>> in other words.<br>
>><br>
>> David,<br>
>><br>
>> Which applications/daemons should I be starting manually, and which should<br>
>> be launched from code (kio or other code) via their dbus .service files or<br>
>> whatnot? Should I run kded itself, should I run kdeinit5 klauncher to get<br>
>> that started, or just kdeinit5 itself with no arguments? Do I need to use<br>
>> kdeinit5 to launch anything besides klauncher ?<br>
><br>
> The usual way is: just run kdeinit5 without arguments.<br>
> (after ensuring you have a DBus session)<br>
<br>
</div></div>Yes, klauncher5 is started by kdeinit5 by default --- but kded5 is not. Both are<br>
started by default in kdeinit4 (in Linux at least). In kdeinit5 you can request for<br>
kded5 to be started by using the --kded option as an argument.<br>
<br>
Trying to run GHNS (which runs in kded5, I think Jeremy said) is a kind<br>
of end-to-end test. I am only looking at getting the various processes<br>
running on OSX by proceeding one step at a time. Because of the<br>
blocker, I believe "kdeinit5 --kded" will fail to start kded5 on OSX.<br>
<br>
To detect the blocker after starting klauncher in kdeinit5 on OSX, you need<br>
code in kinit.cpp like (N.B. "fprintf(stderr," is used for logging in kinit.cpp):<br>
<br>
if (launch_klauncher) {<br>
start_klauncher();<br>
fprintf(stderr, "Requested klauncher to start\n");<br>
<span class=""> handle_requests(d.launcher_pid); // Wait for klauncher to be ready<br>
</span> fprintf(stderr, "KLauncher replied OK\n");<br>
}<br>
<br>
If you do *not* have my patch in klauncher.cpp, I think you will never see<br>
"KLauncher replied OK" on OSX, because KLauncher will not have a socket<br>
on which to reply, so kdeinit5 will be blocked and will then never get to the<br>
bit of code where it starts kded5, even if you run "kdeinit5 --kded".<br>
<br>
If my patch *is* in klauncher.cpp, it is intended that there will be enough<br>
socket code for KLauncher to get a reply back to kdeinit5, but no more than<br>
that. All other process launches go via QProcess in klauncher5 on OSX, as<br>
far as I can see. Ditto in Windows.<br>
<br>
@David: I realised that klauncher5 would not be sending *requests* to<br>
kdeinit5 on OSX, but thanks for the tip about Windows. Its version of kinit<br>
code (kinit_win.cpp) is quite different and uses no socket apparently.<br>
<br>
Another blocker I found in kdeinit4 last year was when waiting to hear back<br>
from kded4. Kded4 never replied in OSX (I tested that), and perhaps not in<br>
Linux (I could not tell for sure when reading the kded code).<br>
<br>
But I see, in the latest code, that kdeinit5 does not wait for kded5 any more,<br>
so no blocker there.<br>
<br>
So, Jeremy, if you put my patch in klauncher.cpp, "kdeinit5 --kded" should start<br>
both klauncher5 and kded5 on Apple OS X. If you do not want klauncher5 as<br>
well, try "kdeinit5 --kded --no-klauncher". It is also a good idea to do a "before<br>
patch" test, with a log message to ensure that start-klauncher() *is* being called<br>
and there *is* a blockage in kdeinit5 on OSX.<br>
<br>
Please let us know your results.<br>
<br>
Cheers, Ian W.<br>
<br>
</blockquote></div><br></div>