[Nix-dev] xfce and gvfs-fuse-daemon

Sergey Mironov ierton at gmail.com
Sun Feb 12 12:49:18 CET 2012


Hi! I've done some work to add gvfs-fuse-daemon support to the Xfce's gvfs (I've
found that Xfce uses it's own gvfs, free of heavy gnome deps). There are 2
patches in attach.  Could you please review/apply them?

0001-xfce-gvfs-add-fuse-to-buildInputs.patch - is for nixpkgs, should work
without problems.

0001-xfce-run-gvfs-fuse-daemon-at-startup.patch - is for nixos. I am not sure
whether it is ok to call gvfs-fuse-daemon directly from session starter script,
but it works and can be used as temporary solution until somebody finds a better
one. Actually, xfce-expert's advice is needed here.
-------------- next part --------------
>From f6cc3f9a311adc7292d713518d2e77b710ce1cdf Mon Sep 17 00:00:00 2001
From: Sergey Mironov <ierton at gmail.com>
Date: Sun, 12 Feb 2012 15:06:32 +0400
Subject: [PATCH] xfce-gvfs: add fuse to buildInputs

Passing fuse to gvfs results in building gvfs-fuse-daemon, which makes
it possible to access gvfs mounts via ~/.gvfs folder.
---
 pkgs/desktops/xfce-4.8/support/gvfs.nix |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkgs/desktops/xfce-4.8/support/gvfs.nix b/pkgs/desktops/xfce-4.8/support/gvfs.nix
index 6e50e68..33f7315 100644
--- a/pkgs/desktops/xfce-4.8/support/gvfs.nix
+++ b/pkgs/desktops/xfce-4.8/support/gvfs.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, glib, dbus, intltool, udev, libgdu }:
+{ stdenv, fetchurl, pkgconfig, glib, dbus, intltool, udev, libgdu, fuse }:
 
 stdenv.mkDerivation rec {
   name = "gvfs-1.8.2";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "0895ac8f6d416e1b15433b6b6b68eb119c6e8b04fdb66db665d684355ef89345";
   };
 
-  buildInputs = [ pkgconfig glib dbus.libs intltool udev libgdu ];
+  buildInputs = [ pkgconfig glib dbus.libs intltool udev libgdu fuse ];
 
   meta = {
     description = "Virtual Filesystem support library (for Xfce)";
-- 
1.7.8

-------------- next part --------------
>From bfe87002cc0ddd8ee244ef5cb942c90dd7430223 Mon Sep 17 00:00:00 2001
From: Sergey Mironov <ierton at gmail.com>
Date: Sun, 12 Feb 2012 15:36:14 +0400
Subject: [PATCH] xfce: run gvfs-fuse-daemon at startup

gvfs-fuse-daemon will mount current user's ~/.gvfs folder so they could
acces their gvfs mounts using non-gvfs applications
---
 modules/services/x11/desktop-managers/xfce.nix |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/services/x11/desktop-managers/xfce.nix b/modules/services/x11/desktop-managers/xfce.nix
index e12d3bb..01e7f6d 100644
--- a/modules/services/x11/desktop-managers/xfce.nix
+++ b/modules/services/x11/desktop-managers/xfce.nix
@@ -40,10 +40,18 @@ in
             # Ugly.
             export GST_PLUGIN_PATH=${config.system.path}/lib
 
+            # Run gvfs-fuse-daemon to access remote filesystems via fuse
+            ${pkgs.xfce.gvfs}/libexec/gvfs-fuse-daemon ~/.gvfs -o allow_root
+
             exec ${pkgs.stdenv.shell} ${pkgs.xfce.xfceutils}/etc/xdg/xfce4/xinitrc
           '';
       };
 
+    boot.kernelModules =
+      [
+        "fuse"
+      ];
+
     environment.systemPackages =
       [
         pkgs.gtkLibs.gtk # To get GTK+'s themes.
-- 
1.7.8



More information about the nix-dev mailing list