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

mate: enable gvfs service #56469

Merged
merged 1 commit into from Feb 28, 2019
Merged

mate: enable gvfs service #56469

merged 1 commit into from Feb 28, 2019

Conversation

@romildo
Copy link
Contributor

@romildo romildo commented Feb 27, 2019

Motivation for this change

Enable gvfs service for the mate desktop environment. Without this Connect to Server does not work: when clicking in the panel on Places and then Connect to Server… an error message is displayed:

Can't load the supported server method list.
Please check your GVfs installation.
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@romildo romildo requested a review from Infinisil as a code owner Feb 27, 2019
@nixos-discourse
Copy link

@nixos-discourse nixos-discourse commented Feb 27, 2019

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/connect-to-server-not-working-in-mate/2158/8

Loading

services.upower.enable = config.powerManagement.enable;

security.pam.services."mate-screensaver".unixAuth = true;

environment.variables = {
GIO_EXTRA_MODULES = [ "${pkgs.xfce.gvfs}/lib/gio/modules" ];
Copy link
Contributor

@xeji xeji Feb 27, 2019

Choose a reason for hiding this comment

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

Does it matter whether the gio modules are taken from xfce.gvfs vs gnome3.gvfs or just gvfs ? Just curious.

Loading

Copy link
Contributor Author

@romildo romildo Feb 27, 2019

Choose a reason for hiding this comment

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

Looking at the many definitions of gvfs:

pkgs.gvfs = callPackage ../development/libraries/gvfs { gnome = res.gnome3; };
pkgs.gnome3.gvfs = pkgs.gvfs.override { gnome = gnome3; gnomeSupport = true; };
pkgs.gnome2.gvfs = gvfs.override { gnome = self; };
pkgs.xfce.gvfs = pkgs.gvfs.override { samba = null; };

In the derivation for pkgs.gvfs there is:

  buildInputs = [
    glib libgudev udisks2 libgcrypt dbus
    libgphoto2 avahi libarchive fuse libcdio
    samba libmtp libcap polkit libimobiledevice libbluray
    libcdio-paranoia libnfs openssh
    # ToDo: a ligther version of libsoup to have FTP/HTTP support?
  ] ++ stdenv.lib.optionals gnomeSupport (with gnome; [
    libsoup gcr
    glib-networking # TLS support
    gnome-online-accounts libsecret libgdata
  ]);

  mesonFlags = [
    "-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user"
    "-Dtmpfilesdir=no"
  ] ++ stdenv.lib.optionals (!gnomeSupport) [
    "-Dgcr=false" "-Dgoa=false" "-Dkeyring=false" "-Dhttp=false"
    "-Dgoogle=false"
  ] ++ stdenv.lib.optionals (samba == null) [
    # Xfce don't want samba
    "-Dsmb=false"
  ];

I think it would work with any of them, but pkgs.gnome3.gvfs seems more complete. And it is the one consistent with services.gnome3.gvfs.

Loading

Copy link
Contributor

@xeji xeji Feb 28, 2019

Choose a reason for hiding this comment

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

Thanks for looking into this, I agree.

Loading

@xeji xeji merged commit 8705341 into NixOS:master Feb 28, 2019
9 checks passed
Loading
@dtzWill
Copy link
Member

@dtzWill dtzWill commented Feb 28, 2019

Is there a reason we don't set GIO_MODULES appropriately based on gfvs.enable (why should this be pushed out to anywhere that enables it)? Is the problem that we don't ("yet") have written a mechanism for doing this that combines nicely as needed?

Loading

@romildo romildo deleted the fix.mate branch Feb 28, 2019
@xeji
Copy link
Contributor

@xeji xeji commented Feb 28, 2019

@dtzWill sounds reasonable. But I don't know enough about the gio stuff to be sure it would work 😄

Loading

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

Successfully merging this pull request may close these issues.

None yet

6 participants