Open ipvych opened 2 years ago
I'm a bit confused: qutebrowser has no GTK dependency at all, AFAIK. The file picker dialog opens up just fine and it's a standard Qt window, for me.
Maybe this has something to do with your theme Adwaita::Style
, I have no Qt themes installed.
This happened because I used QT_QPA_PLATFORMTHEME
and QT_STYLE_OVERRIDE
environment variables to force Qt to use my GTK theme, removing them fixed issue with qutebrowser.
I will try to find out why using these variables causes issues. Sorry for bothering, you can close this issue now since it is not related to qutebrowser.
No GSettings schemas are installed on the system
This error usually happens when a GTK application hasn't been wrapped (to run with GTK environment variables). I guess that in this case the theme must run some GTK code inside qutebrowser environment, which doesn't have those variables. I don't think you can wrap a theme, so you could try setting them directly in your interactive shell, it's usually something like this:
export GIO_EXTRA_MODULES='/nix/store/<hash>-dconf-0.40.0-lib/lib/gio/modules'
export GDK_PIXBUF_MODULE_FILE='/nix/store/<hash>-librsvg-2.52.4/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache'
export XDG_DATA_DIRS='/nix/store/<hash>-gtk+3-3.24.30/share/gsettings-schemas/gtk+3-3.24.30:/nix/store/<hash>-gsettings-desktop-schemas-41.0/share/gsettings-schemas/gsettings-desktop-schemas-41.0'
I wrapped qutebrowser with these variables like so:
(writeShellScriptBin "qutebrowser" ''
export GIO_EXTRA_MODULES='${dconf}/lib/gio/modules'
export GDK_PIXBUF_MODULE_FILE='${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache'
export XDG_DATA_DIRS='${gtk3}/share/gsettings-schemas/gtk+3-${gtk3.version}:${gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas-${gsettings-desktop-schemas.version}'
${qutebrowser}/bin/qutebrowser "$@"
'')
And file picker shows up without crashes, thanks!
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/qutebrowser-crashes-on-file-dialog/23796/1
FYI, the workaround of @ivan-pop also works for me. I use qt.platformTheme
from Home Manager which is setting the mentioned environment variables and was causing this bug. I do think that more people are using this setting so it would be important to know if this bug is solely related to qutebrowser
or if it also affects other Qt applications.
This was affecting me also in other applicaitons (vlc
, pircard
). I had to set xdg.systemDirs.data
with home manager to
xdg.systemDirs.data = [ "${gtk3}/share/gsettings-schemas/gtk+3-${gtk3.version}"
"${gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas-${gsettings-desktop-schemas.version}" ];
Setting GIO_EXTRA_MODULES
and GDK_PIXBUF_MODULE_FILE
is unnecessary, because they are correctly set by the qutebrowser
executable (and I guess also by the other executables because I did not experience any problems).
Let me know if we should inform the Home Manager guys. I think this is ultimately caused by the qt.platformTheme = "gnome";
setting.
I'm not using qt.platformTheme
, still got the crash, and still the fix for systemDirs.data
by @dschrempf works for me. Any update on this issue in general?
I wrapped qutebrowser with these variables like so:
(writeShellScriptBin "qutebrowser" '' export GIO_EXTRA_MODULES='${dconf}/lib/gio/modules' export GDK_PIXBUF_MODULE_FILE='${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache' export XDG_DATA_DIRS='${gtk3}/share/gsettings-schemas/gtk+3-${gtk3.version}:${gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas-${gsettings-desktop-schemas.version}' ${qutebrowser}/bin/qutebrowser "$@" '')
And file picker shows up without crashes, thanks!
Try WrapGAppsHook
?
Describe the bug
Opening file picker in qutebrowser crashes it with
Steps To Reproduce
qutebrowser -T
:open https://viljamis.com/filetest/
Choose file
Expected behavior
qutebrowser should not crash and show GTK file picker.
Additional context
This appears to be similar to #161399, but trying to do the same fix I tried in #162089 does not seem to solve this issue.
Notify maintainers
@jagajaga @rnhmjoj @ebzzry @dotlambda
Metadata