Re: Help needed with using gnomevfs/gvfs



On Thu, 2009-04-23 at 10:10 +0200, Andreas Heinlein wrote:
> Hello,
> 
> I need to write a small app which will catch volume mounts and unmounts
> as well as drive insertions/removal.
> 
> I have written a Perl daemon for that, which hooks to the signals
> "drive-connected", "drive-disconnected", "volume-mounted" and
> "volume-pre-unmount" of a Gnome2::VFS::VolumeMonitor object. Getting
> "volume-mounted" or the disk signals works just fine, but I never get
> "volume-pre-unmount".
> 
> I have no idea why, I already asked on the gtk2-perl mailing list but
> got no answer. In addition, I noticed that I am not getting
> "drive-connected" any more und Ubuntu Jaunty when the drive in question
> contains no recognized file system. This is bad because one use for this
> app is to auto-mount TrueCrypt encrypted volumes.
> 
> I suspect this has to do with deprecation of GnomeVFS, but Python and
> Perl (the languages I know best) bindings for GVFS seem to not exist or
> are badly documented.
> 
> Can anyone help me with this?

You only get volume-pre-unmount when unmounting via gnome-vfs. And
unfortunately, everything in the desktop now unmounts via gio, so you
need to use that to get this.

GVfs has no bindings, because it doesn't have an API, its purely an
extension of glib. All the API is in gio (in glib), which is availible
at least in the python bindings.




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