为什么我在安装 vnc 并添加 polkit 后无法添加用户?如果我删除 polkit,我可以从控制台添加用户,但 rdp 不起作用。请帮忙。
这是捕获的内容:
我正在使用 ubuntu 18.04、mate 桌面、来自 Windows 的 vnc 服务器 RDP
这是我的 polkit:
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.dele
te-profile” || action.id == “org.freedesktop.color-manager.modify-device” || act
ion.id == “org.freedesktop.color-manager.modify-profile”) && subject.isInGroup(“
sudo”))
{
return polkit.Result.YES;
}
});
谢谢
@roaima你的意思是这样?感谢您的回复
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("{sudo}")) { return polkit.Result.YES; } });