Polkit tigervnc Unregistered Authentication Agent configuraiton

fedora

The system is Fedora 24. The error occurred as the result of an upgrade from fc23. The vncserver@:service package has been edited to reflect the user configuration. The command systemctl restart vncserver@\:2.service results in an error exit. journalctl -xe shows:

Unregistered Authentication Agent for unix-process

This appears to show up as a polkit configuration issue. Is this a polkit issue? Is there a polkit configuration document showing how to configure polkit to support vnc?

Best Answer

use the next config of service:

[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target

[Service]
Type=simple
User=<USER>
PAMName=login
WorkingDirectory=/home/<USER>

ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1600x900 -localhost no -fg -cleanstale -PlainUsers * :%i
ExecStop=/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target

PAMName - is neccessary line to work properly with polkit!