通过ssh获取gvfs元数据

我有一个gvfs守护进程的问题

我有一个挂载的gvfsd-fuse

$ mount | grep gvfs gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000) 

在pc1上(不使用ssh)

 $ gvfs-info -w $HOME  Writable attribute namespaces: metadata (string, Copy with file, Keep with file when moved) xattr (string, Copy with file, Keep with file when moved) xattr-sys (string, Keep with file when moved) 

但是当我在这台机器上使用ssh登录时

 $ ssh -X user@pc1 $ gvfs-info -w $HOME  Writable attribute namespaces: xattr (string, Copy with file, Keep with file when moved) xattr-sys (string, Keep with file when moved) 

缺少元数据部分,当我在ssh上使用nautilus并且我更改每个文件夹设置(即缩放或文件排序)时,这是必需的。

 $ ssh -X user@pc1 $ nautilus => changing the zoom level for example, then change folder, go back, the zoom setting is lost (reset to default) this does not happen when I log physically on this machine. 

好的,几个小时后我找到了答案。

似乎没有为远程ssh会话启动dbus守护程序。

所以使用现有的DBUS_SESSION_BUS_ADDRESS失败了,但我在这里找到了一个解决方案:

 $ ssh -X user@pc1 "gnome-terminal -e 'dbus-launch --exit-with-session bash'" $ nautilus 

我启动一个新的会话总线或在X显示器上找到现有的总线地址,以便应用程序可以与gvfs守护进程通信。