Re: [systemd-devel] [PATCH 00/10] Device Management for systemd-logind

2013-08-25 Thread Tom Gundersen
On Sun, Aug 25, 2013 at 8:46 PM, David Herrmann wrote: > logind itselfs takes care of revoking device access for inactive sessions > (synchronized with session-switches!). It also tries to resume every device > when a session is activated. But session-devices must not be used to watch > session st

Re: [PATCH wayland-web] building: Recommend disabling setuid for non-root installs

2013-08-25 Thread Bryce W. Harrington
On Sun, Aug 25, 2013 at 10:57:59AM +0300, Pekka Paalanen wrote: > On Fri, 23 Aug 2013 19:54:17 + > "Bryce W. Harrington" wrote: > > diff --git a/building.html b/building.html > > index b7a1158..a47744e 100644 > > --- a/building.html > > +++ b/building.html > > @@ -228,7 +228,7 @@ gio-2.0. > >

Re: [PATCH 10/10] logind: implement generic multi-session

2013-08-25 Thread David Herrmann
Hi On Sun, Aug 25, 2013 at 5:17 PM, Tom Gundersen wrote: > Hi David, > > On Sun, Aug 25, 2013 at 8:46 PM, David Herrmann wrote: >> One important note is that delayed session-switching is meant for >> backwards compatibility. New compositors or other sessions should really >> try to deal correctl

Re: [PATCH 10/10] logind: implement generic multi-session

2013-08-25 Thread Tom Gundersen
Hi David, On Sun, Aug 25, 2013 at 8:46 PM, David Herrmann wrote: > One important note is that delayed session-switching is meant for > backwards compatibility. New compositors or other sessions should really > try to deal correctly with forced session switches! They only need to > handle EACCES/E

Re: [RFC wayland] System compositor protocol

2013-08-25 Thread David Herrmann
Hi On Fri, Aug 23, 2013 at 11:55 PM, Jason Ekstrand wrote: > Hello All, > I am in the process of picking back up the old idea of system compositors. > I am not, at the moment, looking for a review of the code; simply a review > of the concept and the proposed protocol. If you would like to look

Re: [PATCH weston] Add a --shell option to override the default desktop-shell

2013-08-25 Thread Giulio Camuffo
Looks good and works good for me. 2013/8/23 Jason Ekstrand > Signed-off-by: Jason Ekstrand > --- > src/compositor.c | 12 ++-- > weston.ini | 3 ++- > 2 files changed, 12 insertions(+), 3 deletions(-) > > diff --git a/src/compositor.c b/src/compositor.c > index e9ba0fd..bb66fc7

Re: [PATCH wayland-web] building: Recommend disabling setuid for non-root installs

2013-08-25 Thread David Herrmann
Hi On Sun, Aug 25, 2013 at 9:57 AM, Pekka Paalanen wrote: > On Fri, 23 Aug 2013 19:54:17 + > "Bryce W. Harrington" wrote: > >> The build directions guide the user to build and install Wayland in a >> user directory without using superuser privs. However, the weston build >> process includes

[PATCH 10/10] logind: implement generic multi-session

2013-08-25 Thread David Herrmann
This enables the multi-session capability for seats that don't have VTs. For legacy seats with VTs, everything stays the same. However, all other seats now also get the multi-session capability. The only feature that was missing was session-switching. As logind can force a session-switch and signa

[PATCH 09/10] logind: extract has_vts() from can_multi_session()

2013-08-25 Thread David Herrmann
We currently use seat_can_multi_session() to test for two things: * whether the seat can handle session-switching * whether the seat has VTs As both are currently logically equivalent, we didn't care. However, we want to allow session-switching on seats without VTs, so split this helper into: *

[PATCH 08/10] logind: fix session_activate(vtnr = 0)

2013-08-25 Thread David Herrmann
VT numbers start with 1. If a session has vtnr == 0, we must not assume it is running on a VT. Note that this could trigger the assert() below as CreateSession() sets vtnr to 0, not <0. --- src/login/logind-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/login/log

[PATCH 07/10] logind: fix seat_can_tty() to check for VTs

2013-08-25 Thread David Herrmann
A seat provides text-logins if it has VTs. This is always limited to seat0 so the seat_is_seat0() check is correct. However, if VTs are disabled, no seat provides text-logins so we also need to check for the console-fd. This was previously: return seat_is_vtconsole(); It looked right, but was fu

[PATCH 06/10] logind: rename vtconsole to seat0

2013-08-25 Thread David Herrmann
The seat->vtconsole member always points to the default seat seat0. Even if VTs are disabled, it's used as default seat. Therefore, rename it to seat0 to correctly state what it is. This also changes the seat files in /run from IS_VTCONSOLE to IS_SEAT0. It wasn't used by any code, yet, so this see

[PATCH 05/10] logind: introduce session-devices

2013-08-25 Thread David Herrmann
A session-device is a device that is bound to a seat and used by a session-controller to run the session. This currently includes DRM, fbdev and evdev devices. A session-device can be created via RequestDevice() on the dbus API of the session. You can drop it via ReleaseDevice() again. Once the ses

[PATCH 04/10] logind: make Session.Activate() lazy

2013-08-25 Thread David Herrmann
Currently, Activate() calls chvt(), which does an ioctl(VT_ACTIVATE) and immediately calls seat_set_active(). However, VTs are allowed to prevent being deactivated. Therefore, logind cannot be sure the VT_ACTIVATE call was actually successful. Furthermore, compositors often need to clean up their

[PATCH 03/10] logind: add session controllers

2013-08-25 Thread David Herrmann
A session usually has only a single compositor or other application that controls graphics and input devices on it. To avoid multiple applications from hijacking each other's devices or even using the devices in parallel, we add session controllers. A session controller is an application that mana

[PATCH 02/10] logind: add infrastructure to watch busnames

2013-08-25 Thread David Herrmann
If we want to track bus-names to allow exclusive resource-access, we need a way to get notified when a bus-name is gone. We make logind watch for NameOwnerChanged dbus events and check whether the name is currently watched. If it is, we remove it from the watch-list (notification for other objects

[PATCH 01/10] logind: listen actively for session devices

2013-08-25 Thread David Herrmann
Session compositors need access to fbdev, DRM and evdev devices if they control a session. To make logind pass them to sessions, we need to listen for them actively. However, we avoid creating new seats for non master-of-seat devices. Only once a seat is created, we start remembering all other ses

[PATCH 00/10] Device Management for systemd-logind

2013-08-25 Thread David Herrmann
Hi This series implements device management for logind. A session can now request device access directly via logind dbus APIs. It extends the org.freedesktop.login1.Session interface. The already existing interface is described at: http://www.freedesktop.org/wiki/Software/systemd/logind/

[PATCH weston] input: add a motion signal to weston_pointer

2013-08-25 Thread Giulio Camuffo
The signal will be emitted after the pointer is moved. A shell plugin can listen to the signal and activate certain effects when the pointer touches the screen corners, for instance. --- src/compositor.h | 1 + src/input.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/compositor.

Re: [PATCH wayland-web] building: Recommend disabling setuid for non-root installs

2013-08-25 Thread Pekka Paalanen
On Fri, 23 Aug 2013 19:54:17 + "Bryce W. Harrington" wrote: > The build directions guide the user to build and install Wayland in a > user directory without using superuser privs. However, the weston build > process includes a `chown root` on weston-launcher done by default, > which results