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

Way to enable GVFS? #27

Open
manuq opened this issue Jul 13, 2020 · 1 comment
Open

Way to enable GVFS? #27

manuq opened this issue Jul 13, 2020 · 1 comment

Comments

@manuq
Copy link
Contributor

manuq commented Jul 13, 2020

Hi,
I'm trying to access Google Drive from the Emacs flatpak. It should work directly with M-x find-file by the builtin Tramp. But I get "Package `tramp-gvfs' not supported". After looking at permissions of other flatpaks like FreeFileSync I tried:

flatpak run --filesystem=xdg-run/gvfs --talk-name=org.gtk.vfs --talk-name=org.gtk.vfs.* org.gnu.emacs

But I still get the "not supported" message. Is there any way around this?

@telenieko
Copy link

The problem appears to be in:

(defconst tramp-gvfs-enabled
  (ignore-errors
    (and (featurep 'dbusbind)
	 (autoload 'zeroconf-init "zeroconf")
	 (tramp-compat-funcall 'dbus-get-unique-name :system)
	 (tramp-compat-funcall 'dbus-get-unique-name :session)
	 (or (tramp-process-running-p "gvfs-fuse-daemon")
	     (tramp-process-running-p "gvfsd-fuse"))))
  "Non-nil when GVFS is available.")

In particular the two calls to tramp-process-running-p, because Emacs inside flatpak CANNOT see the hosts processes.

My current workround is to do this very early in init.el:

(defun tramp-process-running-p--mock (process-name)
  "gvfs* is always running."
  (when (string-match "gvfs.*" process-name)
    t))

(advice-add 'tramp-process-running-p
	    :before-until
	    #'tramp-process-running-p--mock)

Now GVFS is working inside Flatpak.

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

No branches or pull requests

2 participants