-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
GFileMonitor does not work with document portal #567
Comments
Hmm, inotify is supposed to just work with fuse. Will need to make a testcase for this. |
Unfortunately, I don’t think it does. Here’s a related issue: libfuse/libfuse#328. But I don’t know FUSE and inotify well at all, maybe I missed something.
For example, you can try to:
Epiphany automatically refreshes the content when it doesn’t use xdg-desktop-portal (and FUSE). The same problem happens with other tools such as Evince. |
libfuse/libfuse#328 has been closed, but as far as I can see the feature request hasn't been implemented. |
@sonnyp to reach out to FUSE folks about it |
How to reproduceTerminal 1:
Terminal 2:
Expected resultTerminal 1 shows events Actual resultTerminal 1 shows nothing NotesWatching outside of the document portal works just fine:
Writing to the portal path from the host also doesn't trigger the notifications
Writing to the portal path from within the sandbox does trigger the notifications
|
Maybe you could add a description what you are actually trying to achieve, without gnome commands. I get that "gio monitor " sets up an inotify-watch. But what is flatpak doing? Plain inotify works on fuse, example with passthrough_hp from libfuse console 1: (runs in foreground, due to debug-fuse) console 2: console 3: on console 2 that results in
So what are you trying to achieve here? With my passthrough example, it sounds like you are trying to set up events from the underlying file system? I.e. I have
https://lwn.net/Articles/896055/
Btw, there is libfuse/libfuse#328, but one cannot just change |
Well, fsnotify methods like fanotify and inotify work on Linux, yes in the sense that when you, user on the localhost create a file for example in a watched directory, these methods will create an event for that if the creation is successfull. https://lwn.net/Articles/896055/ It's not that easy. More filesystems (network filesystem where the backend is shared with other users on other hosts) need this. |
In an attempt to write
gnome-text-editor
and only use the document portal without file-system access, I ran into an issue with file monitors. We aren't actually getting change events for underlying files. That means if another program on the system changes a file out from under the use (say build tooling), then they can't reload the file to apply those changes.The text was updated successfully, but these errors were encountered: