<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/118804/">https://git.reviewboard.kde.org/r/118804/</a>
     </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Plasma.</div>
<div>By Elias Probst.</div>








<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://bugs.kde.org/show_bug.cgi?id=335390">335390</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-workspace
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is an initial (not yet working) attempt to fix bug#335390.

Right now, it seems not to call the TakeControl() D-Bus message as it doesn't show up in systemd-logind's debug output at all:

Jun 17 21:20:05 moria systemd-logind[2550]: Got message type=signal sender=org.freedesktop.DBus destination=n/a object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameOwnerChanged cookie=18 reply_cookie=0 error=n/a
Jun 17 21:20:05 moria systemd-logind[2550]: Got message type=method_call sender=:1.141 destination=org.freedesktop.login1 object=/org/freedesktop/login1 interface=org.freedesktop.login1.Manager member=GetSessionByPID cookie=4 reply_cookie=0 error=n/a
Jun 17 21:20:05 moria systemd-logind[2550]: Sent message type=error sender=n/a destination=:1.141 object=n/a interface=n/a member=n/a cookie=343 reply_cookie=4 error=PID 4296 does not belong to any known session
Jun 17 21:20:05 moria systemd-logind[2550]: Failed to process message [type=method_call sender=:1.141 path=/org/freedesktop/login1 interface=org.freedesktop.login1.Manager member=GetSessionByPID signature=u]: PID 4296 does not belong to any known session

The GetSessionByPID() call after this shows up just fine, but the TakeControl() attempt is not even logged.
Is there something completely wrong the way I do it?</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">- Copy /usr/lib/systemd/system/systemd-logind.service to /etc/systemd/system/systemd-logind.service
- Set "Environment=SYSTEMD_LOG_LEVEL=debug" in the [Service] section of /etc/systemd/system/systemd-logind.service
- Run "systemctl daemon-reload"
- Reboot (also possible without a reboot, but far more complicated and requires to terminate the X session anyways, so a reboot is the most straightforward solution)

To test
- apply patch + rebuild plasma-workspace
- kill ksmserver
- Run "journalctl -n 20 -f -u systemd-logind" to monitor logind
- Run "tail -f ~/.xsession-errors" or "journalctl --user -n 20 -f --user-unit ksmserver" (for systemd user-session users) to monitor ksmserver's output
- restart ksmserver

</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>ksmserver/screenlocker/logind.cpp <span style="color: grey">(dcfc7f321b3cf29ef68aac8006aa37f5e4e00956)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/118804/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>