试图连接到运行在Ubuntu18.04上的tigervnc服务器(使用TigerVNC查看器窗口客户端)。在最初的身份验证之后,我得到了一个额外的身份验证提示,它是“创建颜色pr.所需的身份验证”。这只发生在tigervnc服务器重新启动后的第一次登录。不管怎么说,我能绕开这个吗?
发布于 2018-07-02 03:03:54
我通过创建这个文件并将perms设置为644和owner :root来修复这个问题:
文件名: /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
内容:
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.color-manager.create-device" ||
action.id == "org.freedesktop.color-manager.create-profile" ||
action.id == "org.freedesktop.color-manager.delete-device" ||
action.id == "org.freedesktop.color-manager.delete-profile" ||
action.id == "org.freedesktop.color-manager.modify-device" ||
action.id == "org.freedesktop.color-manager.modify-profile"
) && (
subject.isInGroup("{nogroup}")
)
)
{
return polkit.Result.YES;
}
});发布于 2020-04-23 18:56:59
让我只从续集提取18.04的具体修补程序到这篇优秀的博客文章。后者深入分析了这个问题的根源;前者正确地修复了它--同时避免了已经在这里和其他地方发布的return polkit.Result.YES;解决方案造成的崩溃。
cat << EOF | sudo tee /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes
EOF这仅与PolKit < 0.106 (pkaction --version)相关。
对于PolKit 0.106+ (Ubuntu 18.10+),通过javascript .conf文件以不同的方式授予此授权:
cat << EOF | sudo tee /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.color-manager.create-device" ||
action.id == "org.freedesktop.color-manager.create-profile" ||
action.id == "org.freedesktop.color-manager.delete-device" ||
action.id == "org.freedesktop.color-manager.delete-profile" ||
action.id == "org.freedesktop.color-manager.modify-device" ||
action.id == "org.freedesktop.color-manager.modify-profile"
//-- no group restriction; allow any user to manipulate color profiles!
//-- uncomment and substitude adm with the group you need, if needed.
// ) && (
// subject.isInGroup("{adm}")
))
{
return polkit.Result.YES;
}
});
EOFhttps://askubuntu.com/questions/1033390
复制相似问题