RE: Nautilus unmount volume, also power-off?
- From: Alexander Larsson <alexl redhat com>
- To: Simos Xenitellis <simos lists googlemail com>
- Cc: 'GNOME Desktop Devel' <desktop-devel-list gnome org>
- Subject: RE: Nautilus unmount volume, also power-off?
- Date: Tue, 05 Feb 2008 09:52:26 +0100
On Mon, 2008-02-04 at 14:08 +0000, Simos Xenitellis wrote:
> On Mon, 2008-02-04 at 13:55 +0100, Jan de Groot wrote:
> > > -----Oorspronkelijk bericht-----
> > > Van: desktop-devel-list-bounces gnome org [mailto:desktop-devel-list-
> > > bounces gnome org] Namens Simos Xenitellis
> > > Verzonden: maandag 4 februari 2008 12:58
> > > Aan: GNOME Desktop Devel
> > > Onderwerp: Nautilus unmount volume, also power-off?
> > >
> > > Hi All,
> > >
> > > Currently Nautilus offers the option to either unmount or eject (if
> > > suitable) a volume, such as an external USB harddisk or flash drive.
> > >
> > > There has been discussion in user forums if it is possible to power off
> > > those external storage devices as well,
> > > http://ubuntuforums.org/showthread.php?mode=hybrid&t=451344
> > > http://www.techteam.gr/index.php?showtopic=118719
> > >
> > > A way to implement the "unmount+poweroff" in Nautilus is to create a
> > > Nautilus action that calls "umount", then "sdparm --command=stop", and
> > > there is such a script circulating the forums.
> > >
> > > ...
> > >
> > > I am wondering if there are any gotchas to this approach.
> >
> > Nice proposal, though I think this shouldn't be done by nautilus, but should
> > be exported by hal as command so any program can call the specific command
> > without adding extra code. Hal knows what volumes on a device are mounted
> > and which are not. And hal is the place where we should put these
> > platform-specific things (I can imagine that sdparm won't work on FreeBSD or
> > Solaris for example).
>
> The way I see it implemented at the moment, I think that it would
> require changes in
> http://svn.gnome.org/viewvc/glib/trunk/gio/gunixmount.c?view=annotate
> (see around line 350).
> That's by following how "umount" and "eject" are implemented.
> I think the code uses already HAL to figure out which devices are
> mounted.
The gunixmount.c code is only the fallback code used for "traditional"
unixes. For modern unixes the ghalmount.c code in gvfs is used. This
uses hal and gnome-mount for unmounting. I think that is a better place
to put magic like this.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]