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

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

On Wed, 15 Apr 2015, David Wright wrote:

> 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
> mounted.
> 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}'"

The above code fragment is for systems that have a desktop GUI.  As I
only use a window manager, I don't have a desktop, and commented these
ACTIONs out.

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

The rule I posted applied only to mounting and unmounting USB
flash/thumb drives.  I also wanted to mount memory cards.  I discovered
by trial and error that if I put a memory card in a reader and then
plugged in the reader, the rule "thought" it was a flash drive, and
mounted it. Unplugging the combination would unmount it.  Removing just
the card while the reader was still plugged it didn't work properly.

To get readers (external or internal) to work "correctly" requires
polling each card slot in the reader and a rule to recognize when a
card is inserted much as one would detect a CD insert in a CD drive.  I
began by writing a rule for my CD drive since it require polling,
too, and got it to mount the CD, but never got the unmounting part to
work.  I got sidetracked by other things during the rule's
troubleshooting and never got back to it.


Reply to: