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

gnome.nautilus: use the gtk4 FileChooser settings schema (fixes crash-on-start) #195985

Merged
merged 1 commit into from Oct 25, 2022

Conversation

uninsane
Copy link
Contributor

upstream PR for more context: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1013

with the recent nixpkgs bump from GNOME 42 -> 43, we build nautilus with gtk4 (as upstream expects). if the user has nothing else in their environment providing gtk3, then nautilus fails to locate a gtk3 gsettings schema it depends on. i.e.

$ nautilus
(org.gnome.Nautilus): GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed

we could solve this on our end by adding gtk3 to gappsWrapperArgs, but this seems like an upstream bug: i believe they mean to use the gtk4 settings schemas instead of the legacy gtk3 ones.

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: GNOME GNOME desktop environment and its underlying platform label Oct 14, 2022
@SuperSandro2000 SuperSandro2000 changed the title nautilus: use the gtk4 FileChooser settings schema (fixes crash-on-start) gnome.nautilus: use the gtk4 FileChooser settings schema (fixes crash-on-start) Oct 14, 2022
@SuperSandro2000
Copy link
Member

@ofborg build gnome.nautilus

@jtojnar jtojnar added this to To do in 22.11 Blockers via automation Oct 17, 2022
@jtojnar jtojnar added this to In progress in GNOME 43 via automation Oct 17, 2022
@uninsane
Copy link
Contributor Author

this is merged upstream now. i don't know much about the GNOME release cycle, but i think the fix made it in before the 43.1 cut, meaning the issue this PR addresses should be fixed when we bump nixpkgs 43.0 -> 43.1.

ordinarily i'd close this PR now, but i see it's marked as a 22.11 blocker and i don't know the workflow around that. if it's still open by the time 43.1 is merged into nixpkgs i'll come back and close this after confirming the fix.

@jtojnar
Copy link
Contributor

jtojnar commented Oct 22, 2022

Nautilus 43.1 will likely release today so it should be fine.

@SuperSandro2000
Copy link
Member

So we wanna wait or merge this?

@amaxine
Copy link
Contributor

amaxine commented Oct 23, 2022

I think we can afford to wait a little longer, unless 43.1 isn't happening for nautilus at all anymore. GDM never got any minor releases last cycle, so I'm not sure what the situation is.

@jtojnar
Copy link
Contributor

jtojnar commented Oct 23, 2022

GDM is a bit understaffed. Nautilus maintainers talked about making a release on Matrix so they are probably just fixing last few bugs.

…-on-start)

upstream PR for more context: <https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1013>

with the recent nixpkgs bump from GNOME 42 -> 43, we build nautilus with
gtk4 (as upstream expects). if the user has nothing else in their
environment providing gtk3, then nautilus fails to locate a gtk3
gsettings schema it depends on. i.e.

```console
$ nautilus
(org.gnome.Nautilus): GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed
```

we could solve this on our end by adding gtk3 to `gappsWrapperArgs`, but
this seems like an upstream bug: i believe they mean to use the gtk4 settings
schemas instead of the legacy gtk3 ones.
@jtojnar jtojnar force-pushed the pr/nautilus-filechooser-schema branch from 775b98c to b417c14 Compare October 25, 2022 14:57
Copy link
Contributor

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s get this in, Nautilus maintainers still want to fix few more crashes before making a release.

@ofborg ofborg bot requested a review from jtojnar October 25, 2022 15:07
@gvolpe
Copy link
Member

gvolpe commented Oct 25, 2022

Has anyone tried these patches? While it doesn't crash, nautilus kind of struggles to start up, it is very slow and it doesn't respect the dark theme, at least on my system.

@jtojnar jtojnar merged commit 22834c4 into NixOS:master Oct 25, 2022
22.11 Blockers automation moved this from To do to Done Oct 25, 2022
GNOME 43 automation moved this from In progress to Done Oct 25, 2022
@jtojnar
Copy link
Contributor

jtojnar commented Oct 25, 2022

@gvolpe It was tested in GNOME Shell so the environment accidentally contains GTK 3 schemas, preventing this crash from being encountered.

Nautilus 43 switched to libadwaita so the expected way to switch to dark theme is using nix-shell -p glib gsettings-desktop-schemas --run 'XDG_DATA_DIRS=$GSETTINGS_SCHEMAS_PATH gsettings set org.gnome.desktop.interface color-scheme prefer-dark'

I have not encountered any slowness problems.

@gvolpe
Copy link
Member

gvolpe commented Oct 25, 2022

@jtojnar thanks, I was talking about the patches being applied in this PR. I have an overlay with these patches on my system, but I'm experiencing slowness on every operation on Nautilus after updating to this version with gtk4.

@gvolpe
Copy link
Member

gvolpe commented Oct 25, 2022

@jtojnar I understand this may be a Nautilus bug, but it is nearly unusable for me, so I had to revert to the GTK3 version. Leaving this here in case someone else experiences the same issue: gvolpe/nix-config@397c9a8

@jtojnar
Copy link
Contributor

jtojnar commented Oct 25, 2022

@gvolpe maybe, if you have time, you can jump on https://matrix.to/#/#nautilus:gnome.org and help Nautilus developers debug this. So far, they have not been able to reproduce it.

@gvolpe
Copy link
Member

gvolpe commented Oct 25, 2022

Thanks @jtojnar , I joined the room. I'm thinking it could be because the icon theme I use is based on gtk3, so it may conflict with nautilus' gtk4? And the theme I use only refers to gtk-engine-murrine, but I'm not very familiar with these terms.

@jtojnar
Copy link
Contributor

jtojnar commented Oct 25, 2022

@gvolpe Icon themes do not really have anything to do with specific versions of GTK. gtk3 is used there for the program for rebuilding the cache but the cache format did not change between GTK 3 and GTK 4 so it should not really matter.

Theme engines are GTK 2 thing so that is not relevant either. In fact, with libadwaita, custom theme will not be used, unless you explicitly force it using GTK_THEME environment variable. But that is really only meant for debugging.

@gvolpe
Copy link
Member

gvolpe commented Oct 26, 2022

Hmm I'm out of ideas then -_-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants