On some distributions, users may be presented with Polkit authentication dialogues when starting a ThinLinc session. While harmless, these can be annoying, and confusing for users who don’t know what they mean.
One common example is color-manager
, which may display a dialogue such as this:
We can tell Polkit not to display these dialogues and skip authentication altogether for remote users, by creating a rules file. One example of a rules file for suppressing color-manager
authentication dialogues might look like this:
polkit.addRule(function(action, subject) {
if (action.id.startsWith('org.freedesktop.color-manager.')) {
if (!subject.local) {
return polkit.Result.NO;
}
}
});
This can be placed in a file at /etc/polkit-1/rules.d/02-allow-colord.rules
, which should be readable by the polkitd
user.
NOTE: Polkit versions <0.106 use a different syntax for rules, in .pkla
files. However, most distributions still using such versions are either unsupported or do not work with ThinLinc. It is recommended to use the .rules
file syntax, but you should ensure that this is supported by your version of Polkit first.
Other dialogues and desktop user actions can be controlled in the same way. If you have any Polkit rules that you use to improve end user experience in ThinLinc, please feel free to post them below.