On Fri, 2006-11-24 at 12:05 +0000, Neil Woolford wrote: > On Fri, 2006-11-24 at 12:47 +1100, Graeme Gill wrote: > > Neil Woolford wrote: > > > > > The key point is that the filename for the .rules file for the device > > > must start with a number higher than 40. This means that the mode > > > setting in the udev rule will be processed after rather than before the > > > system defaults in file 40-permissions.rules. So 39-dtp94.rules will be > > > overridden by the defaults, 41-dtp94.rules won't be. > > > > Right. Most of the doco recommends the opposite, on the assumption > > that the purpose of your new .rules file is to create a specific > > device name. I would guess that your approach will only work if the > > 40-permissions.rules creates a /dev entry for usb devices, in the > > form that libusb is looking for (/dev/bus/usb/00M/00N). This appears to be handled in an earlier file, 20-names.rules, on Ubuntu 6.06. > > My system for instance, has no such rule in the 40-permissions.rules file, > > so I suspect your approach wouldn't work since there is nothing > > to change the mode of. Perhaps you could identify the rule in > > your 40-permissions.rules file that creates the /dev/bus/usb/* > > The rule is a short section of code that I guess walks the tree of potential devices; I'm no programmer though... > I'll have another look later in the day, but what appears to be > happening in my (Ubuntu 6.06) 40-permissions.rules file is the setting > of default permissions for (groups of) devices, rather than the creation > of device entries themselves. > > Later rules files apply over earlier ones so the default permission > overrides the one set specifically for the device or vice versa > depending on the lexical order of the filenames. > > The files I'm looking at in .../udev/rules.d may of course be Ubuntu > specific; I noticed that one of the original posters was using Ubuntu > as I currently am. I've an experimental Mandriva setup on the laptop so > I'll look at that too. It does look horribly like there is a wide variation between distributions in the implementation of udev rules; certainly the rule currently given in the installation instructions section of the Argyllcms website works perfectly as 10-dtp94.rules on the Mandriva Free 2007 but not on Ubuntu 6.06. (The contents of the ..../rules.d directories are very different as well.) To summarise my findings so far; the installation instructions work fine on Mandriva Free 2007: Ubuntu 6.06 however requires a rule placed after the default permissions file 40-permissions.rules and won't work with both the use of = rather than == in the tests and the NAME assignment at the end of the line. So unfortunately there is a swamp here because of variation in udev implementation and rule sets between distributions. Neil PS It is possible to set assignment to not be altered by following rules by using := rather than = as the operator. Perhaps something like; BUS=="usb", SYSFS{idVendor}=="0765", SYSFS{idProduct}=="d094",\ MODE:="666" as 10-dtp94.rules might work on a larger range of distributions? Or would the removal of the kernel name section cause problems? Feedback from those with other systems please...