You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please use the 👍 reaction to show that you are interested into the same feature.
Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
Subscribe to receive notifications on status change and new comments.
Feature request
Which Nextcloud Version are you currently using: 29.0.7
Describe the solution you'd like
The ability to initiate sync of file but without opening it.
The current mechanism relies on using xdg-open (or mimeopen) for opening a file: the .nextcloud file extension (on linux) chains through several mime-related files, eventually resolving to using /usr/bin/nextcloud on the file. Its behavior is to sync it to the local directory and then open the file. (If you're curious to which files, read #3668 (comment).)
However, in my use-case I need to open it within the VM, which is certainly not something nextcloud should try to implement. Currently I have to open it in linux, which opens in what linux thinks is the appropriate app (it's insufficient but doesn't crash). I then close the app, then open the file from within the windows-guest VM (with a shared-folder to get to the real file).
A clear and concise description of what you want to happen.
Describe alternatives you've considered
nextcloudcmd only syncs whole directories, it does not support individual files; even if it did, I'm not certain that it signals that the file is the realization of a virtual file, and therefore not a change. I would not want this to cause an unnecessary false-signal that the newly downloaded is "new" and needs to be uploaded.
anything using webdav falls prey to the same false-signal that the downloaded file is "new" or "changed", which would overwrite the file on the server; at best this is inefficient.
I have tried to hack a script that "opens" it (using the default xdg-open/mimeopen mechanism) and immediately close the mime-defined application, but this is just a hack and often doesn't catch it quite in time.
Additional context
It is not unheard of that opening the file imposes some change on its contents, either by accident (such as imperfect MS-Office emulation in LibreOffice/OpenOffice, bug reports almost certainly) or by design (I have no example at this time). In this case, syncing the file is the only thing desired, anything more is irreversible.
My use-case to open it within a VM is just mine, I think the request is still relevant. For instance, if I'm syncing to the local drive and will then take it to another machine (on which I'm not running a nextcloud desktop client), it might be that the file cannot be run on the local system due to any number of reasons (such as the required software not installed alongside the desktop client).
The text was updated successfully, but these errors were encountered:
I found a (really hackish) workaround until NC decides whether to add command-line control over VFS files (on linux at least).
Internally, /usr/bin/nextcloud calls /usr/bin/xdg-open, and after some sleuthing I discovered that when it is opened by the nextcloud desktop client, the envvar GIO_LAUNCHED_DESKTOP_FILE is set to something like ~/.config/autostart/com.nextcloud.desktopclient.nextcloud.desktop. With that knowledge, we can (relatively) unambiguously determine if we really want to open the file or skip it, optionally notifying the user that the file is now available.
First, we need to preserve the original /usr/bin/xdg-open. Debian-like distros can use dpkg-divert to "permanently" move the file out of the way so that future updates to the xdg-utils package will preserve the renamining:
I'm using notify-send since I'm on Ubuntu using Gnome, and that's an easy way to let me know that it is complete. You can insert just about anything in there (preferably something that is resilient to errors/mistakes).
How to use GitHub
Feature request
Which Nextcloud Version are you currently using: 29.0.7
Describe the solution you'd like
The ability to initiate sync of file but without opening it.
The current mechanism relies on using
xdg-open
(ormimeopen
) for opening a file: the.nextcloud
file extension (on linux) chains through several mime-related files, eventually resolving to using/usr/bin/nextcloud
on the file. Its behavior is to sync it to the local directory and then open the file. (If you're curious to which files, read #3668 (comment).)However, in my use-case I need to open it within the VM, which is certainly not something nextcloud should try to implement. Currently I have to open it in linux, which opens in what linux thinks is the appropriate app (it's insufficient but doesn't crash). I then close the app, then open the file from within the windows-guest VM (with a shared-folder to get to the real file).
A clear and concise description of what you want to happen.
Describe alternatives you've considered
nextcloudcmd
only syncs whole directories, it does not support individual files; even if it did, I'm not certain that it signals that the file is the realization of a virtual file, and therefore not a change. I would not want this to cause an unnecessary false-signal that the newly downloaded is "new" and needs to be uploaded.webdav
falls prey to the same false-signal that the downloaded file is "new" or "changed", which would overwrite the file on the server; at best this is inefficient.xdg-open
/mimeopen
mechanism) and immediately close the mime-defined application, but this is just a hack and often doesn't catch it quite in time.Additional context
The text was updated successfully, but these errors were encountered: