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

Re: udev - easy setup ?

Apparently, _Nate Bargmann_, on 05/08/05 08:03,typed:
> * Jules Dubois <j6bqszk02@sneakemail.com> [2005 Aug 05 01:15 -0500]:
>>The message I half-finished writing and accidentally sent, the one that
>>mentions "Apple developer documents".  I discovered that the only
>>interesting parts of Apple's stuff is extracted from the official USB docs. 
>>I sent another message like it but with real information.
> Okay, thanks.
>>>I've been watching this thread with interest.  So 
>>>far I've not tried udev and I'm wondering if it's worth it.
>>I think it's worth it, but I use only a small fraction of its capabilities. 
>>When I first installed it, I didn't do any sort of configuration.  I didn't
>>see any difference in how my system worked, until I looked in /dev where
>>the dozens (hundreds?) of device nodes I don't use were gone.
> Well, that should restore some inodes back to the system at the very
> least.
>>I've since created a few rules which while handy and pretty are nothing to
>>get excited about.  The OP wants to do the kind of thing for which udev is
>>designed.  I use keys like SYSFS{vendor} and these don't meet Uwe's
>>requirements.  However, I don't understand enough about USB or kernel
>>internals to do more than take an insufficiently educated guess about how
>>to proceed.
> So what I understand is that udev is a great framework, but it hasn't
> been sufficiently implemented in user space to be "plug and play"? 
> Perhaps the desktop projects are working on utilizing it.
> I don't like comparing Debian and Windows, but here is an experience
> from yesterday.  I have an IBM T42 at work without a 3.5" floppy drive,
> of course.  Since more of these things are showing up, we decided it
> might be wise to get a USB floppy.  We got it yesterday, new in the
> box.  I plugged it into the T42 which runs XP, of course, and the OS
> picked it right up, assigned it as drive A, and I went right to
> formatting a disk in it and copying a file.  Didn't even need the
> driver CD.
> I realize that Debian provides a base and that works like KNOPPIX and
> Ubuntu are building on Debian to provide a more user centric
> distribution.  But, this USB stuff is so basic that it should "just
> work".  If Windows isn't confused and can distinguish between a USB
> floppy and assign it as A and then I can install my Lexar Jump Drive
> and it can figure out that it's different and assign it as E and then I
> can attach my portable CD/DVD RW drive and assign it as F, we in the
> Linux community should be able to do that as well with minimal hassle.
> On the other hand, I just yanked the Jump Drive while a file manager
> had it open and that has apparently caused a major problem.  I have
> error boxes popping open and diagnostic information coming up, so in
> that regard, I know that Linux is much more robust.

You are not supposed to yant it like that, neither in Windows not in
Linux. In Windows, you "Safely Remove" a USB device and in Linux you
umount that device prior to removing.

> Right now I have some custom Hotplug scripts for my Jump Drive and my
> camera.  They are a kludge, but they get the job done.

I tried reading about Udev rules and was able to make devices for my
digital camera and my USB card reader (this was a few months ago when
auto-detection wasn't working so well in Unstable). I ended up with
rules something like:
IF DETECTED: my digicam: THEN MAKE DEV /dev/my-digicam

And I had a mount point in /media called say "canon" which mounted
"/dev/my-digicam". I could mount this by clicking on "canon" icon in
"Computer" folder of Gnome desktop. At that time, this was the closes I
could get to ease of use for Windows (I was setting up my wife's laptop
with all this, and wanted it to be as seamless as it was in Windows for

Having described all this, I now realize that if you are using gnome and
you have udev, hal and gnome-volume-manager, you don't need to do all
this stuff. If I plug in a 256MB USB stick, I get an icon on my desktop
with an appropriate name, all automatically. When I umount it (right
clicking on the icon on desktop), the icon dissappears and the device is
unmounted, again all automatically. I asked my wife to try this. She
found it no different than in Windows in terms of ease of use. And
regarding digital cameras, they are also auto-detected using digikam or
gtkam with libgphoto2.

So in the end, I know that udev rule making is tedious, but it works.
But I am also not sure how to make general rules for USB sticks separate
from floppies -- but I can't say I have looked much. In any case, at
least in Gnome, one does't really need to make any rules anymore. And I
guess the upcoming KDE will also have this
auto-detect-auto-mount-auto-unmount feature.

my $0.02.

> - Nate >>

Please remove the underscores ( the '_' symbols) from my email address
to obtain the correct one. Apologies, but the fudging is to remove spam.

Reply to: