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
We should replace gvfs with something simpler, such as a combination of Zeroconf for detecting network devices and some custom code for (FUSE-)mounting them.
gvfs comes from the Gnome stack which is not a welcome technology in helloSystem
Thank you very much. This kind of stuff is what I mean with "gvfs is entangled with a stack we don't want in helloSystem". It is biased toward using the Red Hat stack. Otherwise there would be an option to use Qt WebEngine instead of webkit2-gtk3.
You're welcome. I still think you get further by understanding the software stack, and then customizing it to your requirements.
"Keep your friends close, keep your enemies closer." If we monitored GNOME's development activity, we would know about these problems before they get unleashed on poor users. If we studied and developed gvfs further, we could make it work with Qt WebEngine if need be, without upstream help.
"Cloning doesn't work against a fast competitor", Eric Schmidt, ex-CEO of Google in his "Unwinnable Wars" talk. Consider how a decade of Btrfs development failed to out-compete ZFS, and it took LLVM $50 million dollars and many years to develop Clang to the point where it began out-competing GCC. By comparison, one 8000 line project, bsdisks, quickly got every file manager on every desktop working better than HAL did, not because it reimplemented the entire GNOME stack, but because it developed one small component in just the right place, that got both gvfs and Solid singing and dancing to our tune.
It looks somewhat like this. gvfs and Solid use libudisks to make DBus calls to the UDisks2 DBus service, which uses udev (now part of systemd), and various Linux kernel subsystems to expose devices, partitions, filesystems and operations and events on them over DBus. The deeper you go, the more it becomes a Linux-only setup.
bsdisks pretends to be UDisks2, implementing the same DBus functions, but using FreeBSD technologies like devd, CAM, and GEOM underneath, it can mount ZFS; software above is none the wiser.
Written in C++ with Qt, which makes DBus development particularly easy, it's only about 8000 lines compared to udisks2's 38000+ lines of C/glib. It doesn't do everything yet, there is no RAID, swap, it can't format drives, etc. but those APIs don't seem generally useful, I think they're there just for GNOME Disks to consume.
Also don't be scared of D-Bus. It's not the prettiest but it's organized and you get used to it. The entire object tree can be inspected. It's well tooled and scriptable. All traffic can be monitored with dbus-monitor. It's a heaven send compared to Microsoft's COM, in which traffic can't be monitored, there is little to no tooling and scripting, and you have to dig through the Windows registry to find things.
Yes, and since many existing applications depend on it, I guess we just have to live with it for now. Still I find it way too convoluted. That whole / vs . thing alone, and the inablity of root to send messages to non-root userland.
The system bus should allow root and user processes to communicate. Only session buses are specific to user login sessions. A process can be on multiple buses, eg. gvfs is on the session bus for desktop apps to access it, and on the system bus to call UDisks2/bsdisks.
Each bus connection has a bus name like ":1.2", and can also request a nicer name like "org.freedesktop.NetworkManager" if exporting a service. Within a service, it exports objects, in a hierarchy of paths similar to a filesystem. Those objects are only unique to that service, not globally unique, which is why you always specify the bus name too when calling them. Objects have interfaces, and each interface has properties that can be read and/or written, and methods that can be called.
Only paths to objects have "/", everything else has ".":
some.service -> /path/to/object -> some.interface.and.method
Yes, maybe it's just me but I find all of this utterly confusing. What is a path and what is an object and why are they not one and the same. Why do I need separate buses.
Yes, maybe it's just me but I find all of this utterly confusing. What is a path and what is an object and why are they not one and the same. Why do I need separate buses.
Separate session buses for users allow multi-seat and thin client configurations, as well as (in theory) secure communication between eg. apps and keyring. System buses are for global system-wide state, though in practice they're not always used that way, eg. Pulseaudio was criticized for using the session bus for audio instead of the system bus (even though audio is global in a single-user system) and breaking audio in apps running as a different user account (eg. some people ran Wine as a separate user to isolate its files from their main account) (don't know if it still does).
We could use sshfs to mount SSH shares. That would have the added benefit that not only Filer, but all applications could access them from a path, e.g., inside /media, like every other volume.
To make this happen, we need to use the SSH_ASKPASS environment variable.
But: How can we get the equivalent of
which currently pops up when accessing ssh via Filer? Since these strings are not in Filer source code, they must be coming from somewhere else... gvfs!
Message from lxqt-openssh-askpass-1.1.0:
--
*** Note ssh-add will NOT use GUI tools like lxqt-openssh-askpass
*** when it is attached to a terminal.
* To use lxqt-openssh-askpass start ssh-agent with -a <SOCKET_PATH> e.g in .xinitrc
ssh-agent -a "/tmp/${USER}-ssh-agent"
* Then set two variables e.g in ~/.config/lxqt/session.conf:
SSH_ASKPASS=lxqt-openssh-askpass
SSH_AUTH_SOCK=<SOCKET_PATH>
then run ssh-add from lxqt-runner or a .desktop entry
In the meantime, we could use -o StrictHostKeyChecking=no but that's not ideal.
Also, when running this from outside of a terminal:
# Allow for sshfs to ask for a password
# and to do identity verification
if [ -z $SSH_AUTH_SOCK ] ; then
eval $(ssh-agent -a "/tmp/${USER}-ssh-agent")
export SSH_ASKPASS=/usr/local/bin/lxqt-openssh-askpass
export SSH_AUTH_SOCK="${SOCKET_PATH}"
fi
Now we need a way for Filer to learn about Zeroconf without Gnome-ish dependencies, and show sftp services here:
Alternatively (probably better), get rid of the network:/// thing altogether. No one knows where it is. It has no place on the filesystem. Make Command+N just launch Zeroconf for now.
Just using @vermaden's excellent automount, FUSE sshfs and the like is so much more Unix philosophy.
I am so sick and tired of cryptic messages like this that point to other complicated mess:
(process:11003): GVFS-WARNING **: 11:03:14.196: The peer-to-peer connection failed: Fehler beim Holen der Informationen für Datei »/var/run/user/1001/gvfsd«: No such file or directory. Falling back to the session bus. Your application is probably missing --filesystem=xdg-run/gvfsd privileges.
So, gvfs must go. And D-Bus should be replaced by something way simpler where one does not need "privileges".
I mean, what happens if you do the same on a local filesystem? Who saves last wins. Some applications set a watch on the file and inform the user in case it has been edited elsewhere.
Way fewer processes are running, less RAM consumption
computer:/// is no longer populated in Filer
Trash does not work anymore in Filer, we need to reimplement it
Mounted volumes are not shown on the desktop, however they are still shown in the non-spatial Filer sidebar using correct icons and eject buttons -- we need to find a way to do a similar thing on the desktop! (Currently the volumes are taken from computer:/// while the non-spatial sidebar seems to do it differently.) Ideally we do this without Glib, using Qt native QStorageInfo.
Activity
probonopd commentedon Nov 28, 2020
Webkit for Gtk? Just to mount LAN shares? Why?
probonopd commentedon Mar 6, 2021
We should replace gvfs with something simpler, such as a combination of Zeroconf for detecting network devices and some custom code for (FUSE-)mounting them.
[-]gvfs dependencies take up 103 MiB[/-][+]Replace gvfs[/+]DamjanJovanovic commentedon Mar 20, 2021
What package are those dependencies for?
Neither gvfs git nor gvfs-1.47.90 source code contain the word "webkit".
webkit2-gtk3-2.30.2's required-by (and their entire ancestry of required-by) does not include gvfs.
What ports branch is this from?
probonopd commentedon Mar 20, 2021
D'uh, I should have written this down. I think this was what happened when I tried to
sudo pkg install gvfson a FreeBSD 12.1 system.DamjanJovanovic commentedon Mar 20, 2021
The GOOGLE option adds this dependency chain:
devel/gvfs -> devel/libgdata -> net/gnome-online-accounts -> webkit2-gtk3
GOOGLE was set to off by default by this change, you probably tried gvfs before that:
probonopd commentedon Mar 20, 2021
Thank you very much. This kind of stuff is what I mean with "gvfs is entangled with a stack we don't want in helloSystem". It is biased toward using the Red Hat stack. Otherwise there would be an option to use Qt WebEngine instead of
webkit2-gtk3.DamjanJovanovic commentedon Mar 20, 2021
You're welcome. I still think you get further by understanding the software stack, and then customizing it to your requirements.
"Keep your friends close, keep your enemies closer." If we monitored GNOME's development activity, we would know about these problems before they get unleashed on poor users. If we studied and developed gvfs further, we could make it work with Qt WebEngine if need be, without upstream help.
"Cloning doesn't work against a fast competitor", Eric Schmidt, ex-CEO of Google in his "Unwinnable Wars" talk. Consider how a decade of Btrfs development failed to out-compete ZFS, and it took LLVM $50 million dollars and many years to develop Clang to the point where it began out-competing GCC. By comparison, one 8000 line project, bsdisks, quickly got every file manager on every desktop working better than HAL did, not because it reimplemented the entire GNOME stack, but because it developed one small component in just the right place, that got both gvfs and Solid singing and dancing to our tune.
probonopd commentedon Mar 20, 2021
I need to learn more about
bsdisks.DamjanJovanovic commentedon Mar 20, 2021
It looks somewhat like this. gvfs and Solid use libudisks to make DBus calls to the UDisks2 DBus service, which uses udev (now part of systemd), and various Linux kernel subsystems to expose devices, partitions, filesystems and operations and events on them over DBus. The deeper you go, the more it becomes a Linux-only setup.
bsdisks pretends to be UDisks2, implementing the same DBus functions, but using FreeBSD technologies like devd, CAM, and GEOM underneath, it can mount ZFS; software above is none the wiser.
Written in C++ with Qt, which makes DBus development particularly easy, it's only about 8000 lines compared to udisks2's 38000+ lines of C/glib. It doesn't do everything yet, there is no RAID, swap, it can't format drives, etc. but those APIs don't seem generally useful, I think they're there just for GNOME Disks to consume.
probonopd commentedon Mar 20, 2021
Now we are talking :-)
Would it be possible to use bsdisks directly in Filer, without the need for gvfs and other Gnome-ish stuff, maybe even without D-Bus?
DamjanJovanovic commentedon Mar 20, 2021
I believe Filer should work with bsdisks (report if not), but it has to use DBus.
Use at least bsdisks version 0.25, released a few days ago.
DamjanJovanovic commentedon Mar 20, 2021
Also don't be scared of D-Bus. It's not the prettiest but it's organized and you get used to it. The entire object tree can be inspected. It's well tooled and scriptable. All traffic can be monitored with dbus-monitor. It's a heaven send compared to Microsoft's COM, in which traffic can't be monitored, there is little to no tooling and scripting, and you have to dig through the Windows registry to find things.
probonopd commentedon Mar 20, 2021
Yes, and since many existing applications depend on it, I guess we just have to live with it for now. Still I find it way too convoluted. That whole
/vs.thing alone, and the inablity of root to send messages to non-root userland.DamjanJovanovic commentedon Mar 20, 2021
The system bus should allow root and user processes to communicate. Only session buses are specific to user login sessions. A process can be on multiple buses, eg. gvfs is on the session bus for desktop apps to access it, and on the system bus to call UDisks2/bsdisks.
Each bus connection has a bus name like ":1.2", and can also request a nicer name like "org.freedesktop.NetworkManager" if exporting a service. Within a service, it exports objects, in a hierarchy of paths similar to a filesystem. Those objects are only unique to that service, not globally unique, which is why you always specify the bus name too when calling them. Objects have interfaces, and each interface has properties that can be read and/or written, and methods that can be called.
Only paths to objects have "/", everything else has ".":
some.service -> /path/to/object -> some.interface.and.method
dbus-send --print-reply --dest=some.service /path/to/object some.interface.and.method
probonopd commentedon Mar 20, 2021
Yes, maybe it's just me but I find all of this utterly confusing. What is a path and what is an object and why are they not one and the same. Why do I need separate buses.
DamjanJovanovic commentedon Mar 23, 2021
Separate session buses for users allow multi-seat and thin client configurations, as well as (in theory) secure communication between eg. apps and keyring. System buses are for global system-wide state, though in practice they're not always used that way, eg. Pulseaudio was criticized for using the session bus for audio instead of the system bus (even though audio is global in a single-user system) and breaking audio in apps running as a different user account (eg. some people ran Wine as a separate user to isolate its files from their main account) (don't know if it still does).
kettle-7 commentedon May 24, 2021
30 is enough to make my head hurt.
In other words, I'm no help here.
probonopd commentedon Nov 12, 2022
We could use
sshfsto mount SSH shares. That would have the added benefit that not only Filer, but all applications could access them from a path, e.g., inside/media, like every other volume.To make this happen, we need to use the
SSH_ASKPASSenvironment variable.But: How can we get the equivalent of
which currently pops up when accessing ssh via Filer? Since these strings are not in Filer source code, they must be coming from somewhere else... gvfs!
https://github.com/GNOME/gvfs/blob/ab4d7ba1da44ab94e05c74ac9f3ad2835e402768/daemon/gvfsbackendsftp.c#L934
How can we achieve the same thing but without gvfs?
Does https://github.com/lxqt/lxqt-openssh-askpass/ handle this? If so, how?
Does the following have to do with it?
In the meantime, we could use
-o StrictHostKeyChecking=nobut that's not ideal.Also, when running this from outside of a terminal:
Then it asks for a password even if no password has been set for
username.probonopd commentedon Nov 12, 2022
I have it working using lxqt-openssh-askpass/.
The dialogs could be nicer, but it's a start.
The trick is:
probonopd commentedon Nov 12, 2022
Now we need a way for Filer to learn about Zeroconf without Gnome-ish dependencies, and show sftp services here:
Alternatively (probably better), get rid of the
network:///thing altogether. No one knows where it is. It has no place on the filesystem. Make Command+N justlaunch Zeroconffor now.probonopd commentedon Nov 12, 2022
The whole gfvs is an overcomplicated mess.
Just using @vermaden's excellent
automount, FUSE sshfs and the like is so much more Unix philosophy.I am so sick and tired of cryptic messages like this that point to other complicated mess:
So, gvfs must go. And D-Bus should be replaced by something way simpler where one does not need "privileges".
grahamperrin commentedon Nov 12, 2022
Can anyone direct us to a server, for test purposes?
Primarily, to tell what happens when two or more people aim for concurrent edition of a single file.
IIRC, there's loss of data with only one winner.
probonopd commentedon Nov 12, 2022
Most likely. Is that handled differently by gvfs?
I mean, what happens if you do the same on a local filesystem? Who saves last wins. Some applications set a watch on the file and inform the user in case it has been edited elsewhere.
grahamperrin commentedon Nov 12, 2022
Most relevant is probably fcntl(2):
grahamperrin commentedon Nov 12, 2022
Maybe more useful to think about things that are not fixed, or enhanced, to work with GVfs.
Resolved, fixed (2016-02-11):
probonopd commentedon Nov 19, 2022
As a result
computer:///is no longer populated in Filercomputer:///while the non-spatial sidebar seems to do it differently.) Ideally we do this without Glib, using Qt native QStorageInfo.Remove gvfs-isms like trash:// and computer://
Remove gvfs