You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
virt-manager needs dconf as runtime dependencie to store settings #52777
As the title states, virtmanager needs dconf. Otherwise, a lot of quirks appear, as virtmanager heavily relies on dconf to store settings (like default connection to libvirt, vmviewer specific things like autoresize and so on).
Steps to reproduce
run an window manager / desktop environment which does not provide dconf
start virtmanager
add a default connection
restart virtmanager, see how the connection disappeared
Technical details
system: "x86_64-linux"
host os: Linux 4.14.90, NixOS, 18.09.1799.b9fa31cea0e (Jellyfish)
I'm still not convinced. In some way, dconf for sure is a service. But, virtmanager is a program, not a service. And it does not fully work when it is missing the dconf-service executable (which besides acting as a service also is a plain executable). So, if one program (read executable) depends on another executable to fully work, whats wrong with just providing it (the other) as a runtime dependency?
The service will not start with this snippet. On the other hand, if you remove the postInstall section, it will start correctly. I am not really sure why the service is even registered in this case; the proper way to register a D-Bus service is though services.dbus.packages option.
Nix currently simply does not have any mechanism that would allow modifying the global system state when a package is installed. Actually, that would be a huge violation of purity.
As a side note, there is propagatedUserEnvPkgs hack that adds the listed dependencies to the profile the package is installed to, but that would only work when the package was added to the system profile (through environment.systemPackages), relying on the accidental service registration described above. In all other cases, the global service would still need to be registered manually.
$virt-manager
[...]
(virt-manager:28463): dconf-WARNING **: 02:35:33.888: failed to commit changes to dconf: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files
Your suggestion of using programs.dconf.enable = truedoes not work, adding dconf to the system environment does. I'm confused.
Activity
jtojnar commentedon Dec 25, 2018
Duplicate of #42433
See #42433 (comment)
wucke13 commentedon Dec 25, 2018
I'm still not convinced. In some way, dconf for sure is a service. But,
virtmanageris a program, not a service. And it does not fully work when it is missing thedconf-serviceexecutable (which besides acting as a service also is a plain executable). So, if one program (read executable) depends on another executable to fully work, whats wrong with just providing it (the other) as a runtime dependency?jtojnar commentedon Dec 25, 2018
The
dconf-serviceexecutable is not onPATH, though. It is launched by the D-Bus daemon.You can see it clearly in the following system configuration:
The service will not start with this snippet. On the other hand, if you remove the
postInstallsection, it will start correctly. I am not really sure why the service is even registered in this case; the proper way to register a D-Bus service is thoughservices.dbus.packagesoption.Nix currently simply does not have any mechanism that would allow modifying the global system state when a package is installed. Actually, that would be a huge violation of purity.
As a side note, there is
propagatedUserEnvPkgshack that adds the listed dependencies to the profile the package is installed to, but that would only work when the package was added to the system profile (throughenvironment.systemPackages), relying on the accidental service registration described above. In all other cases, the global service would still need to be registered manually.wucke13 commentedon Dec 25, 2018
That indeed is more convincing. Thanks for taking the time to clarify this!
jtojnar commentedon Dec 25, 2018
I would really like if we could specify
and dconf package would have
and then
nixos-rebuildwould warn the user when the global requirements are not met.wucke13 commentedon Dec 28, 2018
Please explain this:
Your suggestion of using
programs.dconf.enable = truedoes not work, adding dconf to the system environment does. I'm confused.jtojnar commentedon Dec 28, 2018
Do you have 88ae8f7? It is quite recent and might not have been backported.
wucke13 commentedon Jan 2, 2019
I guess you're right. Thanks again!