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

Re: Is gnome-core *really* the gnome minimal install?

Quoting Patrick Bartek (nemommxiv@gmail.com):
> On Mon, 13 Apr 2015, David Wright wrote:
> > Quoting Patrick Bartek (nemommxiv@gmail.com):
> > > On Sun, 12 Apr 2015, briand@aracnet.com wrote:
> > > > i'll second the use of openbox.  i use it with fbpanel.
> > > > i too believe that gnome just pulls in way too much "stuff".
> > > > the most inconvenient thing about not using gnome is not having a way
> > > > to handle USS mass storage devices.
> > >
> > > I wrote a generic udev rule for that.  Of course, there are also
> > > mounting utilities that do the same thing.  But I opted for the
> > > light-on-resources rule instead.
> The rule mounts and unmounts flash drives -- just plug and unplug -- and
> cards (any type using an external card or multi-card reader.  The
> caveat is: you must plug the card in first, then plug the reader in.
> Unmount by unplugging reader with the card still in it, then remove the
> card. Doesn't work with internal multi-card readers.  Probably not with
> single internal readers either.  For that you need a daemon like
> udisks-daemon set to poll each card slot of the reader.  

Thanks for posting that. I've got some homework to do!

I can understand the plugging in, and I think I understand the bit
about card readers: if I plug an SD card into my laptop slot, it
appears in a completely different manner from how it appears if the
SD card is in a USB converter (the "card reader").

So in goes the USB plug, udev applies the rule and the device gets

But I don't understand how unplugging works. My experience is that
with FAT-ish devices, if sync has been executed and time elapsed,
the only problem with pulling the plug (not having umounted) is that
the user may not be able to umount the mount point, but need to do it
as root. With extX filesystems, that wouldn't work at all because the
filesystem would still be marked as dirty.

Are you using some sort of safe-to-remove-hardware button like windows?

> # remove the symbolic link to ~/{usb_folder}
> ACTION=="remove", RUN+="/bin/rm -f '/home/aardvark/Desktop/%E{dir_name}'"
> # clean up after device removal
> ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l '/media/%E{dir_name}'", RUN+="/bin/rmdir '/media/%E{dir_name}'"

I need to figure out precisely what terms like "detach", "clean up"
and "busy" mean in man umount -l.


Reply to: