I've been thinking about exactly this issue. As for supporting PolicyKit in the upstream release, we ought to be able to get away with dlopening libpolkit-dbus.so.2 at runtime and using the helpers from that if they exist. I've got a prototype that I threw together that I'll try to clean up and attach at some point. However, I'm no PolicyKit guru so I don't know if the approach I took is the right one.
Alberto, do you know if there's a standard PolicyKit action for writing the X config? If not, I could just add com.nvidia.settings.write-x-configuration and have the .policy file be part of the nvidia-settings package. There's a org.freedesktop.systemtoolsbackends.set ("Manage system configuration"), but that seems overly vague.
I've been thinking about exactly this issue. As for supporting PolicyKit in the upstream release, we ought to be able to get away with dlopening libpolkit-dbus.so.2 at runtime and using the helpers from that if they exist. I've got a prototype that I threw together that I'll try to clean up and attach at some point. However, I'm no PolicyKit guru so I don't know if the approach I took is the right one.
Alberto, do you know if there's a standard PolicyKit action for writing the X config? If not, I could just add com.nvidia. settings. write-x- configuration and have the .policy file be part of the nvidia-settings package. There's a org.freedesktop .systemtoolsbac kends.set ("Manage system configuration"), but that seems overly vague.