Figure out how to make "privileged" settings dialogs work

Some settings dialogs require privileged information in order to work, information that's not provided by any exiting Wayland protocols.

For example, Mouse and Touchpad Settings needs to be able to enumerate all pointer devices, and for each device, get a list of supported options. On X11, XInput provides this, but on Wayland, there is no analogue.

One option is to write a custom protocol that allows a client to get this information. We could make this unprivileged if we wanted to; since xfconf settings aren't locked down, a malicious app could go in and mess with any existing settings, so the risk of any worse damage would be smaller. And we could restrict access so this protocol wouldn't be available to sandboxed apps.

If we did want to make this custom protocol privileged, we could set it up so that running e.g. xfce4-mouse-settings just sends a DBus message to the compositor "hey, run mouse settings", and the compositor could then exec the dialog process with some special environment or command line params or an FD that gives it access to the privileged protocol. This is still somewhat difficult to do, though, as you still rely on a named executable. You could say that it must be in a root-only-writable location, or in the compositor's prefix. But then development of these components becomes significantly more annoying.

I'm struggling to come up with other ideas, unfortunately. Putting the dialog in the compositor's process and giving it direct access to the information it needs just doesn't feel right.

Edited by Brian Tarricone