← Back to team overview

lubuntu-desktop team mailing list archive

Re: How To Access PCs on Local Network

 

On 11/24/2011 12:47 PM, ∅ wrote:

> On 11/24/2011 12:15 PM, Jonathan Marsden wrote:


>> Feel free to document all the protocols gvfs handles, if you think
>> that would benefit Lubuntu users. Please don't just document the
>> one protocol you happen to be using :)


> Actually I have a question about this. Does this mean, then, that
> gvfs can do sshfs?


Yes, it can, as an intentional side-effect of using GVFS.

> If so, wow. DIdn't know that! I've been doing it manually for
> forever.


I tend to do many network-related tasks "the hard way" too :)

gvfs can "plug in" new file access protocols; the gvfs-backends package
provides quite a few, as a starting point.  I don't know of a quick and
easy way to ask it "which schemas do you support" (there is apparently a
documented GVFS API function for this ( const gchar * const *
g_vfs_get_supported_uri_schemes(GVfs *vfs); ), but I'm not sure if this
is global, or only queries one existing pre-specified VFS).  I have not
found a little utility that lists them -- there probably is one, I just
have not found it yet!).

The approach Swapnil is working with is with the ssh:// schema, which
uses sftp, and (because of the way GVFS works) therefore provides a FUSE
filesystem under ~/.gvfs/ -- which is effectively sshfs.

To see this in action, run pcmanfm, type in

  ssh://you@192.168.0.2

give it the password for you on the ssh server at 192.168.0.2, and then
press F4.  You will find yourself in a shell in the remote sftp filesystem.

Using sftp like this works nicely for file management tasks like
copying, renaming, and deleting files, but is not efficient for normal
POSIX application file access (example: opening a file, doing random
access seeks and reads within it, modifying a few bytes in the middle of
the file, closing the file).  So, as I see it, using sftp works well for
the kinds of operations that a file manager (like pcmanfm) usually needs
to do, but not so well for actually running applications that access and
modify files on the remote file server.  For that, SMB or NFS would
probably be preferable. (I also have no idea how or whether sftp/sshfs
deal with file locking).

I have not tried them all with pcmanfm, but gvfs can use other schemas
such as http://, ftp://, dav://, obex:// (for doing fun things like
accessing files on your cellphone over bluetooth), gphoto2:// (access to
connected digital cameras), and cdda:// (access to audio CDs)... I do
not yet know how many of those work by default in Lubuntu and pcmanfm
via gvfs-backends.  Based on gvfs-backends documentation, I *think* it
should handle all of afc, archive, cdda, dav, dnssd, ftp, gphoto2, http,
network, obexftp, sftp, smb and smb-browse, at minimum.

In my very limited testing, pcmanfm also appears to support menu:// and
computer:// .

If Swapnil is writing a detailed comparison of Nautilus and pcmanfm,
then when comparing their capabilities, I would think that document will
include specifics of which schemas each file manager can handle, and
hopefully also how well each file manager handles each one.  (Maybe,
since both use GVFS, they both support exactly the same set of schemas,
I simply don't know).  That comparison should be a good article to read,
once it is completed, so I look forward to that.  It could lead to some
possible future enhancements for pcmanfm.

A way to have pcmanfm display all the available schemas that it knows
how to use could be useful.  Maybe in the network:/// screen it could
show an icon for each one?  But part of the issue there is that not all
protocols include a browse mechanism to locate all local servers using a
given protocol, so displaying a list of servers when you click on a
particular protocol may not be practical (you'd have to port scan your
network to generate a list, which is obviously not a good idea!).

At minimum, pcmanfm could include a Help database or User Guide that
includes some basic information on each schema and what it is for, and
examples of how to use it.  Right now in pcmanfm, the only thing under
Help is About, which is... not really all that helpful :)

Jonathan


Follow ups

References