FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Desktop

 
 
LinkBack Thread Tools
 
Old 11-11-2008, 09:03 AM
Martin Pitt
 
Default Unmounting removable devices

Hi James,

James Westby [2008-11-10 17:22 -0500]:
> Secondly, there is no notification when you just yank out a
> removable device, and no real indication that you should unmount
> before doing so, so it's not obvious to new users.

We already did have that in edgy to gutsy, while we were using
gnome-volume-manager. It wasn't particularly robust, but it worked:

http://people.ubuntu.com/~pitti/tmp/95_ubuntu_auto_unmount_notifications.patch

> There is an open bug report about the second,
>
> https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/208730

Right, something like above patch would be necessary in nautilus.

> which has no comment in the linked upstream bug. From a brief look
> gio has signals that could easily implement it, but I'm not sure
> that nautilus is the correct place to implement it.

It is IMHO, since nautilus now does the automounting and handling of
media.

> The second is the more philosophical one, should we be doing this?
> If so, what should it look like? Panel applet? Notification icon?
> Something else?

Applet is too sticky IMHO. It should just be a 30 second notification
bubble, like in previous releases.

My *real* preference would be to fix the kernel to make the vfat
'flush' mode actually work. This is in between 'sync' (which is flash
damaging and unbearably slow) and the currently used 'async' (which
has a too lax write-back policy). In short, 'flush' does write
caching, but flushes more often, and blocks close() until everything
is written. That means that things like copy file dialogs or programs
which save documents stay around until everything is written properly,
and it doesn't actually hurt (much) any more to just rip out the
device. ('flush' currently only exists for vfat, though, and it's not
working for me either)

Martin

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

--
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
 
Old 11-11-2008, 01:23 PM
James Westby
 
Default Unmounting removable devices

On Tue, 2008-11-11 at 11:03 +0100, Martin Pitt wrote:
> > which has no comment in the linked upstream bug. From a brief look
> > gio has signals that could easily implement it, but I'm not sure
> > that nautilus is the correct place to implement it.
>
> It is IMHO, since nautilus now does the automounting and handling of
> media.

One issue I see is that nautilus doesn't currently link against
libnotify. Do you know what produces the messages on successful
unmount that Matthew mentioned?

Thanks,

James


--
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
 
Old 11-11-2008, 06:09 PM
James Westby
 
Default Unmounting removable devices

On Tue, 2008-11-11 at 09:23 -0500, James Westby wrote:
> On Tue, 2008-11-11 at 11:03 +0100, Martin Pitt wrote:
> > > which has no comment in the linked upstream bug. From a brief look
> > > gio has signals that could easily implement it, but I'm not sure
> > > that nautilus is the correct place to implement it.
> >
> > It is IMHO, since nautilus now does the automounting and handling of
> > media.
>
> One issue I see is that nautilus doesn't currently link against
> libnotify. Do you know what produces the messages on successful
> unmount that Matthew mentioned?

The messages apparently come from gnome-mount, but are only shown in
some cases from what I can see.

It is not appropriate to extend that, as it can only act when invoked
to unmount something, so it can't act when something is removed without
being unmounted.

I have a 20 line python script that implements what I would like by
hooking up gio and libnotify. I'm looking for somewhere appropriate
to put it. nautilus may be appropriate, but I'm having a bit of trouble
seeing how to use their particular brand of gtk+. I wondered if it could
be done as a nautilus extension, but that doesn't look feasible from the
little documentation that I could find.

Another place would be gnome-settings-daemon, but it's not a good fix
their in terms of intent.

Thanks,

James


--
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
 
Old 11-11-2008, 10:15 PM
"(``-_-´´) -- Fernando"
 
Default Unmounting removable devices

Olá James e a todos.

On Monday 10 November 2008 22:22:40 James Westby wrote:
> Currently I find unmounting removable devices in GNOME is less than
> optimal for a couple of reasons.
>
> Firstly, I don't think I should have to open nautilus or go to the
> desktop to do this, though it's not the end of the world. Secondly,
> there is no notification when you just yank out a removable device, and
> no real indication that you should unmount before doing so, so it's not
> obvious to new users.
>
> I use the drive mount applet to overcome the first issue, but it
> doesn't solve the second.

