<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Writing udev rules, short notes</title>
	<atom:link href="http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/feed/" rel="self" type="application/rss+xml" />
	<link>http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/</link>
	<description>Open Source, The Web, And German-American Oddities</description>
	<pubDate>Thu, 04 Dec 2008 18:48:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: toxic</title>
		<link>http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-123073</link>
		<dc:creator>toxic</dc:creator>
		<pubDate>Thu, 13 Mar 2008 17:12:29 +0000</pubDate>
		<guid isPermaLink="false">http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-123073</guid>
		<description>Zoobave, replace PROGRAM=="/path/to/prog" with RUN+="/path/to/prog" and it should work given that your other matching rules are in place. Don't forget to reload the config either.</description>
		<content:encoded><![CDATA[<p>Zoobave, replace PROGRAM==&#8221;/path/to/prog&#8221; with RUN+=&#8221;/path/to/prog&#8221; and it should work given that your other matching rules are in place. Don&#8217;t forget to reload the config either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Walt R</title>
		<link>http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-96191</link>
		<dc:creator>Walt R</dc:creator>
		<pubDate>Sun, 18 Nov 2007 04:44:06 +0000</pubDate>
		<guid isPermaLink="false">http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-96191</guid>
		<description>I have been fighting udev for a while, and can not figure out how to write a udev rule that works with ppp0.  In order to access the Internet, I manually entered: ln -s /dev/ppp /dev/ppp0

Thank you, Walt</description>
		<content:encoded><![CDATA[<p>I have been fighting udev for a while, and can not figure out how to write a udev rule that works with ppp0.  In order to access the Internet, I manually entered: ln -s /dev/ppp /dev/ppp0</p>
<p>Thank you, Walt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zoobave</title>
		<link>http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-55535</link>
		<dc:creator>Zoobave</dc:creator>
		<pubDate>Wed, 20 Jun 2007 06:24:48 +0000</pubDate>
		<guid isPermaLink="false">http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-55535</guid>
		<description>finally, i put the following entry in "/etc/udev/rules.d/01-local.rules" file.

SUBSYSTEM=="usb_device", ACTION=="add", ATTRS{manufacturer}=="JetFlash", PROGRAM="/usr/bin/nautilus ", NAME="%c", MODE="0777"


if i test using then following command, the nautilus starts

dvm@dvm-desktop:~$ udevtest /sys/class/usb_device/usbdev4.5/ 


parse_file: reading '/etc/udev/rules.d/00- init.rules' as rules file
parse_file: reading '/etc/udev/rules.d/01-local.rules' as rules file
parse_file: reading '/etc/udev/rules.d/05-options.rules' as rules file
parse_file: reading '/etc/udev/rules.d/10- myrule.rules' as rules file
parse_file: reading '/etc/udev/rules.d/20-names.rules' as rules file
parse_file: reading '/etc/udev/rules.d/25-dmsetup.rules' as rules file
parse_file: reading '/etc/udev/rules.d/25- iftab.rules' as rules file
parse_file: reading '/etc/udev/rules.d/30-cdrom_id.rules' as rules file
parse_file: reading '/etc/udev/rules.d/40-permissions.rules' as rules file
parse_file: reading '/etc/udev/rules.d/45- fuse.rules' as rules file
parse_file: reading '/etc/udev/rules.d/45-hplip.rules' as rules file
parse_file: reading '/etc/udev/rules.d/45-libgphoto2.rules' as rules file
parse_file: reading '/etc/udev/rules.d/45- libsane.rules' as rules file
parse_file: reading '/etc/udev/rules.d/50-xserver-xorg-input-wacom.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60-libpisock.rules' as rules file
parse_file: reading '/etc/udev/rules.d/60- symlinks.rules' as rules file
parse_file: reading '/etc/udev/rules.d/65-persistent-input.rules' as rules file
parse_file: reading '/etc/udev/rules.d/65-persistent-storage.rules' as rules file
parse_file: reading '/etc/udev/rules.d/80-programs.rules' as rules file
parse_file: reading '/etc/udev/rules.d/85-alsa.rules' as rules file
parse_file: reading '/etc/udev/rules.d/85-brltty.rules ' as rules file
parse_file: reading '/etc/udev/rules.d/85-hdparm.rules' as rules file
parse_file: reading '/etc/udev/rules.d/85-hplj10xx.rules' as rules file
parse_file: reading '/etc/udev/rules.d/85-hwclock.rules ' as rules file
parse_file: reading '/etc/udev/rules.d/85-ifupdown.rules' as rules file
parse_file: reading '/etc/udev/rules.d/85-pcmcia.rules' as rules file
parse_file: reading '/etc/udev/rules.d/90- modprobe.rules' as rules file
parse_file: reading '/etc/udev/rules.d/95-hal.rules' as rules file
parse_file: reading '/etc/udev/rules.d/99-udevmonitor.rules' as rules file
This program is for debugging only, it does not run any program,
specified by a RUN key. It may show incorrect results, if rules
match against subsystem specfic kernel event variables.

main: looking at device '/class/usb_device/usbdev4.5' from subsystem 'usb_device'
run_program: '/usr/bin/nautilus '
run_program: '/usr/bin/nautilus' returned with status 0
udev_rules_get_name: rule applied, 'usbdev4.5' becomes ''
run_program: 'usb_device_name --export usbdev4.5'
run_program: '/lib/udev/usb_device_name' (stdout) 'USB_BUS=004'
run_program: '/lib/udev/usb_device_name' (stdout) 'USB_DEV=005'
run_program: '/lib/udev/usb_device_name' returned with status 0
run_program: 'check_ptp_camera 06/01/01'
run_program: '/lib/udev/check_ptp_camera' returned with status 1
udev_device_event: device node creation supressed
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: 'socket:/org/kernel/udev/monitor'





but, when i insert the same device, it will not run the program automatically.  How can i modify the above entry to run the nautilus (or any program) automatically?</description>
		<content:encoded><![CDATA[<p>finally, i put the following entry in &#8220;/etc/udev/rules.d/01-local.rules&#8221; file.</p>
<p>SUBSYSTEM==&#8221;usb_device&#8221;, ACTION==&#8221;add&#8221;, ATTRS{manufacturer}==&#8221;JetFlash&#8221;, PROGRAM=&#8221;/usr/bin/nautilus &#8221;, NAME=&#8221;%c&#8221;, MODE=&#8221;0777&#8243;</p>
<p>if i test using then following command, the nautilus starts</p>
<p>dvm@dvm-desktop:~$ udevtest /sys/class/usb_device/usbdev4.5/ </p>
<p>parse_file: reading &#8216;/etc/udev/rules.d/00- init.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/01-local.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/05-options.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/10- myrule.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/20-names.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/25-dmsetup.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/25- iftab.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/30-cdrom_id.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/40-permissions.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/45- fuse.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/45-hplip.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/45-libgphoto2.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/45- libsane.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/50-xserver-xorg-input-wacom.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/60-libpisock.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/60- symlinks.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/65-persistent-input.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/65-persistent-storage.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/80-programs.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/85-alsa.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/85-brltty.rules &#8216; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/85-hdparm.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/85-hplj10xx.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/85-hwclock.rules &#8216; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/85-ifupdown.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/85-pcmcia.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/90- modprobe.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/95-hal.rules&#8217; as rules file<br />
parse_file: reading &#8216;/etc/udev/rules.d/99-udevmonitor.rules&#8217; as rules file<br />
This program is for debugging only, it does not run any program,<br />
specified by a RUN key. It may show incorrect results, if rules<br />
match against subsystem specfic kernel event variables.</p>
<p>main: looking at device &#8216;/class/usb_device/usbdev4.5&#8242; from subsystem &#8216;usb_device&#8217;<br />
run_program: &#8216;/usr/bin/nautilus &#8216;<br />
run_program: &#8216;/usr/bin/nautilus&#8217; returned with status 0<br />
udev_rules_get_name: rule applied, &#8216;usbdev4.5&#8242; becomes &#8216;&#8217;<br />
run_program: &#8216;usb_device_name &#8211;export usbdev4.5&#8242;<br />
run_program: &#8216;/lib/udev/usb_device_name&#8217; (stdout) &#8216;USB_BUS=004&#8242;<br />
run_program: &#8216;/lib/udev/usb_device_name&#8217; (stdout) &#8216;USB_DEV=005&#8242;<br />
run_program: &#8216;/lib/udev/usb_device_name&#8217; returned with status 0<br />
run_program: &#8216;check_ptp_camera 06/01/01&#8242;<br />
run_program: &#8216;/lib/udev/check_ptp_camera&#8217; returned with status 1<br />
udev_device_event: device node creation supressed<br />
main: run: &#8217;socket:/org/freedesktop/hal/udev_event&#8217;<br />
main: run: &#8217;socket:/org/kernel/udev/monitor&#8217;</p>
<p>but, when i insert the same device, it will not run the program automatically.  How can i modify the above entry to run the nautilus (or any program) automatically?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-55208</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Tue, 19 Jun 2007 14:52:13 +0000</pubDate>
		<guid isPermaLink="false">http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-55208</guid>
		<description>The rules files live in /etc/udev/rules.d, as written in the &lt;a href="http://www.reactivated.net/writing_udev_rules.html#files" rel="nofollow"&gt;"files" part of the howto&lt;/a&gt;.

And yes you will need to reload the udev rules (or reboot if you like), which they describe in the &lt;a href="http://www.reactivated.net/writing_udev_rules.html#files" rel="nofollow"&gt;testing section&lt;/a&gt;. Hope this helps!</description>
		<content:encoded><![CDATA[<p>The rules files live in /etc/udev/rules.d, as written in the <a href="http://www.reactivated.net/writing_udev_rules.html#files" rel="nofollow">&#8220;files&#8221; part of the howto</a>.</p>
<p>And yes you will need to reload the udev rules (or reboot if you like), which they describe in the <a href="http://www.reactivated.net/writing_udev_rules.html#files" rel="nofollow">testing section</a>. Hope this helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zoobave</title>
		<link>http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-55153</link>
		<dc:creator>Zoobave</dc:creator>
		<pubDate>Tue, 19 Jun 2007 12:39:07 +0000</pubDate>
		<guid isPermaLink="false">http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-55153</guid>
		<description>i did, but, i couldn't understand where to write . my program is in "/usr/local/zoobave/start".
i want to start this application, whenever i insert any USB devices. Where i put these entries? is their any need to restart or reload udev?</description>
		<content:encoded><![CDATA[<p>i did, but, i couldn&#8217;t understand where to write . my program is in &#8220;/usr/local/zoobave/start&#8221;.<br />
i want to start this application, whenever i insert any USB devices. Where i put these entries? is their any need to restart or reload udev?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-55099</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Tue, 19 Jun 2007 09:40:51 +0000</pubDate>
		<guid isPermaLink="false">http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-55099</guid>
		<description>Zoobave: You want to read the &lt;a href="http://www.reactivated.net/writing_udev_rules.html" rel="nofollow"&gt;udev howto&lt;/a&gt; to find that out. It is very detailed and shows you what udev can do and how you can make it do what you want.</description>
		<content:encoded><![CDATA[<p>Zoobave: You want to read the <a href="http://www.reactivated.net/writing_udev_rules.html" rel="nofollow">udev howto</a> to find that out. It is very detailed and shows you what udev can do and how you can make it do what you want.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zoobave</title>
		<link>http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-55096</link>
		<dc:creator>Zoobave</dc:creator>
		<pubDate>Tue, 19 Jun 2007 09:29:29 +0000</pubDate>
		<guid isPermaLink="false">http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-55096</guid>
		<description>if i want to run a particular application whenever an USB is plugged, what i have to do with udev and how can i write its rules?</description>
		<content:encoded><![CDATA[<p>if i want to run a particular application whenever an USB is plugged, what i have to do with udev and how can i write its rules?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-132</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Sun, 19 Mar 2006 21:41:24 +0000</pubDate>
		<guid isPermaLink="false">http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-132</guid>
		<description>Dan, thanks for the additional info. I like the idea to use device labels. While udev rules are perfect for USB printers / scanners etc., for mounting block devices instead, the label solution seems to be much easier.</description>
		<content:encoded><![CDATA[<p>Dan, thanks for the additional info. I like the idea to use device labels. While udev rules are perfect for USB printers / scanners etc., for mounting block devices instead, the label solution seems to be much easier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-131</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Sun, 19 Mar 2006 21:20:29 +0000</pubDate>
		<guid isPermaLink="false">http://fredericiana.com/2006/03/15/writing-udev-rules-short-notes/#comment-131</guid>
		<description>Another (possibly easier) way to get at the disk you want is to use ext2 labels. You give a filesystem a label, and then refer to it during mounting via the label instead of the device name. This also survives if you have to replace the machine/OS; the label info is stored in the filesystem itself, whereas the udev conf is specific to that OS instance.

Of course, if you're not using ext2 (or ext3), you can't use ext2 labels.

Yet another way to overcome devices switching about might be to use LVM. This isn't quite as transparent as ext2 labels, tho. You'll have to activate volume groups when you plug in drives. It'll be transparent across reboots and OS's, though.

-- Dan</description>
		<content:encoded><![CDATA[<p>Another (possibly easier) way to get at the disk you want is to use ext2 labels. You give a filesystem a label, and then refer to it during mounting via the label instead of the device name. This also survives if you have to replace the machine/OS; the label info is stored in the filesystem itself, whereas the udev conf is specific to that OS instance.</p>
<p>Of course, if you&#8217;re not using ext2 (or ext3), you can&#8217;t use ext2 labels.</p>
<p>Yet another way to overcome devices switching about might be to use LVM. This isn&#8217;t quite as transparent as ext2 labels, tho. You&#8217;ll have to activate volume groups when you plug in drives. It&#8217;ll be transparent across reboots and OS&#8217;s, though.</p>
<p>&#8211; Dan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
