can i use udev rules to send a dbus signal

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

 



hi all

I met a problem . Does anybody help me ?
I wrote a udeve rules for ntfs filesystem mount , and i want to using
dbus-send to send a dbus signal .But it seems it can not work . When I
debuge, i saw /var/log/message said it send ok. But , in fact , it can
not work. Does anybody know this issue?

PS: When exec udev rules, it should be root , and i am using a normal
user to debug and see result.


[fan@fc13 rules.d]$ cat 10-media-by-label-auto-mount.rules |grep -v ^#
KERNEL!="sd[b-z][0-9]", GOTO="media_by_label_auto_mount_end"
IMPORT{program}="/sbin/blkid -o udev -p %N"
ENV{dir_name}="usb-%k"
ENV{DISPLAY}=":0.0"

ACTION=="add", ENV{ID_FS_TYPE}=="ntfs",
ENV{mount_options}="relatime,utf8,gid=100,umask=002", RUN+="/bin/mkdir
-p /media/%E{dir_name}", RUN+="/bin/mount -t ntfs-3g -o
$env{mount_options} /dev/%k /media/%E{dir_name}",
RUN+="/usr/bin/nautilus --no-desktop /media/%E{dir_name}",
RUN+="/bin/dbus-send --session --type=signal /
com.zhou.dbustest.sayhelloworld"


ACTION=="remove", RUN+="/bin/umount -l /media/%E{dir_name}",
RUN+="/bin/rmdir /media/%E{dir_name}"
LABEL="media_by_label_auto_mount_end"
[fan@fc13 rules.d]$

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux