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

Enhance Firefox’ Plasma integration with file open/save dialogs #53454

Closed
silverhook opened this issue Jan 5, 2019 · 3 comments · Fixed by #64575
Closed

Enhance Firefox’ Plasma integration with file open/save dialogs #53454

silverhook opened this issue Jan 5, 2019 · 3 comments · Fixed by #64575

Comments

@silverhook
Copy link
Contributor

Issue description

It is possible to use Plasma’s native file dialogues in Firefox 64 to open or save a file. Currently this feature is not working in NixOS, and it seems to me some small changes would need to be made to derivation in order to enable it.

I propose we include this option together with plasma-browser-integration as a Firefox option in NixOS (see also: #51020).

Steps to reproduce

I followed the explanation on how to enable this feature as it was published on KDE’s Planet:

  1. install Firefox (64 is current stable)
  2. install xdg-desktop-portal-kde
  3. run GTK_USE_PORTAL=1 firefox from a terminal emulator

But it produces the following error:

(firefox:2594): Gtk-WARNING **: 18:19:30.997: Theme parsing error: <data>:1:34: Expected ')' in color definition

(firefox:2594): Gtk-WARNING **: 18:19:30.997: Theme parsing error: <data>:1:77: Expected ')' in color definition

(firefox:2594): Gtk-WARNING **: 18:19:34.026: Can't open portal file chooser: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files

(/nix/store/hii22m1qbp4x5qsya5x5l04mnxln9s31-firefox-release-bin-unwrapped-64.0/usr/lib/firefox-bin-64.0/firefox-bin:2748): dconf-WARNING **: 18:19:34.253: Unable to open /run/opengl-driver/share/dconf/profile/user: Permission denied

(firefox:2594): Gtk-WARNING **: 18:19:49.681: Can't open portal file chooser: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.14.91, NixOS, 18.09.1834.9d608a6f592 (Jellyfish)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.1.3
  • channels(root): "nixos-18.09.1834.9d608a6f592"
  • channels(hook): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
@hedning
Copy link
Contributor

hedning commented Jan 7, 2019

You'll probably have to do something like this to expose the dbus service:

services.dbus.packages = [ pkgs.flatpak pkgs.xdg-desktop-portal ] ++ cfg.extraPortals;

@silverhook
Copy link
Contributor Author

silverhook commented Jan 22, 2019

@hedning Where? In:

nixpkgs.config.firefox.enablePlasmaBrowserIntegration = true;

@hedning
Copy link
Contributor

hedning commented Jan 22, 2019

It needs to go into a nixos module or your configuration.nix.

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

Successfully merging a pull request may close this issue.

2 participants