emersion / xdg-desktop-portal-wlr

xdg-desktop-portal backend for wlroots
MIT License
591 stars 56 forks source link

Exit when the screen has not been shared for 10 minutes #188

Closed cljoly closed 2 years ago

cljoly commented 2 years ago

How would you feel about having xdg-desktop-portal-wlr exit when it has not been sharing the screen for a while, say 10 minutes?

I think this would bring the following benefits:

emersion commented 2 years ago

It's called exit-on-idle. It needs a lot of caution when implementing it, to avoid race conditions. See https://lists.freedesktop.org/archives/systemd-devel/2017-May/038890.html.

security: I currently have an indicator in my swaybar, to show that the daemon is running and that my screen might be being shared. If the daemon exited when it’s not used, the indicator would more reliable indicate that something unexpected is going on.

That's not a good way to do this. Instead, monitoring the PipeWire IPC should be a lot more robust.

cljoly commented 2 years ago

Ok, thanks for your answer.