I'm trying to run Rygel, a UPNP media server, on a headless Fedora 20 system. I installed Rygel, and created a dedicated user and systemd unit for it. Rygel starts but it is not listening on the port I asked it to. I think this is because it fails to get a list of network interfaces from NetworkManager. How can I give it permission to talk to NetworkManager over DBUS? NOTE: Both NetworkManager and dbus-daemon are confirmed running.Output from starting Rygel:Feb 02 19:13:08 inspiron systemd[1]: Starting Rygel DLNA server...Feb 02 19:13:08 inspiron systemd[1]: Started Rygel DLNA server.Feb 02 19:13:09 inspiron rygel[2276]: Rygel-Message: rygel-main.vala:87: Rygel v0.20.3 startingFeb 02 19:13:09 inspiron dbus-daemon[465]: dbus[465]: [system] Rejected send message, 3 matched rules; type=method_call, sender=:1.95 (uid=1001 pid=2276 comm=/usr/bin/rygel -c /etc/rygel.conf ) interface=org.freedesktop.NetworkManager member=GetDevices error name=(unset) requested_reply=0 destination=:1.12 (uid=0 pid=566 comm=/usr/sbin/NetworkManager --no-daemon )Feb 02 19:13:09 inspiron dbus[465]: [system] Rejected send message, 3 matched rules; type=method_call, sender=:1.95 (uid=1001 pid=2276 comm=/usr/bin/rygel -c /etc/rygel.conf ) interface=org.freedesktop.NetworkManager member=GetDevices error name=(unset) requested_reply=0 destination=:1.12 (uid=0 pid=566 comm=/usr/sbin/NetworkManager --no-daemon )Feb 02 19:13:09 inspiron rygel[2276]: ** (rygel:2276): WARNING **: Error fetching list of devices: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 3 matched rules; type=method_call, sender=:1.95 (uid=1001 pid=2276 comm=/usr/bin/rygel -c /etc/rygel.conf ) interface=org.freedesktop.NetworkManager member=GetDevices error name=(unset) requested_reply=0 destination=:1.12 (uid=0 pid=566 comm=/usr/sbin/NetworkManager --no-daemon )Feb 02 19:13:09 inspiron rygel[2276]: Rygel-Message: New plugin 'MediaExport' availableMy Rygel systemd configuration:[Unit]Description=Rygel DLNA serverAfter=syslog.target[Service]User=rygelGroup=rygelExecStart=/usr/bin/rygel -c /etc/rygel.conf[Install]WantedBy=multi-user.targetMy (slightly redacted) rygel configuration:[general]upnp-enabled=truevideo-upload-folder=@VIDEOS@music-upload-folder=@MUSIC@picture-upload-folder=@PICTURES@media-engine=librygel-media-engine-gst.sointerface=192.0.2.100port=49152log-level=*:5allow-upload=falseallow-deletion=false[GstMediaEngine]transcoders=mp3;lpcm;mp2ts;wmv;aac;avc[Renderer]image-timeout = 15[MediaExport]enabled=truetitle=@REALNAME@'s mediauris=/path/to/mediaextract-metadata=truemonitor-changes=truevirtual-folders=true[Tracker]enabled=false[Playbin]enabled=false[ZDFMediathek]enabled=false[GstLaunch]enabled=false[Test]enabled=false[ExampleServerPluginVala]enabled=false[ExampleServerPluginC]enabled=false[ExampleRendererPluginVala]enabled=false[ExampleRendererPluginC]enabled=false[MPRIS]enabled=false[External]enabled=fals
Allow Rygel to talk to NetworkManager over DBUS?
networkmanager;d bus;upnp
The problem is that the particular NetworkManager dbus methods used by Rygel require at_console authorization. This, apparently outdated, attribute predates polkit and is set via several pam modules during login and inherited by all child processes. Since systemd is unable to set this attribute and Rygel is started as a system (non-console) user, it is denied access to the requisite NetworkManager dbus methods.The good news is that fedora is coordinating the removal of the at_console dbus policy across various packages. The policy file provided in NetworkManager 0.9.9.1 works perfectly with the setup you describe. If you can't update, replace /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf (might depend on distro) with upstream org.freedesktop.NetworkManager.conf.