[systemd-devel] Locking current session programmatically

Lennart Poettering lennart at poettering.net
Fri Jun 27 10:54:55 PDT 2014


On Fri, 27.06.14 17:45, Ivan Shapovalov (intelfx100 at gmail.com) wrote:

> I want to lock my current session using a command-line tool (or a D-Bus call).
> 
> The only apparent way to do this is `loginctl lock-session $XDG_SESSION_ID`.
> However, this results in an "Access denied" reply, which is somewhat strange
> (I expect to be able to lock my own session).
> 
> Is this by design or a bug? 

Neither. Just missing functionality. I added this to the TODO list now. 

> In either case, is it possible to lock the current
> session?

Well, not with logind, no. But you should be able to do it with GNOME's APIs.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list