Re: [systemd-devel] Locking current session programmatically

2014-06-29 Thread Kirill Elagin
If you don't have a DE you don't have a session manager either, so
systemd-logind can't help you anyway.
Indeed, you should just run your screenlocker.


--
Кирилл Елагин


On Sun, Jun 29, 2014 at 9:57 AM, Ivan Shapovalov intelfx...@gmail.com
wrote:

  27 июня 2014 г., в 21:54, Lennart Poettering lenn...@poettering.net
 написал(а):
 
  On Fri, 27.06.14 17:45, Ivan Shapovalov (intelfx...@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

 I've got a DE-less setup (a freestanding window manager). Should I just
 invoke whatever tool I use for screenlocking (i3lock in my case)?

 --
 Ivan Shapovalov / intelfx /

 (Sent from a phone. Havoc may be wreaked on the formatting.)
 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Locking current session programmatically

2014-06-29 Thread Mantas Mikulėnas
A session manager is *not necessary* for this; the screensaver or
screenlocker itself could easily listen to the relevant DBus signals (e.g.
cinnamon-screensaver does this). See also: xss-lock, systemd-lock-handler.

-- 
Mantas Mikulėnas graw...@gmail.com
// sent from phone
On Jun 29, 2014 1:02 PM, Kirill Elagin kirela...@gmail.com wrote:

 If you don't have a DE you don't have a session manager either, so
 systemd-logind can't help you anyway.
 Indeed, you should just run your screenlocker.


 --
 Кирилл Елагин


 On Sun, Jun 29, 2014 at 9:57 AM, Ivan Shapovalov intelfx...@gmail.com
 wrote:

  27 июня 2014 г., в 21:54, Lennart Poettering lenn...@poettering.net
 написал(а):
 
  On Fri, 27.06.14 17:45, Ivan Shapovalov (intelfx...@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

 I've got a DE-less setup (a freestanding window manager). Should I just
 invoke whatever tool I use for screenlocking (i3lock in my case)?

 --
 Ivan Shapovalov / intelfx /

 (Sent from a phone. Havoc may be wreaked on the formatting.)
 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel



 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Locking current session programmatically

2014-06-29 Thread Kirill Elagin
Right, sorry, I was probably thinking about something different.

Speaking about marking `.Lock` non-privileged, I'd like to point out that
there is also `.Unlock` and so, by making one of them non-privileged and
the other one privileged, we kind of introduce asymmetry.
On the other hand, making `.Unlock` non-privileged may be seen as a
security issue, at least the KDE guys think that. I've already tried to
start a discussion about `Lock/Unlock` used by users here:
http://lists.freedesktop.org/archives/systemd-devel/2014-April/018410.html.


--
Кирилл Елагин


On Sun, Jun 29, 2014 at 2:04 PM, Mantas Mikulėnas graw...@gmail.com wrote:

 A session manager is *not necessary* for this; the screensaver or
 screenlocker itself could easily listen to the relevant DBus signals (e.g.
 cinnamon-screensaver does this). See also: xss-lock, systemd-lock-handler.

 --
 Mantas Mikulėnas graw...@gmail.com
 // sent from phone
 On Jun 29, 2014 1:02 PM, Kirill Elagin kirela...@gmail.com wrote:

 If you don't have a DE you don't have a session manager either, so
 systemd-logind can't help you anyway.
 Indeed, you should just run your screenlocker.


 --
 Кирилл Елагин


 On Sun, Jun 29, 2014 at 9:57 AM, Ivan Shapovalov intelfx...@gmail.com
 wrote:

  27 июня 2014 г., в 21:54, Lennart Poettering lenn...@poettering.net
 написал(а):
 
  On Fri, 27.06.14 17:45, Ivan Shapovalov (intelfx...@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

 I've got a DE-less setup (a freestanding window manager). Should I just
 invoke whatever tool I use for screenlocking (i3lock in my case)?

 --
 Ivan Shapovalov / intelfx /

 (Sent from a phone. Havoc may be wreaked on the formatting.)
 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel



 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Locking current session programmatically

2014-06-28 Thread Ivan Shapovalov
 27 июня 2014 г., в 21:54, Lennart Poettering lenn...@poettering.net 
 написал(а):
 
 On Fri, 27.06.14 17:45, Ivan Shapovalov (intelfx...@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

I've got a DE-less setup (a freestanding window manager). Should I just invoke 
whatever tool I use for screenlocking (i3lock in my case)?

--
Ivan Shapovalov / intelfx /

(Sent from a phone. Havoc may be wreaked on the formatting.)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Locking current session programmatically

2014-06-27 Thread Ivan Shapovalov
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? In either case, is it possible to lock the current
session?

-- 
Ivan Shapovalov / intelfx /

signature.asc
Description: This is a digitally signed message part.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Locking current session programmatically

2014-06-27 Thread Jan Alexander Steffens
Am 27.06.2014 15:45 schrieb Ivan Shapovalov intelfx...@gmail.com:

 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? In either case, is it possible to lock the
current
 session?

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.

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.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Locking current session programmatically

2014-06-27 Thread Lennart Poettering
On Fri, 27.06.14 17:45, Ivan Shapovalov (intelfx...@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
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel