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
sway: gsettings executed from sway/config fails #67704
Comments
Seems reasonable.
If you use another terminal emulator you should see the unmodified We could fix this problem by doing something similar for Sway. However, I'm a bit concerned about the closure size as this affects all users, even if they're not using GTK3 applications. But since most users should have the dependencies already installed and Nix isn't very minimalistic anyway we can probably get away with it. But it might still be best to make this configurable and use conservative defaults. It might be best to split Sway into |
I made the missing gsettings schemas available from sway by computing the missing path like this:
And then exporting it to sway's environment by adding the following to sway's
Now the |
cc @jtojnar This has my 👀 because it seems like a simple issue. |
The diagnosis is correct. We solve the issue in GNOME Photos test by wrapping GSettings tool: https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/installed-tests/gnome-photos.nix#L11-L25 |
sway: refactor with a wrapper This moves the wrapper functionality from the NixOS module to a new package (wrapper) that wraps the original sway package (sway-unwrapped). Therefore it's now also possible to properly use Sway on non-NixOS systems out of the box. The new submodule for the wrapperFeatures makes it easy to extend the functionality which should become useful in the future. This also introduces a GTK wrapper feature to fix issues with icon/GTK themes, e.g. when running waybar or wofi. This should also work for #67704. If not, we might have to add some additional dependencies/arguments for this case.
@colemickens Is your issue fixed by #75247 ? |
I tested, it works. EDIT : I think i didn't test well, it seems not working |
For me, this issue is still open. Here is my sway configuration:
Is it a config issue on my side? edit: some more information:
|
There might be a regression with the GTK wrapper for sway, @primeos what do you think of this ? EDIT: I'm able to reproduce the issue, I'm currently working on this, I will submit a PR as soon as I figure out what's happening :) |
Don't know. I'm not using the GTK wrapper so far, but from this issue it looks like the GTK wrapper never fixed this problem. From this thread it looks like we could e.g. solve this issue by adding |
After some digging, it seems that generated wrapper for Sway: export GIO_EXTRA_MODULES='/nix/store/4fq6w7ksq1dba80sxpdgzrxpd46kdjgq-dconf-0.36.0-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES generate wrapper for Termite: export GIO_EXTRA_MODULES='/nix/store/4fq6w7ksq1dba80sxpdgzrxpd46kdjgq-dconf-0.36.0-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
export GIO_EXTRA_MODULES='/nix/store/4fq6w7ksq1dba80sxpdgzrxpd46kdjgq-dconf-0.36.0-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
export GDK_PIXBUF_MODULE_FILE='/nix/store/d0r5r3zcjipx1qxqxmf1mqzwbay04vq3-librsvg-2.48.2/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache'
export XDG_DATA_DIRS='/nix/store/6yrlycwcnxlgg6bkhq4jvwmahyrj00id-gtk+3-3.24.17/share/gsettings-schemas/gtk+3-3.24.17:/nix/store/78x2nyfhhili5ijd6l74z3flj63p92s0-gsettings-desktop-schemas-3.36.0/share/gsettings-schemas/gsettings-desktop-schemas-3.36.0'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS
export XDG_DATA_DIRS='/nix/store/7m99r1fx36zndgxrilg6kppg8k0d6pjb-termite-15/share'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS Adding I'm still trying to figure out what's the difference between |
I could not manage to make If somebody that has more knowledge than me on this subject can help, that would be great :). EDIT: Found my issue (I was confused by the behavior of |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/some-lose-ends-for-sway-on-nixos-which-we-should-fix/17728/3 |
If one tries to use the Sway wiki's suggested fix for GTK3 app graphical configuration, they will find themselves failing in NixOS. I think I've tracked down why.
Background:
gsettings set
with values fromsettings.init
to ensure the values in the dconf backend reflect the same values in the text file:Executing the script manually, from a terminal under Sway, works as expected. When run from a command in
~/.config/sway/config
asexec_always
, it fails. I think this is because XDG_DATA_DIRS does not include the schema directories when Sway runs the command.This is XDG_DATA_DIRS from a terminal under Sway:
But this is it when Sway executes it:
Additionally, if I try to do this from inside the script, it prints "no schemas installed" when run by sway:
Upstream issue: swaywm/sway#4323 (sorta, the issue describe by OP seems somewhat different)
cc: @gnidorah @primeos
The text was updated successfully, but these errors were encountered: