[PATCH weston] introduces a setting to give permission to any client to do screenshots

Giulio Camuffo giuliocamuffo at gmail.com
Tue Dec 17 02:38:58 PST 2013


2013/12/17 Bill Spitzak <spitzak at gmail.com>:
>
>
> Giulio Camuffo wrote:
>>
>> 2013/12/16 Bill Spitzak <spitzak at gmail.com>:
>>>
>>> Could an api be added so that one client can "give" access to an object
>>> to
>>> another client? This would allow a single secure client to implement all
>>> the
>>> rules for what is allowed to be a screen saver, rather than having the
>>> rules
>>> be in the compositor.
>>
>>
>> Yeah, it's possible. See http://git.io/Inq5zA and http://git.io/T0TEdg
>
>
> I'm not sure what that is doing but it seems to be a communication between
> the server and client, not between two clients.

That's what Wayland is about. Unlike in X11, all messages are between
the server and one client.

>
>
>>> I also think this api would be useful so that a parent client can create
>>> a
>>> subsurface and then pass it to a child executable to draw into. This
>>> appears
>>> a lot simpler than the proposed mechanism where the child creates the
>>> subsurface.
>>
>>
>> I don't see how they relate. That would require sending an object to
>> another client.
>
>
> No, I meant between two clients in both cases.
>
> For the screen shooter, I saw the compositor giving access to the screen
> shooter object to a single trusted client #1, then this client figures out
> that another client #2 is allowed to be a screen shooter and can give the
> screen shooter object to it. Ie it is moved from client 1 to client 2. This
> is done by client 1 sending client 2 the "key" which allows client 2 to get
> an id from the server that it can send messages to for that object.

You can't talk to another client directly, you must always pass
through the server (unless you use dbus or some other ipc, of course).
And you don't need to give the trusted client a key, you just need to
tell the server some client is trusted, using the same mechanism
weston uses internally to launch trusted clients. That's what the
links I posted are doing.

>
> For the subsurface, client 1 creates the subsurface. It then execs client 2
> and gives it the object so that client 2 can draw into it.

Client 1 can't give the object to client 2. It could instead ask the
server to give some object to client 2.


More information about the wayland-devel mailing list