Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grisbi: preferences are never saved #73880

Closed
datafoo opened this issue Nov 21, 2019 · 7 comments
Closed

grisbi: preferences are never saved #73880

datafoo opened this issue Nov 21, 2019 · 7 comments
Labels
0.kind: question Requests for a specific question to be answered

Comments

@datafoo
Copy link
Contributor

datafoo commented Nov 21, 2019

Describe the bug

Every time I start Grisbi, it welcomes me with:

This is the first time you use Grisbi, this assistant will guide you through the configuration process. You can change any option later in the configuration window, where many other options are available.

It seems that my settings are not saved anywhere.

When I launch grisbi from a terminal, I get some errors:

$ grisbi

(grisbi:1830): dconf-WARNING **: 22:02:21.334: 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

(grisbi:1830): dconf-WARNING **: 22:02:21.335: 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

(grisbi:1830): dconf-WARNING **: 22:02:24.369: 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

(grisbi:1830): dconf-WARNING **: 22:02:24.370: 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

To Reproduce

Install Grisbi

$ nix-env -i grisbi

Launch Grisbi, change any settings in Edit > Preferences and close the application.

Launch again and you are greeting with the first use message.

Expected behavior

Settings should be saved and the first time use greeting should only appear on first time use.

Metadata

$ nix run nixpkgs.nix-info -c nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.84, NixOS, 19.09.1300.08e503bac6d (Loris)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3`
 - channels(superman): `"home-manager-19.09"`
 - channels(root): `"nixos-19.09.1300.08e503bac6d"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@datafoo datafoo added the 0.kind: bug Something is broken label Nov 21, 2019
@datafoo
Copy link
Contributor Author

datafoo commented Nov 21, 2019

@layus @r-ryantm @marzipankaiser Have you experienced the same issue?

@jtojnar
Copy link
Member

jtojnar commented Nov 22, 2019

You need to have dconf D-Bus service registered. You can do that using programs.dconf.enable NixOS option to true.

@jtojnar jtojnar added 0.kind: question Requests for a specific question to be answered and removed 0.kind: bug Something is broken labels Nov 22, 2019
@marzipankaiser
Copy link
Contributor

marzipankaiser commented Nov 22, 2019

Had the same problem, was fixed for me with DConf as noted in @jtojnar's comment.

@datafoo
Copy link
Contributor Author

datafoo commented Nov 22, 2019

@jtojnar @marzipankaiser That works, thank you!

I am not so familiar with NixOS yet but I was under the impression that a package should include all its required dependencies. If grisbi needs dconf, why isn't included in the grisbi nix expression? Does that make sense?

@layus
Copy link
Member

layus commented Nov 22, 2019

Well, grisbi comes with the dconf adapter, able to talk with the system daemon. But you need this daemon running. A bit like an X server in a sense. grisbi comes with the X client things, but expects an X server to be already running. If you try to run grisbi from a tty, it will fail with a message about the missing X server, much like it did fail here with the missing dconf daemon (with a cryptic message I admit).

We could create a nixos option like programs.grisbi.enable that would install grisbi and ensure that dconf is running, but that seems a bit overkill.

@datafoo
Copy link
Contributor Author

datafoo commented Nov 22, 2019

Well, grisbi comes with the dconf adapter, able to talk with the system daemon. But you need this daemon running. A bit like an X server in a sense. grisbi comes with the X client things, but expects an X server to be already running. If you try to run grisbi from a tty, it will fail with a message about the missing X server, much like it did fail here with the missing dconf daemon (with a cryptic message I admit).

We could create a nixos option like programs.grisbi.enable that would install grisbi and ensure that dconf is running, but that seems a bit overkill.

That makes sense, thank you all.

@datafoo datafoo closed this as completed Nov 22, 2019
@jtojnar
Copy link
Member

jtojnar commented Nov 22, 2019

Generally, Nix packages try to be self-contained but there are some runtime dependencies that would not be easy to include into the package, or it would be grossly inefficient. In this case grisbi depends on a D-Bus daemon with dconf service registered.

And while it would be possible to wrap grisbi in such a way that it runs its own D-Bus session bus and run dconf instance on it, each program running its own D-Bus server and dconf instance would soon leave you without any free memory. Regular Linux distributions solve this issue by having programs essentially modify D-Bus configuration, even transitively (grisbi would modify system to install dconf, which would modify system to install dbus, and modify its configuration), this is impure and thus impossible in Nix by design.

It would be possible to create a service that would recognize attempted impurities in programs and propagate impurities into their targets (e.g. see that you installed grisbi, which depends on dconf D-Bus service so it would register it in the global D-Bus daemon) but so far, no-one implemented it AFAIK, probably because it would suffer from many of the same issues as impure package managers.

Edit: As layus points out, there are some runtime dependencies that depend on exclusive access to hardware (like X server), which could not be made self-contained at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: question Requests for a specific question to be answered
Projects
None yet
Development

No branches or pull requests

4 participants