org.gtk.Settings.FileChooser' is not installed when running i3

Hey everyone,

I am new to NixOS and I am still setting some things up as I go.
But I recently found an issue I am not quite able to solve alone.

I run NixOS with i3-wm as a window manager.
Now everything works real smooth except for calling some applications through my window manager.
Certain applications (spotify in this example, but a couple of others as well) crash when trying to open a file explorer.
However this bug does not occur if I manually start the applications through a terminal instead of through an i3 hotkey or dmenu.

I piped the stderr output of spotify in this case when launched through i3 and found the following error:

GLib-GIO-ERROR *: 12:02:09.709: Settings schema ‘org.gtk.Settings.FileChooser’ is not installed

This lead me to an earlier discussion here of a bug with the filechooser.
But the bug listed above and it’s solution apparently don’t apply in this case as I have tried the steps listed and they didn’t solve the problem.
Furthermore the problem is also different as in my case it thinks that the entire file chooser is not installed.

I tried some other things as well as running the programs though another layer of for example /usr/bin/env or a nix-shell with the gtk3 package installed, but these also didn’t seem to solve the problem.
This leads me to believe that the applications started through i3 on my system somehow can’t find the gtk package even if it’s present on the system.

Maybe I did something stupid or configured something wrong, it wouldn’t be a first,
but I have no idea where to look or where to start to solve this issue.
Any tips, hints or pointers in the right direction would be welcome.

Kind regards!

PS. If this does not belong in the help section feel free to move it around, I am not yet familiar with the layout of the categories of discourse.

Have you set programs.dconf.enable = true;? If there’s a gsettings thing going wrong, and you’re in a DIY desktop manager like i3, that’s the first thing to make sure of.

I didn’t so good thinking!

I made sure to add it, rebuild the OS and restart, but it doesn’t seem to have fixed the issue just yet.
I will make sure to keep it in the configuration nonetheless.

But this gave me the idea of looking at other people their configuration files for I3 specifically.
Maybe I can find some other things I am missing.

Hey everyone,

I didn’t manage to solve the issue in i3, so I ended up making the switch to sway.
Giving me a good reason to try out wayland.
Not optimal as a solution posted online, but it indirectly solved the problem for me.

This thread can be closed.

This looks like a packaging error. Spotify accesses gappsWrapperArgs in installPhase but that variable gets fully populated only just before fixupPhase. As a result, XDG_DATA_DIRS environment variable in the wrapper does not contain the required GSettings schemas. It works in some cases thanks to the WM or something else contaminating the environment of the launched program but it should not be relied on.