Re: Automounting GVFS systems when devices are added?



On Mon, 2008-10-13 at 13:50 +0200, Alexander Larsson wrote:
> On Sun, 2008-10-12 at 17:02 -0700, Patrick Walton wrote:
> > Hi,
> > 
> > I've been working on a GVFS backend for devices that use Apple File 
> > Control (iPhone, iPod Touch, etc.). These devices use a proprietary SSL 
> > connection, including certificate exchange, over a custom TCP-like 
> > protocol over USB, meaning that a userspace daemon is the only feasible 
> > way to communicate with them. I chose GVFS over the existing FUSE 
> > implementation because FUSE is not very well integrated with the desktop 
> > and is Linux-specific. (The code is at 
> > http://github.com/pcwalton/gvfs-nw/tree/iphone for the curious.)

This is great news.
 
> > It is essentially working, but I'm not sure what to do about 
> > automounting. When the user plugs in a supported device, I want to 
> > automatically gvfs-mount afc://com.apple.afc/. Given that as I 
> > understand it policy is not supposed to be implemented in HAL (which is 
> > possibly being deprecated in favor of DeviceKit in the future anyway?) 
> > what is the recommended way to do this?
> 
> If you make the hal volume monitor show the plugged in iPhone as a
> (mountable) GVolume then the nautilus code should automount this for you
> as needed (i think). 

Actually you really want a separate volume monitor [1], see the gphoto2
volume monitor (monitor/gphoto2 in the gvfs tree) for details on how to
write one; it should be straightforward [3].

     David

[1] : The reason is that we eventually want to move to using
DeviceKit-disks / gnome-disk-utility [2] instead of HAL, for monitoring
connected block devices. Specifically, that was one reason the gphoto2
volume monitor was split out from the HAL monitor.

[2] : http://blog.fubar.dk/?p=103

[3] : Yeah... this adds yet another gvfs process... see 

 http://mail.gnome.org/archives/gvfs-list/2008-October/msg00021.html

for some thoughts on how we can deal with that if it's a problem.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]