<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
hello, i have a proposal for this<br>
first time using a mailing list so i hope i do it right-ish<br>
<br>
<br>
protocol for screenshots:<br>
<br>
client -> server: "can i get a screenshot ?"<br>
server -> client: "sure, here it is" / "no"<br>
server would send the screenshot via memfd or write() or something.<br>
something like [type/format][length][data] (bit more futureproof then that, though)<br>
<br>
for hotkeys:<br>
client -> server: "can i get all alt+F5 events ?"<br>
server -> client: "sure, i'l send them to you" / "no"<br>
<br>
for streaming, i don't know how exactly does it work under wayland.<br>
if a compositor can close the stream, then there is no problem<br>
<br>
i suggest the transport layer to be UDS for 3 reasons<br>
1. if the file is not in the predetermined place (example /run/wayland-ext/$COMPOSITOR_PID) then the compositor obviously doesn't support the extensions<br>
(while at it, this doesn't have to be wayland exclusive)<br>
2. the compositor can check the PID of the client<br>
3. the compositor can send fds<br>
<br>
<br>
rationales:<br>
the list of supported features does not have to be gotten as the compositor saying "no" means "no", for whatever reason.<br>
ofc the "what do you support" should be part of the protocol anyway<br>
(the "no" can also be "NO_PRIVILEDGE" or "IDK_WHAT_YOU_ARE_TALKING_ABOUT")<br>
<br>
it being UDS the compositor can get the PID, UID and GID of the client.<br>
the compositor can then verify the client by looking at its /proc/$PID/exe.<br>
<br>
this minimizes the whole priviledges thing in the protocol and lets the compositor writers choose how they will implement it.<br>
examples:<br>
a compositor that always does/allows what it can.<br>
a compositor that asks the user then (optionally) remembers the answer<br>
a compositor that asks some priviledges daemon "can this process do this?"<br>
<br>
i would suggest that the compositor makes a list in human readable format in a file that only the "wayland_compositor" GID can read or write to.<br>
something like:<br>
$EXE_FROM_PROC $UID $GID PERMISSION1 PERMISSION2 etc..<br>
<br>
<br>
<p>Ladislav Igrec</p>
<p>"hope-ing he is making sense"</p>
</div>
</body>
</html>