<p dir="ltr"><br>
Am 27.06.2014 15:45 schrieb "Ivan Shapovalov" <<a href="mailto:intelfx100@gmail.com">intelfx100@gmail.com</a>>:<br>
><br>
> I want to lock my current session using a command-line tool (or a D-Bus call).<br>
><br>
> The only apparent way to do this is `loginctl lock-session $XDG_SESSION_ID`.<br>
> However, this results in an "Access denied" reply, which is somewhat strange<br>
> (I expect to be able to lock my own session).<br>
><br>
> Is this by design or a bug? In either case, is it possible to lock the current<br>
> session?</p>
<p dir="ltr">As I understand logind doesn't keep any lock state. It just sends out Lock or Unlock signals for sessions when certain things happen, such as a session switch or forcing those signals to be sent using loginctl.</p>

<p dir="ltr">I guess nobody saw any value in letting a user lock their own sessions this way, so the methods are privileged. The screen locking applications (such as gnome-shell) already provide means to lock the session.</p>