emacs: tramp: detect wrapped gvfsd-fuse daemon

Tramp checks for a running `gvfsd-fuse` process to figure out whether to enable
gvfs-based. Its `tramp-compat-process-running-p` function uses
`/proc/<pid>/comm` to check for the name of running process(es). In Nix, the
gvfsd processes are launched via wrappers and the name of `gvfsd-fuse` in
`comm` in Linux is `.gvfsd-fuse-wra` (truncated to 15 characters) which
means the process is not detected and `tramp-gvfs-enabled` ends up with
`nil` even when gvfs is available.

This patch adds `.gvfsd-fuse-wrapped` to the list of process names to check when
determining the value of `tramp-gvfs-enabled`.
This commit is contained in:
Olli Helenius 2019-01-10 18:06:54 +02:00
parent 9d08f32da6
commit 2f9b85855b
2 changed files with 15 additions and 0 deletions

View File

@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
patches = [
./clean-env.patch
./tramp-detect-wrapped-gvfsd.patch
];
postPatch = lib.optionalString srcRepo ''

View File

@ -0,0 +1,14 @@
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index f370abba31..f2806263a9 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -164,7 +164,8 @@ tramp-gvfs-enabled
(and (featurep 'dbusbind)
(tramp-compat-funcall 'dbus-get-unique-name :system)
(tramp-compat-funcall 'dbus-get-unique-name :session)
- (or (tramp-compat-process-running-p "gvfs-fuse-daemon")
+ (or (tramp-compat-process-running-p ".gvfsd-fuse-wrapped")
+ (tramp-compat-process-running-p "gvfs-fuse-daemon")
(tramp-compat-process-running-p "gvfsd-fuse"))))
"Non-nil when GVFS is available.")