Re: What is the right way to do auto-mounting with Nautilus 2.22?



On Sun, 2008-03-16 at 13:20 -0400, Joe Marcus Clarke wrote:
> We're having a bit of trouble with getting auto-mounting to work
> correctly in Nautilus 2.22.  That is, we want to continue to 2.20
> behavior of Nautilus showing removable media icons on the desktop and
> under Computer when CDs and USB drives are inserted.  With the inclusion
> of gvfs and gio, it's kind of confusing where things like
> gnome-volume-manager fit it.
> 
> Initially, users were complaining that when they inserted a CD, it would
> get auto-mounted under /media twice.  For example, if I insert a CD with
> label "CD for Marcus" I would see two mounts under /media: /media/CD for
> Marcus and /media/CD for Marcus_.  It turns out that this was a race
> between g-v-m and Nautilus, both wanting to mount the volume.
> 
> So, trying to fix this, we found an Ubuntu patch (see
> 00_disable_media_handling in
> https://launchpad.net/ubuntu/hardy/+source/gnome-volume-manager/2.22.1-1ubuntu2/+files/gnome-volume-manager_2.22.1-1ubuntu2.diff.gz) that disabled all of g-v-m's auto-mounting features with the caveat that this would break encrypted drive mounting.  Okay, having unencrypted volumes get mounted correctly was more important so we tried it out.  This patch worked great for CDs.  Only one instance was mounted.  However, things did not work well for USB drives.
> 
> When a USB drive is inserted, sometimes (most times) Nautilus would
> ignore it.  It would never get mounted, even if one logged out, and
> logged back into GNOME.  If the volume did get mounted, the drive icon
> would not disappear from the desktop when it was unmounted.
> 
> So, my questions are these.  How do g-v-m and Nautilus fit together now?
> Is g-v-m required any more to mount removable media?  What are other
> Linux distributions doing about this?  Is this a bug in that USB drives
> should be readily mounted by Nautilus?  Is there a way to debug this
> problem so that a useful bug report can be filed?
> 
> FreeBSD is currently using glib-2.16.1 (FAM monitor backend),
> gvfs-0.2.0.1, and nautilus-2.22.0.  Thanks for any advice you can offer.

I have found one of the culprits causing this problem.  FreeBSD's
hald-addon-storage never told hald it was ready, so the block device was
not being properly added.  After fixing this, USB drives now auto-mount.

However, the other side of the problem is really a gio problem.  FreeBSD
doesn't have an mtab file, and thus Nautilus never gets updated about
changing mounts.  If I hack gio to use hal's /media/.hal-mtab file, I
get nearly perfect results, though only hal-controlled mounts are
updated.

Alexander, would it be doable to add a timeout source or an idle source
to gio when there is no mtab file?  This way, gio can periodically poll
for mount changes, and signal other applications.  Thanks.

Joe

-- 
Joe Marcus Clarke
FreeBSD GNOME Team      ::      gnome FreeBSD org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome

Attachment: signature.asc
Description: This is a digitally signed message part



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