* rules and RUN key
@ 2005-11-22 23:01 Mangus
2005-11-22 23:18 ` Kay Sievers
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mangus @ 2005-11-22 23:01 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1752 bytes --]
Hi all, I'm trying to study the RUN key of udev rules, but I really don't
understand why this rule doesn't work..
BUS=="usb", SYSFS{product}="Sony DSC", KERNEL="sda1", ACTION=="add",
SYMLINK+="digitalcamera", RUN="/opt/kde/bin/digikam"
the symlink 'digitalcamera is correctly done in /dev and I can easily mount it
but the RUN key seems not executed.
Does the RUN command has to be executed when a rule is matched?
what I'm missing or doing wrong??
root@saturno:~# udevtest /sys/block/sda/sda1 usb
main: looking at device '/block/sda/sda1' from subsystem 'usb'
add_to_rules: error parsing SYSFS attribute in 'BUS'
main: opened class_dev->name='sda1'
udev_rules_get_name: add symlink 'digitalcamera'
udev_rules_get_name: reset run list
udev_rules_get_name: rule applied, 'sda1' becomes 'sda1'
create_node: creating device node '/dev/sda1', major = '8', minor = '1', mode
= '0660', uid = '0', gid = '6'
create_node: creating symlink '/dev/digitalcamera' to 'sda1'
root@saturno:~# udevmonitor
udevmonitor prints the received event from the kernel [UEVENT]
and the event which udev sends out after rule processing [UDEV]
UEVENT[1132699412.958174] add@/devices/pci0000:00/0000:00:03.3/usb1/1-1
UEVENT[1132699413.031376]
add@/devices/pci0000:00/0000:00:03.3/usb1/1-1/1-1:1.0
UEVENT[1132699413.038090] add@/class/scsi_host/host3
UEVENT[1132699413.189695] add@/class/usb_device/usbdev1.5
UEVENT[1132699418.191140]
add@/devices/pci0000:00/0000:00:03.3/usb1/1-1/1-1:1.0/host3/target3:0:0/3:0:0:0
UEVENT[1132699418.250136] add@/block/sda
UEVENT[1132699418.308443] add@/block/sda/sda1
UEVENT[1132699418.354008] add@/class/scsi_device/3:0:0:0
thanks for hints and explanations
--
Fede
Be cool - get Slack.
--
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rules and RUN key
2005-11-22 23:01 rules and RUN key Mangus
@ 2005-11-22 23:18 ` Kay Sievers
2005-11-23 11:26 ` Harald Hoyer
2005-11-23 18:44 ` Mangus
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2005-11-22 23:18 UTC (permalink / raw)
To: linux-hotplug
On Wed, Nov 23, 2005 at 12:01:29AM +0100, Mangus wrote:
> Hi all, I'm trying to study the RUN key of udev rules, but I really don't
> understand why this rule doesn't work..
>
> BUS="usb", SYSFS{product}="Sony DSC", KERNEL="sda1", ACTION="add",
> SYMLINK+="digitalcamera", RUN="/opt/kde/bin/digikam"
You don't want to run root level programs from udev to show up in your
desktop session. This also can't work, cause digikam has no X display.
Usually a process in your user session subscribes to device events from
HAL and starts applications as the logged-in user.
Kay
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id\x16845&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rules and RUN key
2005-11-22 23:01 rules and RUN key Mangus
2005-11-22 23:18 ` Kay Sievers
@ 2005-11-23 11:26 ` Harald Hoyer
2005-11-23 18:44 ` Mangus
2 siblings, 0 replies; 4+ messages in thread
From: Harald Hoyer @ 2005-11-23 11:26 UTC (permalink / raw)
To: linux-hotplug
Kay Sievers wrote:
> On Wed, Nov 23, 2005 at 12:01:29AM +0100, Mangus wrote:
>
>>Hi all, I'm trying to study the RUN key of udev rules, but I really don't
>>understand why this rule doesn't work..
>>
>>BUS="usb", SYSFS{product}="Sony DSC", KERNEL="sda1", ACTION="add",
>>SYMLINK+="digitalcamera", RUN="/opt/kde/bin/digikam"
>
>
> You don't want to run root level programs from udev to show up in your
> desktop session. This also can't work, cause digikam has no X display.
>
> Usually a process in your user session subscribes to device events from
> HAL and starts applications as the logged-in user.
>
> Kay
>
Also RUN+= would be better.
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id\x16845&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: rules and RUN key
2005-11-22 23:01 rules and RUN key Mangus
2005-11-22 23:18 ` Kay Sievers
2005-11-23 11:26 ` Harald Hoyer
@ 2005-11-23 18:44 ` Mangus
2 siblings, 0 replies; 4+ messages in thread
From: Mangus @ 2005-11-23 18:44 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]
Alle 00:18, mercoledì 23 novembre 2005, Kay Sievers ha scritto:
> On Wed, Nov 23, 2005 at 12:01:29AM +0100, Mangus wrote:
> > Hi all, I'm trying to study the RUN key of udev rules, but I really don't
> > understand why this rule doesn't work..
> >
> > BUS=="usb", SYSFS{product}="Sony DSC", KERNEL="sda1", ACTION=="add",
> > SYMLINK+="digitalcamera", RUN="/opt/kde/bin/digikam"
>
> You don't want to run root level programs from udev to show up in your
> desktop session. This also can't work, cause digikam has no X display.
>
yeah, that's right, my fault , thanks
> Usually a process in your user session subscribes to device events from
> HAL and starts applications as the logged-in user.
>
> Kay
ok, but the RUN key is intended to run external script as root, isn't it?
like modprobe commands or whethever
so why this rule don't execute the command?
BUS=="usb", SYSFS{product}=="Sony DSC", KERNEL=="sda1", ACTION=="add",
SYMLINK+="digitalcamera", RUN+="/sbin/modprobe fuse"
fuse module for example is not loaded
is my version of udev too old?
it's udev64
thanks
--
Fede
Be cool - get Slack.
--
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-11-23 18:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-22 23:01 rules and RUN key Mangus
2005-11-22 23:18 ` Kay Sievers
2005-11-23 11:26 ` Harald Hoyer
2005-11-23 18:44 ` Mangus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).