I've been using the mount applet too, since its the easiest way to access all my mounts.
I see a balloon when I unplug my pendrives.
Actually I see 2 balloons... one for half a second telling me that data is still being write to disk (even if nothing has been written in hours) and just after that a new balloon telling me I can remove the device.
I guess there's some test that runs, shows the 1st balloon, and only then ejects the pen.

--
BUGabundo )
(``-_-´´) http://LinuxNoDEI.BUGabundo.net
Linux user #443786 GPG key 1024D/A1784EBB
My new micro-blog @ http://BUGabundo.net
ps. My emails tend to sound authority and aggressive. I'm sorry in advance. I'll try to be more assertive as time goes by...

--
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
 
Old 11-12-2008, 08:20 AM
Martin Pitt
 
Default Unmounting removable devices

Hi James,

James Westby [2008-11-11 14:09 -0500]:
> The messages apparently come from gnome-mount, but are only shown in
> some cases from what I can see.

Ah, indeed. No gnome-mount when a device is ripped out.

> I have a 20 line python script that implements what I would like by
> hooking up gio and libnotify.

Hm, it sounds as if that were a daemon which would need to run all the
time? IMHO having a permanenlty running python blob for just this task
is a bit too heavy. Or is it just producing the notification? Then
using the binary in libnotify-bin might be sufficient, and avoids
dynamic linking (although I don't think that it hurts to link nautilus
against libnotify).

> I'm looking for somewhere appropriate to put it. nautilus may be
> appropriate, but I'm having a bit of trouble seeing how to use their
> particular brand of gtk+.

Is that any special? My gut feeling is that adding it to nautilus is
appropriate, since it already listens to gio/hal events and thus can
easily detect the hal "device removed" event, too. It could then just
either use libnotify or libnotify-bin to produce the notification.

> I wondered if it could be done as a nautilus extension, but that
> doesn't look feasible from the little documentation that I could
> find.

I'm afraid I don't know anything about nautilus-extensions either.

> Another place would be gnome-settings-daemon, but it's not a good fix
> their in terms of intent.

Agreed. Maybe gvfs-hal-volume-monitor or gvfsd. Discussing that with
davidz might yield some more insights/options.

Thanks,

Martin

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
--
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
 
Old 11-12-2008, 02:56 PM
James Westby
 
Default Unmounting removable devices

On Wed, 2008-11-12 at 10:20 +0100, Martin Pitt wrote:
> > I have a 20 line python script that implements what I would like by
> > hooking up gio and libnotify.
>
> Hm, it sounds as if that were a daemon which would need to run all the
> time? IMHO having a permanenlty running python blob for just this task
> is a bit too heavy. Or is it just producing the notification? Then
> using the binary in libnotify-bin might be sufficient, and avoids
> dynamic linking (although I don't think that it hurts to link nautilus
> against libnotify).

Oh, I was just stating that doing it is really easy thanks to gio and
libnotify. I don't think running something else for this is a good idea
either.

> > I'm looking for somewhere appropriate to put it. nautilus may be
> > appropriate, but I'm having a bit of trouble seeing how to use their
> > particular brand of gtk+.
>
> Is that any special? My gut feeling is that adding it to nautilus is
> appropriate, since it already listens to gio/hal events and thus can
> easily detect the hal "device removed" event, too. It could then just
> either use libnotify or libnotify-bin to produce the notification.

Yeah, it's just my inexperience with C/gtk+.

> > Another place would be gnome-settings-daemon, but it's not a good fix
> > their in terms of intent.
>
> Agreed. Maybe gvfs-hal-volume-monitor or gvfsd. Discussing that with
> davidz might yield some more insights/options.

That could be good as well.


I have a preliminary patch for this, but I was finding oddness when
testing it. When I pulled out the storage without unmounting the device
was unmounted. I don't see how my patch changed this. One thing that
I did while playing with this was to remove gnome-volume-manager, which
could be related. You said that we don't use that anymore, is it still
installed by default? Since when is it not "used". Do you know how this
could cause the mount to be removed on removal?

Thanks,

James



--
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
 

Thread Tools




All times are GMT. The time now is 04:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org