Ubuntu 18.04 Tigervnc:创建颜色配置文件需要身份验证

the*_*viv 3 tightvncserver gnome-color-manager 18.04

尝试连接到在 Ubuntu 18.04 上运行的 Tigervnc 服务器(使用 TigerVNC 查看器 Windows 客户端)。在初始身份验证后,我收到一个额外的身份验证提示,内容为“创建颜色公关需要身份验证...”。这仅在tigervnc 服务器重启后的第一次登录时发生。无论如何我可以绕过这个吗?

小智 5

我通过创建此文件并将 perms 设置为 644 和所有者 root: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;
  }
});
Run Code Online (Sandbox Code Playgroud)

  • 你能解释一下你是如何想出这个的,它为什么起作用,或者你从哪里得到信息? (2认同)