Udisksvm GUI UDisks wrapper without writing udev rules

The scripts udisksvm and traydvm are now written in python and use the gobject introspection approach.
Here is the link in AUR:
https://aur.archlinux.org/packages/udisksvm/
Here is the README content for explanations:
The 'udisksvm' and 'traydvm' scripts operate between udisks2 and a window
manager with a mouse and a system tray available. They listen to events and act
accordingly with removable media.
The 'traydvm' GUI utility displays a systray icon showing a plugged-in device,
with a right-click menu to perform actions on it.
The icon represents a file system/partition on the disk; so if there are
several partitions, there are one icon for each file system on them.
With a MBR partition table, only primary partitions are managed presently.
udisks2------>udisksvm----------->traydvm--------->systray icon
| |
| |
V V
(automounting) right-click menu
(non optical disks only) |
|
V
commands to device media
|
|
V
notification
The automounting feature is disabled by default.
It can be enabled for non-optical disks with the '-a', '--auto' command line
option.
The old '-n', '--noauto' option is still recognized but not used anymore.
A notification pops up after a 'Mount' or 'Unmount' action by the right-click
menu.
This feature is enabled by default, and can be disabled by the '-s',
'--silent' command line option.
In its present form there are only three actions : 'Mount', 'Unmount', 'Eject'
The 'Mount' action operates on data optical disks, and on block devices with
plain partitions, ie not a container of other partitions or not contained in
another partition.
The 'Eject' action is only activated for an unmounted optical disk.
And only one CD/DVD drive at /dev/sr0 is considered.
The tooltip when the mouse pointer hovers over the icon gives the device name,
the label or the UUID and the state of the device, with the mountpoint, normally
in /run/media/<user_name>, where the mounted media can be accessed in a file
manager.
The 'traydvm' utility has no configuration file: the popup menu and the actions
are predefined in the script.
The 'udisksvm' and 'traydvm' scripts use the UDisks2 DBus API.
If used in a systemd configuration (default in Arch Linux) they also need to
be ran in an active systemd-logind session:
loginctl show-session $XDG_SESSION_ID
should have a line with 'Active=yes'
For example, in Openbox and Tint2 with systray enabled, only add this line in
$HOME/.config/openbox/autostart to launch udisksvm with default options and
without text output:
udisksvm >/dev/null &
To see output and errors from the script, run it in a console without the
redirection to /dev/null;
for more verbosity, run it with the '-d' or '--debug' option.
The file system types and mount options are controlled by UDisks2.
UDisks2 is rather restrictive presently:
'flush' is available for 'vfat' file system,
'sync' for 'ext2' file system.
These options are included in the scripts.
The traydvm script ignores all changes made to partitions or file
system types or label, while it is running; if such changes are made
on a device, while traydvm is running on it, the device has first to be
plugged out/in to re-launch traydvm on it.
These scripts can be extended to develop a more complete management of
removable media in a GUI oriented approach.
But they can simply be used as is, to automount, unmount or re-mount a USB
memory stick or an external disk, or for accessing data on optical CD/DVD
disks, only with mouse clicks.
They can also be used to only show system tray icons, with other tools to do
automounting or manual mounting/unmounting.
Edit for up to date infos with the 2.3.0 release.
See also other comments at the #58 post
Last edited by berbae (2013-12-18 15:20:57)

alleyoopster wrote:Is there a way of having the device volume label or the mount path reflected in the icons tooltips rather than the unhelpful uuid currently displayed?
The "DeviceMountPaths" property is an array of strings rather than a single string.
So if I use in default.xml :
<tooltip executable="/bin/echo">
<arg>-n</arg>
<ref>DeviceMountPaths</ref>
</tooltip>
I get a wrong format of text.
Initially I used a script named "echo-mount" instead of "/bin/echo" to reformat the output of the string array:
#!/bin/bash
# echo-mount script
MOUNTPATH=$(echo $1 |cut -d \' -f 2)
echo -n $MOUNTPATH
That gives something like /dev/sdb1 as tooltip text.
But I removed that to have something simpler.
Concerning the "IdLabel" property, it is not always there; if no label is set, the string is empty.
So I chose to use the "IdUuid" property which should be always available and is a single string.
It seemed easier to use and it is also the name of the folder in /media where udisks mounts the device.
But the default.xml configuration file could surely be modified to show the Label when it is available, something like :
<icon icon="gtk.STOCK_HARDDISK">
<displayed_if>
<and>
<match key="DeviceIsPartition" bool="true"/>
<match key="DeviceIsMounted" bool="true"/>
<not>
<match key="IdLabel" string=""/>
</not>
</and>
</displayed_if>
<!--
Tooltip text is "IdLabel" when it is mounted with a label.
-->
<tooltip executable="/bin/echo">
<arg>-n</arg>
<ref>IdLabel</ref>
</tooltip>
</icon>
<icon icon="gtk.STOCK_HARDDISK">
<displayed_if>
<and>
<match key="DeviceIsPartition" bool="true"/>
<match key="DeviceIsMounted" bool="true"/>
<match key="IdLabel" string=""/>
</and>
</displayed_if>
<!--
Tooltip text is "IdUuid" when it is mounted without a label
-->
<tooltip executable="/bin/echo">
<arg>-n</arg>
<ref>IdUuid</ref>
</tooltip>
</icon>
I didn't test it yet on my machine.
But if you test it, can you tell me please if it works as expected ?
So I could incoporate the change more quickly in the AUR package.
Thanks for your contribution.
Last edited by berbae (2011-05-14 15:46:53)

Similar Messages

  • Writing udev rules [SOLVED]

    Hi guys.
    I'm on a mission to run win7 on QEMU, and I also want to be able to use my USB-ports. Now, archwiki tells me to do this:
    $ qemu-system-i386 -usbdevice host:vendor_id:product_id disk_image
    You can find vendor_id and product_id of your device with lsusb command.
    Note: If you encounter permission errors when running QEMU, see Udev#Writing udev rules for information on how to set permissions of the device.
    I then made a file called 10-adm.rules both in, /etc/udev/rules.d and /usr/lib/udev/rules.d
    In it I wrote:
    KERNEL=="sdc[0-9]*",  GROUP="storage"
    My user with wich i lauch QEMU is in the group storage, and my usb always turns out as sdc*.
    But it still gives me the permission erros.
    Last edited by kimbo (2014-11-28 14:06:24)

    now I renamed the files to 99 instead of 10, and I even overkilled it with the GROUP:= instead of GROUP=
    tried:
    udevadm control --reload-rules
    udevadm trigger
    But it still doesnt work
    lsusb gives me:
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 004: ID 18a5:0302 Verbatim, Ltd Flash Drive
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 002: ID 04f2:b23b Chicony Electronics Co., Ltd
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 002: ID 04ca:3002 Lite-On Technology Corp.
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    And my qemu-launch-commad it:
    qemu-system-x86_64 -m 1G -enable-kvm -cpu host -usbdevice host:18a5:0302 win7
    oh, I dont really undestand what you by ' the group that /dev/sdc* ends up having'
    Last edited by kimbo (2014-11-13 23:04:47)

  • My /etc/udev/rules.d is empty? [SOLVED]

    The other week i installed a virtal inviroment in QEMU, i read a little bit about writing udev-rules, in order to work with USB. but for some reason.. the folder in mentioned in the topic happends to be empty.. and it just strikes me, because when gogling the problem it seems that the people it happend to before, it also ment that the system didnt work, or worked really bad, but my system works fine.. Now, as i allready mentioned, i bumped in to this problem the other week. i have been searching for some obvious noskillmistake, but.. i gave up and just turned to you guys instead.
    Last edited by kimbo (2014-11-13 18:02:04)

    That folder is empty for me too, because I haven't put anything there.  Have you created files there that disappeared?  If not, what's the issue?  You say everything is working ... so what's the question?

  • [Solved] Auto-open a file manager after mounting with udev rules

    Hellooooo,
    I followed the udev Wiki for auto mounting USBs and it now works great.
    The only problem is: how can I automatically open a file manager of the mounted directory? I tried putting this at the end of the "ACTION=="add"," section in "/etc/udev/rules.d/11-media-by-label-auto-mount.rules" but for some reason nothing happens:
    , RUN+="/usr/bin/dolphin /media/%E{dir_name}"
    Even if I just try to open dolphin with the "ACTION=="add"," section nothing happens either way.
    So what am I doing wrong?
    Last edited by algorythm (2011-05-05 12:35:56)

    In that case, the best choice in my opinion is to use Automounting UDisks Wrappers :
    devmon is a script developed by IgnorantGuru. He left Arch Linux, but the package in AUR is still there and is the last version. For a future new release, it should be available at his blog site. The script is distro independent.
    My udisksvm script, in its default state, doesn't launch a file manager after automounting, but it is not a big thing to let the automounting be done and then manually open a file manager (a new entry in the traydevice right-click menu can also be added for that).
    If you can do without automounting, there is also the bashmount script from jnguyen.
    All these scripts don't require writing any udev rules, they use udisks instead.
    I hope you could find something you like and which will suit your wishes.

  • Using disk label on udev rules?

    Hello,
    Until just a few hours ago, when I plugged my external hard drive in I had to run a script to mount it with sudo, as I couldn't get it automounted. Then I saw a workaround in some thread over here, using the udev rules proposed at the bottom of the Udev wiki article.
    After a reboot, and after some hours I didn't remember I had created that rule, so I went to konsole and run my script, which returned "Disc not found". That's because it checks there is that device under /dev/disk/by-label/. As I checked afterwards, the disk was automounted on some directory under /media, but it there were no symlinks to it nor to my pendrive under /dev/disk. This is a problem as my script did something like "mount /dev/disk/by-label/$LABEL /mnt/$LABEL", and Amarok's collection is under there, so if I change the collection directory every time I reboot (or every time I plug the disk) it might be mounted on a different directory (current one is /media/usbhd-sdb1), depending on the order I plug the usb storage devices, or even random if more than one is plugged on boot (not sure about this).
    I suppose this is because when I plug the disk (or pendrive) udev applies the first rule it finds, so I think a possible workaround for my problem is to change the mount directory on the udev rule. And here is where my question comes: I see NAME="%k" and then %k used as the device name under /dev (in this case sdb1). Could I use some variable to keep the label of the disk and then mount it on /mnt/$LABEL, for example? I think this way I couldn't automount any device without label, but every pendrive I've seen is labeled by default so that wouldn't be a problem.
    Thank you for reading that bible, and thank you again if you answer
    Bye!
    Edit: maybe this thread should be under Kernel & Hardware. If so, please move it
    Last edited by Surgat_ (2008-09-02 23:52:47)

    I think what you were looking for may have been $env{ID_FS_LABEL}.  I've got the following as my udev rules for getting automatically mounted drives with the mountpoint set to the partition label instead of just a number.  Not particularly robust when there are two partitions with the same label, but I haven't gotten around to writing a fix for it yet.  If it works for you, maybe we should put it on the wiki.
    KERNEL=="sd[b-z]", NAME="%k", SYMLINK+="usb%m", GROUP="users", OPTIONS="last_rule"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", SYMLINK+="usb%n", GROUP="users", NAME="%k"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/mkdir -p /mnt/usb%n"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/ln -s /mnt/usb%n /media/$env{ID_FS_LABEL}"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /dev/%k /mnt/usb%n", OPTIONS="last_rule"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /mnt/usb%n", OPTIONS="last_rule"
    ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/umount -l /mnt/usb%n"
    ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/rm /media/$env{ID_FS_LABEL}"
    ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/rmdir /mnt/usb%n", OPTIONS="last_rule"

  • [SOLVED] udev rule no longer working

    I have a udev rule set up to automatically mount an ext4 filesystem when I plug a certain thumb drive in.  It was working fine until yesterday (probably due to updates).  Here is the rule, in file /etc/udev/rules.d/99-gfk.rules:
    KERNEL=="sd?2", SUBSYSTEM=="block", ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6545", ATTRS{serial}=="1C6F654E4041ED601910053F", SYMLINK+="gfshare"
    ACTION=="add", KERNEL=="sd?2", SUBSYSTEM=="block", ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6545", ATTRS{serial}=="1C6F654E4041ED601910053F", RUN+="/bin/mkdir /media/gfshare"
    ACTION=="add", KERNEL=="sd?2", SUBSYSTEM=="block", ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6545", ATTRS{serial}=="1C6F654E4041ED601910053F", RUN+="/bin/mount -t ext4 -o ro,nosuid,nodev,noexec,noatime /dev/gfshare /media/gfshare"
    The symlink and the mkdir command are both working fine, but the mount command is not being run for some reason.  If I manually run the mount command it works fine.  Some possibly helpful output:
    # pacman -Qo $(which udevadm)
    /usr/bin/udevadm is owned by systemd 212-1
    # dmesg |tail -16
    [26458.120628] usb 7-1.3: new high-speed USB device number 7 using ehci-pci
    [26458.223059] usb-storage 7-1.3:1.0: USB Mass Storage device detected
    [26458.223825] scsi10 : usb-storage 7-1.3:1.0
    [26459.311607] scsi 10:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 4
    [26460.834081] sd 10:0:0:0: [sdd] 15240576 512-byte logical blocks: (7.80 GB/7.26 GiB)
    [26460.834931] sd 10:0:0:0: [sdd] Write Protect is off
    [26460.834935] sd 10:0:0:0: [sdd] Mode Sense: 23 00 00 00
    [26460.835617] sd 10:0:0:0: [sdd] No Caching mode page found
    [26460.835621] sd 10:0:0:0: [sdd] Assuming drive cache: write through
    [26460.839455] sd 10:0:0:0: [sdd] No Caching mode page found
    [26460.839460] sd 10:0:0:0: [sdd] Assuming drive cache: write through
    [26460.860579] sdd: sdd1 sdd2
    [26460.867111] sd 10:0:0:0: [sdd] No Caching mode page found
    [26460.867115] sd 10:0:0:0: [sdd] Assuming drive cache: write through
    [26460.867118] sd 10:0:0:0: [sdd] Attached SCSI removable disk
    [26461.041982] EXT4-fs (sdd2): mounted filesystem with ordered data mode. Opts: (null)
    # udevadm test /sys/bus/usb/devices/7-1.3
    calling: test
    version 212
    This program is for debugging only, it does not run any program
    specified by a RUN key. It may show incorrect results, because
    some values may be different, or not available at a simulation run.
    load module index
    timestamp of '/etc/systemd/network' changed
    timestamp of '/usr/lib/systemd/network' changed
    Parsed configuration file /usr/lib/systemd/network/99-default.link
    Created link configuration context
    timestamp of '/etc/udev/rules.d' changed
    Skipping overridden file: /usr/lib/udev/rules.d/80-net-setup-link.rules.
    read rules file: /usr/lib/udev/rules.d/10-dm.rules
    read rules file: /usr/lib/udev/rules.d/11-dm-lvm.rules
    read rules file: /etc/udev/rules.d/12-android.rules
    read rules file: /usr/lib/udev/rules.d/13-dm-disk.rules
    read rules file: /usr/lib/udev/rules.d/40-hpet-permissions.rules
    read rules file: /usr/lib/udev/rules.d/40-usb-media-players.rules
    read rules file: /usr/lib/udev/rules.d/42-usb-hid-pm.rules
    read rules file: /usr/lib/udev/rules.d/50-firmware.rules
    read rules file: /usr/lib/udev/rules.d/50-udev-default.rules
    read rules file: /usr/lib/udev/rules.d/51-android.rules
    read rules file: /usr/lib/udev/rules.d/60-cdrom_id.rules
    read rules file: /usr/lib/udev/rules.d/60-drm.rules
    read rules file: /usr/lib/udev/rules.d/60-keyboard.rules
    read rules file: /usr/lib/udev/rules.d/60-pcmcia.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-alsa.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-input.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-serial.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-storage-tape.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-storage.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-v4l.rules
    read rules file: /usr/lib/udev/rules.d/60-vboxdrv.rules
    read rules file: /usr/lib/udev/rules.d/61-accelerometer.rules
    read rules file: /usr/lib/udev/rules.d/63-md-raid-arrays.rules
    read rules file: /usr/lib/udev/rules.d/64-btrfs.rules
    read rules file: /usr/lib/udev/rules.d/64-md-raid-assembly.rules
    read rules file: /usr/lib/udev/rules.d/69-cd-sensors.rules
    read rules file: /usr/lib/udev/rules.d/69-dm-lvm-metad.rules
    read rules file: /usr/lib/udev/rules.d/69-libmtp.rules
    read rules file: /usr/lib/udev/rules.d/70-infrared.rules
    read rules file: /usr/lib/udev/rules.d/70-power-switch.rules
    read rules file: /usr/lib/udev/rules.d/70-uaccess.rules
    read rules file: /usr/lib/udev/rules.d/71-seat.rules
    read rules file: /usr/lib/udev/rules.d/73-seat-late.rules
    read rules file: /usr/lib/udev/rules.d/75-net-description.rules
    read rules file: /usr/lib/udev/rules.d/75-probe_mtd.rules
    read rules file: /usr/lib/udev/rules.d/75-tty-description.rules
    read rules file: /usr/lib/udev/rules.d/78-sound-card.rules
    read rules file: /usr/lib/udev/rules.d/80-drivers.rules
    read rules file: /etc/udev/rules.d/80-net-setup-link.rules
    read rules file: /usr/lib/udev/rules.d/80-udisks.rules
    read rules file: /usr/lib/udev/rules.d/80-udisks2.rules
    read rules file: /usr/lib/udev/rules.d/85-usbmuxd.rules
    read rules file: /usr/lib/udev/rules.d/90-alsa-restore.rules
    read rules file: /usr/lib/udev/rules.d/95-cd-devices.rules
    read rules file: /usr/lib/udev/rules.d/95-dm-notify.rules
    read rules file: /usr/lib/udev/rules.d/95-udev-late.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-dell.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-fujitsu.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-gateway.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-ibm.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-lenovo.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-toshiba.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-csr.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-hid.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-wup.rules
    read rules file: /etc/udev/rules.d/99-gfk.rules
    read rules file: /usr/lib/udev/rules.d/99-systemd.rules
    read rules file: /usr/lib/udev/rules.d/kino.rules
    rules contain 98304 bytes tokens (8192 * 12 bytes), 22360 bytes strings
    10092 strings (88570 bytes), 8317 de-duplicated (67986 bytes), 1776 trie nodes used
    IMPORT builtin 'usb_id' /usr/lib/udev/rules.d/50-udev-default.rules:9
    IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/50-udev-default.rules:9
    MODE 0664 /usr/lib/udev/rules.d/50-udev-default.rules:37
    GROUP 1002 /usr/lib/udev/rules.d/51-android.rules:387
    MODE 0660 /usr/lib/udev/rules.d/51-android.rules:387
    RUN '/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers' /usr/lib/udev/rules.d/60-vboxdrv.rules:6
    PROGRAM '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3 7 7' /usr/lib/udev/rules.d/69-libmtp.rules:1204
    starting '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3 7 7'
    '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3 7 7'(out) '0'
    '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3 7 7' [24644] exit with return code 0
    IMPORT builtin 'path_id' /usr/lib/udev/rules.d/71-seat.rules:43
    RUN 'uaccess' /usr/lib/udev/rules.d/73-seat-late.rules:15
    handling device node '/dev/bus/usb/007/007', devnum=c189:774, mode=0660, uid=0, gid=1002
    preserve permissions /dev/bus/usb/007/007, 020660, uid=0, gid=1002
    preserve already existing symlink '/dev/char/189:774' to '../bus/usb/007/007'
    ACTION=add
    BUSNUM=007
    DEVNAME=/dev/bus/usb/007/007
    DEVNUM=007
    DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3
    DEVTYPE=usb_device
    DRIVER=usb
    ID_BUS=usb
    ID_DRIVE_THUMB=1
    ID_FOR_SEAT=usb-pci-0000_00_1a_7-usb-0_1_3
    ID_MODEL=DataTraveler_2.0
    ID_MODEL_ENC=DataTraveler\x202.0
    ID_MODEL_FROM_DATABASE=Kingston DataTraveler 102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
    ID_MODEL_ID=6545
    ID_PATH=pci-0000:00:1a.7-usb-0:1.3
    ID_PATH_TAG=pci-0000_00_1a_7-usb-0_1_3
    ID_REVISION=0100
    ID_SERIAL=Kingston_DataTraveler_2.0_1C6F654E4041ED601910053F
    ID_SERIAL_SHORT=1C6F654E4041ED601910053F
    ID_USB_INTERFACES=:080650:
    ID_VENDOR=Kingston
    ID_VENDOR_ENC=Kingston
    ID_VENDOR_FROM_DATABASE=Toshiba Corp.
    ID_VENDOR_ID=0930
    MAJOR=189
    MINOR=774
    PRODUCT=930/6545/100
    SUBSYSTEM=usb
    TAGS=:seat:uaccess:
    TYPE=0/0/0
    USEC_INITIALIZED=26452326568
    adb_user=yes
    run: '/usr/share/virtualbox/VBoxCreateUSBNode.sh 189 774 00 vboxusers'
    run: 'uaccess'
    unload module index
    Unloaded link configuration context
    # udevadm test /sys/bus/usb/devices/7-1.3:1.0
    calling: test
    version 212
    This program is for debugging only, it does not run any program
    specified by a RUN key. It may show incorrect results, because
    some values may be different, or not available at a simulation run.
    load module index
    timestamp of '/etc/systemd/network' changed
    timestamp of '/usr/lib/systemd/network' changed
    Parsed configuration file /usr/lib/systemd/network/99-default.link
    Created link configuration context
    timestamp of '/etc/udev/rules.d' changed
    Skipping overridden file: /usr/lib/udev/rules.d/80-net-setup-link.rules.
    read rules file: /usr/lib/udev/rules.d/10-dm.rules
    read rules file: /usr/lib/udev/rules.d/11-dm-lvm.rules
    read rules file: /etc/udev/rules.d/12-android.rules
    read rules file: /usr/lib/udev/rules.d/13-dm-disk.rules
    read rules file: /usr/lib/udev/rules.d/40-hpet-permissions.rules
    read rules file: /usr/lib/udev/rules.d/40-usb-media-players.rules
    read rules file: /usr/lib/udev/rules.d/42-usb-hid-pm.rules
    read rules file: /usr/lib/udev/rules.d/50-firmware.rules
    read rules file: /usr/lib/udev/rules.d/50-udev-default.rules
    read rules file: /usr/lib/udev/rules.d/51-android.rules
    read rules file: /usr/lib/udev/rules.d/60-cdrom_id.rules
    read rules file: /usr/lib/udev/rules.d/60-drm.rules
    read rules file: /usr/lib/udev/rules.d/60-keyboard.rules
    read rules file: /usr/lib/udev/rules.d/60-pcmcia.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-alsa.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-input.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-serial.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-storage-tape.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-storage.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-v4l.rules
    read rules file: /usr/lib/udev/rules.d/60-vboxdrv.rules
    read rules file: /usr/lib/udev/rules.d/61-accelerometer.rules
    read rules file: /usr/lib/udev/rules.d/63-md-raid-arrays.rules
    read rules file: /usr/lib/udev/rules.d/64-btrfs.rules
    read rules file: /usr/lib/udev/rules.d/64-md-raid-assembly.rules
    read rules file: /usr/lib/udev/rules.d/69-cd-sensors.rules
    read rules file: /usr/lib/udev/rules.d/69-dm-lvm-metad.rules
    read rules file: /usr/lib/udev/rules.d/69-libmtp.rules
    read rules file: /usr/lib/udev/rules.d/70-infrared.rules
    read rules file: /usr/lib/udev/rules.d/70-power-switch.rules
    read rules file: /usr/lib/udev/rules.d/70-uaccess.rules
    read rules file: /usr/lib/udev/rules.d/71-seat.rules
    read rules file: /usr/lib/udev/rules.d/73-seat-late.rules
    read rules file: /usr/lib/udev/rules.d/75-net-description.rules
    read rules file: /usr/lib/udev/rules.d/75-probe_mtd.rules
    read rules file: /usr/lib/udev/rules.d/75-tty-description.rules
    read rules file: /usr/lib/udev/rules.d/78-sound-card.rules
    read rules file: /usr/lib/udev/rules.d/80-drivers.rules
    read rules file: /etc/udev/rules.d/80-net-setup-link.rules
    read rules file: /usr/lib/udev/rules.d/80-udisks.rules
    read rules file: /usr/lib/udev/rules.d/80-udisks2.rules
    read rules file: /usr/lib/udev/rules.d/85-usbmuxd.rules
    read rules file: /usr/lib/udev/rules.d/90-alsa-restore.rules
    read rules file: /usr/lib/udev/rules.d/95-cd-devices.rules
    read rules file: /usr/lib/udev/rules.d/95-dm-notify.rules
    read rules file: /usr/lib/udev/rules.d/95-udev-late.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-dell.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-fujitsu.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-gateway.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-ibm.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-lenovo.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-toshiba.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-csr.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-hid.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-wup.rules
    read rules file: /etc/udev/rules.d/99-gfk.rules
    read rules file: /usr/lib/udev/rules.d/99-systemd.rules
    read rules file: /usr/lib/udev/rules.d/kino.rules
    rules contain 98304 bytes tokens (8192 * 12 bytes), 22360 bytes strings
    10092 strings (88570 bytes), 8317 de-duplicated (67986 bytes), 1776 trie nodes used
    IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/50-udev-default.rules:11
    RUN 'kmod load $env{MODALIAS}' /usr/lib/udev/rules.d/80-drivers.rules:5
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3/7-1.3:1.0
    DEVTYPE=usb_interface
    DRIVER=usb-storage
    ID_MODEL_FROM_DATABASE=Kingston DataTraveler 102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
    ID_VENDOR_FROM_DATABASE=Toshiba Corp.
    INTERFACE=8/6/80
    MODALIAS=usb:v0930p6545d0100dc00dsc00dp00ic08isc06ip50in00
    PRODUCT=930/6545/100
    SUBSYSTEM=usb
    TYPE=0/0/0
    USEC_INITIALIZED=452326811
    run: 'kmod load usb:v0930p6545d0100dc00dsc00dp00ic08isc06ip50in00'
    unload module index
    Unloaded link configuration context
    Last edited by bentglasstube (2014-04-03 20:51:36)

    I see.  That is somewhat aggravating but I will find another way to achieve what I wanted I suppose.
    Thank you.  Should I mark this is solved or unsolvable or something?  Sorry, I'm new to posting on these forums.
    Edit:  I was able to achieve what I wanted with udevil as recommended by the wiki.
    Last edited by bentglasstube (2014-04-03 20:55:45)

  • [SOLVED]Udevd fails to recognize rules in /lib/udev/rules.d

    I've been having a few crashes since the update of udev earlier this week (so far only on my laptop where the Xserver hangs and requires a hard reboot to get anything working again).  While investigating the logs, I ran across the following errors:
    Oct 26 04:39:54 lswest-CULV [ 0.836513] udevd[74]: starting version 173
    Oct 26 04:39:54 lswest-CULV [ 17.450369] udevd[260]: starting version 174
    Oct 26 04:46:04 lswest-CULV [ 0.839752] udevd[74]: starting version 173
    Oct 26 04:46:04 lswest-CULV [ 8.778232] udevd[259]: starting version 174
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/42-qemu-usb.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/50-firmware.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/50-udev-default.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-cdrom_id.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-alsa.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-input.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-serial.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-storage-tape.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-storage.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-v4l.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/61-accelerometer.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/70-udev-acl.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/75-net-description.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/75-probe_mtd.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/75-tty-description.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/78-sound-card.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/80-drivers.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/42-qemu-usb.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/50-firmware.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/50-udev-default.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-cdrom_id.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-alsa.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-input.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-serial.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-storage-tape.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-storage.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-v4l.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/61-accelerometer.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/70-udev-acl.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/75-net-description.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/75-probe_mtd.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/75-tty-description.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/78-sound-card.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/80-drivers.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/81-arch.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/95-keyboard-force-release.rules': No such file or directory
    These errors have appeared since the 24th of October (the last marked update day for the udev package).  I'm also slightly concerned about the first 4 lines, where udevd "starts" version 173 and then version 174.  According to pacman -Q udev, only version 174 is installed.
    Upon investigating the folder, I find that all the "missing" files are present:
    [lswest@lswest-CULV: rules.d]% ls
    total 652K
    drwxr-xr-x 2 root root 4.0K Oct 26 11:01 ./
    drwxr-xr-x 5 root root 4.0K Oct 26 11:01 ../
    -r--r--r-- 1 root root 6.4K Aug 20 02:32 10-dm.rules
    -rw-r--r-- 1 root root 505 Aug 16 19:06 10-vboxdrv.rules
    -r--r--r-- 1 root root 1.3K Jul 7 2010 11-dm-lvm.rules
    -r--r--r-- 1 root root 1011 Nov 13 2009 13-dm-disk.rules
    -rw-r--r-- 1 root root 159K Nov 28 2010 40-gphoto.rules
    -rw-r--r-- 1 root root 26K Oct 4 11:56 40-usb-media-players.rules
    -rw-r--r-- 1 root root 764 Oct 19 23:43 42-qemu-usb.rules
    -rw-r--r-- 1 root root 1.8K Jul 30 18:31 45-libnjb.rules
    -rw-r--r-- 1 root root 219 Oct 19 23:43 50-firmware.rules
    -rw-r--r-- 1 root root 3.5K Oct 19 23:43 50-udev-default.rules
    -rw-r--r-- 1 root root 52K Jun 13 13:04 52-libmtp.rules
    -rw-r--r-- 1 root root 104K Oct 5 23:42 53-sane.rules
    -rw-r--r-- 1 root root 584 Oct 19 23:43 60-cdrom_id.rules
    -rw-r--r-- 1 root root 1.1K Aug 3 18:54 60-pcmcia.rules
    -rw-r--r-- 1 root root 616 Oct 19 23:43 60-persistent-alsa.rules
    -rw-r--r-- 1 root root 2.4K Oct 19 23:43 60-persistent-input.rules
    -rw-r--r-- 1 root root 947 Oct 19 23:43 60-persistent-serial.rules
    -rw-r--r-- 1 root root 6.0K Oct 19 23:43 60-persistent-storage.rules
    -rw-r--r-- 1 root root 1.4K Oct 19 23:43 60-persistent-storage-tape.rules
    -rw-r--r-- 1 root root 770 Oct 19 23:43 60-persistent-v4l.rules
    -rw-r--r-- 1 root root 46 Feb 9 2011 60-rfkill.rules
    -rw-r--r-- 1 root root 166 Oct 19 23:43 61-accelerometer.rules
    -rw-r--r-- 1 root root 369 Oct 17 15:34 61-gnome-bluetooth-rfkill.rules
    -rw-r--r-- 1 root root 2.2K Sep 14 09:07 64-md-raid.rules
    -rw-r--r-- 1 root root 40 Aug 12 18:32 65-kvm.rules
    -rw-r--r-- 1 root root 4.0K Oct 4 09:34 69-cd-sensors.rules
    -rw-r--r-- 1 root root 233 Jul 17 18:06 70-infrared.rules
    -rw-r--r-- 1 root root 2.6K Oct 19 23:43 70-udev-acl.rules
    -rw-r--r-- 1 root root 642 Oct 19 23:43 75-net-description.rules
    -rw-r--r-- 1 root root 254 Oct 19 23:43 75-probe_mtd.rules
    -rw-r--r-- 1 root root 642 Oct 19 23:43 75-tty-description.rules
    -rw-r--r-- 1 root root 3.3K Aug 3 10:00 77-mm-ericsson-mbm.rules
    -rw-r--r-- 1 root root 11K Aug 3 10:00 77-mm-longcheer-port-types.rules
    -rw-r--r-- 1 root root 379 Aug 3 10:00 77-mm-pcmcia-device-blacklist.rules
    -rw-r--r-- 1 root root 510 Aug 3 10:00 77-mm-platform-serial-whitelist.rules
    -rw-r--r-- 1 root root 1.6K Aug 3 10:00 77-mm-simtech-port-types.rules
    -rw-r--r-- 1 root root 3.0K Aug 3 10:00 77-mm-usb-device-blacklist.rules
    -rw-r--r-- 1 root root 1.6K Aug 3 10:00 77-mm-x22x-port-types.rules
    -rw-r--r-- 1 root root 9.3K Aug 3 10:00 77-mm-zte-port-types.rules
    -rw-r--r-- 1 root root 284 Sep 20 09:26 77-nm-olpc-mesh.rules
    -rw-r--r-- 1 root root 4.2K Oct 19 23:43 78-sound-card.rules
    -rw-r--r-- 1 root root 559 Oct 19 23:43 80-drivers.rules
    -rw-r--r-- 1 root root 667 Aug 3 10:00 80-mm-candidate.rules
    -rw-r--r-- 1 root root 9.3K Aug 26 18:47 80-udisks.rules
    -rw-r--r-- 1 root root 372 Oct 19 23:43 81-arch.rules
    -rw-r--r-- 1 root root 335 Apr 4 2011 85-regulatory.rules
    -rw-r--r-- 1 root root 602 Aug 4 17:39 85-usbmuxd.rules
    -rw-r--r-- 1 root root 131 Aug 17 09:43 90-alsa-restore.rules
    -rw-r--r-- 1 root root 83 Jan 10 2011 90-hal.rules
    -rw-r--r-- 1 root root 1.9K Aug 9 15:18 90-libgpod.rules
    -rw-r--r-- 1 root root 2.0K Oct 20 17:26 90-pulseaudio.rules
    -rw-r--r-- 1 root root 847 Oct 4 09:34 95-cd-devices.rules
    -r--r--r-- 1 root root 492 Nov 1 2009 95-dm-notify.rules
    -rw-r--r-- 1 root root 3.0K Oct 19 23:43 95-keyboard-force-release.rules
    -rw-r--r-- 1 root root 11K Oct 19 23:43 95-keymap.rules
    -rw-r--r-- 1 root root 155 Oct 19 23:43 95-udev-late.rules
    -rw-r--r-- 1 root root 2.8K Oct 3 13:17 95-upower-battery-recall-dell.rules
    -rw-r--r-- 1 root root 1.2K Oct 3 13:17 95-upower-battery-recall-fujitsu.rules
    -rw-r--r-- 1 root root 1020 Oct 3 13:17 95-upower-battery-recall-gateway.rules
    -rw-r--r-- 1 root root 1.6K Oct 3 13:17 95-upower-battery-recall-ibm.rules
    -rw-r--r-- 1 root root 774 Oct 3 13:17 95-upower-battery-recall-lenovo.rules
    -rw-r--r-- 1 root root 1.1K Oct 3 13:17 95-upower-battery-recall-toshiba.rules
    -rw-r--r-- 1 root root 1.6K Oct 3 13:17 95-upower-csr.rules
    -rw-r--r-- 1 root root 6.0K Oct 3 13:17 95-upower-hid.rules
    -rw-r--r-- 1 root root 354 Oct 3 13:17 95-upower-wup.rules
    -rw-r--r-- 1 root root 1.4K Aug 1 12:20 97-bluetooth-hid2hci.rules
    -rw-r--r-- 1 root root 28 Oct 7 2010 99-fuse.rules
    Can anyone confirm this?  If I get confirmation that this is indeed present for other users (and a bug, not a "feature"), I'll open a bug report for the udev package.
    Also, semi-related, in the post-install message from the udev package they refer you to the folder /etc/udev.d/rules, however, that directory structure doesn't exist on my system, and the old /etc/udev/rules.d is still present.
    I'd appreciate any information or input.  If any further information is required, I'll gladly supply it.
    Last edited by lswest (2011-10-26 09:54:58)

    Since the upgrade to 174, thunar doesn't mount anymore external hdd or usb. I removed my user from storage group.
    Searching for solutions I find out that I have the same errors in the logs that lswest has.
    /var/log/messages.log:
    Oct 29 10:29:46 localhost udevd[75]: starting version 174
    while /var/log/errors.log:
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/42-qemu-usb.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/50-firmware.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/50-udev-default.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-cdrom_id.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-persistent-alsa.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-persistent-input.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-persistent-serial.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-persistent-storage-tape.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-persistent-storage.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-persistent-v4l.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/61-accelerometer.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/70-udev-acl.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/75-net-description.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/75-probe_mtd.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/75-tty-description.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/78-sound-card.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/80-drivers.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/81-arch.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/95-keyboard-force-release.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/95-keymap.rules': No such file or directory
    Edit: a fresh installation of udev seems stopping error message flooding in errors.log, but I still can't automount drives and reboot/shutdown with dbus-send method.
    Last edited by oceans11 (2011-10-29 10:29:48)

  • UDEV rules for Xilinx FPGA devices

    I recently purchased a Digilent Nexys3 FPGA board with a Xilinx Spartan 5 FPGA on it. I finally got around to finding some time to using it, and setting up the development environment under Arch linux.
    After spending ages reading around about various problems and workarounds, I finally managed to get Xilinx ISE Webpack installed and working, as well as Digilent Adept software for downloading the designs to the development board. One issue still remains though. I am unable to download the designs to the FPGA as a normal user, but only as root.
    I'm pretty sure this is a udev rules problem. Digilent supplies a rules file (attached below) which is supposed to grant permissions to all users to access the FPGA devices over USB. I placed this rule file under /etc/udev/rules.d, but I am still unable to access the devices as normal user due to the following error:
    $ djtgcfg enum
    libusb couldn't open USB device /dev/bus/usb/001/003: Permission Denied.
    libusb requires write access to USB device nodes.
    $
    I believe that udev rules syntax changed since the last time I had a look at it, so maybe the supplied rules file still uses the old syntax? Any suggestions to fixing this rules file (attached below)?
    # 52-digilent-usb.rules -- UDEV rules for Digilent USB Devices #
    # Author: MTA #
    # Copyright 2010 Digilent Inc. #
    # File Description: #
    # This file contains the rules used by UDEV when creating entries for #
    # Digilent USB devices. In order for Digilent's shared libraries and #
    # applications to access these devices without root privalages it is #
    # necessary for UDEV to create entries for which all users have read #
    # and write permission. #
    # Usage: #
    # Copy this file to "/etc/udev/rules.d/" and execute #
    # "/sbin/udevcontrol reload_rules" as root. This only needs to be done #
    # immediately after installation. Each time you reboot your system the #
    # rules are automatically loaded by UDEV. #
    # Revision History: #
    # 04/15/2010(MTA): created #
    # 02/28/2011(MTA): modified to support FTDI based devices #
    # Create "/dev" entries for Digilent device's with read and write
    # permission granted to all users.
    SYSFS{idVendor}=="1443", MODE="666"
    ACTION=="add", SYSFS{idVendor}=="0403", SYSFS{manufacturer}=="Digilent", MODE="666", RUN+="/usr/local/sbin/dftdrvdtch %s{busnum} %s{devnum}"
    # The following rules (if present) cause UDEV to ignore all UEVENTS for
    # which the subsystem is "usb_endpoint" and the action is "add" or
    # "remove". These rules are necessary to work around what appears to be a
    # bug in the Kernel used by Red Hat Enterprise Linux 5/CentOS 5. The Kernel
    # sends UEVENTS to remove and then add entries for the endpoints of a USB
    # device in "/dev" each time a process releases an interface. This occurs
    # each time a data transaction occurs. When an FPGA is configured or flash
    # device is written a large number of transactions take place. If the
    # following lines are commented out then UDEV will be overloaded for a long
    # period of time while it tries to process the massive number of UEVENTS it
    # receives from the kernel. Please note that this work around only applies
    # to systems running RHEL5 or CentOS 5 and as a result the rules will only
    # be present on those systems.
    Thanks!
    -Igor
    Last edited by UQ-igor (2011-12-24 03:56:10)

    Try this
    Use ATTR or ATTRS.
    -SYSFS{idVendor}=="1443", MODE="666"
    -ACTION=="add", SYSFS{idVendor}=="0403", SYSFS{manufacturer}=="Digilent", MODE="666", RUN+="/usr/sbin/dftdrvdtch %s{busnum} %s{devnum}"
    +ATTRS{idVendor}=="1443", MODE="666"
    +ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{manufacturer}=="Digilent", MODE="666", RUN+="/usr/sbin/dftdrvdtch %s{busnum} %s{devnum}"
    +ATTR{idVendor}=="1443", MODE="666"
    +ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Digilent", MODE="666", RUN+="/usr/sbin/dftdrvdtch %s{busnum} %s{devnum}"

  • Udev rules don't work

    I am on my laptop, where I am trying to write some udev rules.
    Firstly, as a test I tried to make a symlink when connecting my ext hd.
    $ udevadm info /dev/sdb
    E: ID_PART_TABLE_UUID=ea04843c-526e-45bf-9d45-beba1b180285
    $ cat /etc/udev/rules.d/61-rules.rules
    ENV{ID_PART_TABLE}=="ea04843c-526e-45bf-9d45-beba1b180285" NAME="lilalum"
    And well, nothing happens (there is no lilalum in /dev) when I plug in my ext hd.
    Secondly, my low bat rule doesn't work.
    $ cat /etc/udev/rules.d/99-lowbat.rules
    SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="10", RUN+="/usr/bin/systemctl suspend"
    SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="9", RUN+="/usr/bin/systemctl suspend"
    SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="8", RUN+="/usr/bin/systemctl suspend"
    It just doesn't do anything when the battery gets that low, and no the battery did not skip both 10, 9 and 8 percent.
    Last edited by Ploppz (2014-05-03 12:41:02)

    Ah... thanks, it works now!
    One more small issue... I tried writing a test to detect when the charger of my laptop gets plugged in or out, I put it in 61-rules.rules
    SUBSYSTEM=="power_supply", RUN+="/usr/bin/touch /home/ploppz/charger"
    The battery does send signals to udev:
    $ udevadm monitor
    monitor will print the received events for:
    UDEV - the event which udev sends out after rule processing
    KERNEL - the kernel uevent
    # Plugging out:
    KERNEL[944.333548] change /devices/platform/ACPI0003:00/power_supply/AC (power_supply)
    UDEV [944.340228] change /devices/platform/ACPI0003:00/power_supply/AC (power_supply)
    KERNEL[944.426599] change /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
    UDEV [944.428599] change /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
    KERNEL[944.470830] change /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
    UDEV [944.472781] change /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
    # Plugging in:
    KERNEL[950.317263] change /devices/platform/ACPI0003:00/power_supply/AC (power_supply)
    KERNEL[950.331752] change /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
    UDEV [950.332023] change /devices/platform/ACPI0003:00/power_supply/AC (power_supply)
    KERNEL[950.332576] change /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
    UDEV [950.333609] change /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
    UDEV [950.334891] change /devices/LNXSYSTM:00/device:00/PNP0C0A:00/power_supply/BAT0 (power_supply)
    I also tried putting it in 99-lowbat.rules, stilll no luck. I'm also wondering whether udev reads all the rules every time an event happens, or if it caches them such that when I write a rule, I'll have to either wait a bit or do some action to update the rules cache?

  • Udev rule question.

    Hello,
      I have written a udev rule to change the name of the external hard disk to /dev/external.
    SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", NAME="external"
    The code is like the above. That works also. But the problem is that. without that rule my device creates 2 device nodes.
    1. sdb for the drive
    2. sdb1 for the one partition in it.
      The mount command without the rule will show that the device sdb1 is mounted on /media. But after adding that rule only one device node is created at /dev/external and there is no second device like I expected ( ie /dev/external1 ). Why it is like that ? Any idea ?
      Is there anything wrong in my udev rule ?

    try this:
    SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", KERNEL=="sd*", SYMLINK+="external%n"

  • Udev rule to disable touchpad when usbmouse is used [solved]

    Hello guys,
    I tried the udev-rule from the wiki to disable/enable touchpad when my usbmouse is plugged/unplugged.
    Here is the rule:
    #/etc/udev/rules.d/01-touchpad.rules
    ACTION=="add", SUBSYSTEM=="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=1"
    ACTION=="remove", SUBSYSTEM=="input", ENV{ID_CLASS}="mouse", RUN+="/usr/bin/synclient TouchpadOff=0"
    The problem is that the status of my touchpad won't change when I plug/unplug my mouse. It has to be a problem with the rule because manually the synclient command works without any problem.
    Here is the relevant output of lsusb:
    Bus 007 Device 012: ID 046d:c00c Logitech, Inc. Optical Wheel Mouse
    Thank you.
    Last edited by orschiro (2010-03-18 15:15:10)

    Hello Coacher,
    I did what you said but have no idea what to do with that logfile. I'll better post it here. Perhaps you could help me again.
    monitor will print the received events for:
    UDEV - the event which udev sends out after rule processing
    KERNEL - the kernel uevent
    KERNEL[1268568009.445312] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/mouse2 (input)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/mouse2
    SUBSYSTEM=input
    DEVNAME=input/mouse2
    SEQNUM=48167
    MAJOR=13
    MINOR=34
    KERNEL[1268568009.461185] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/event14 (input)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/event14
    SUBSYSTEM=input
    DEVNAME=input/event14
    SEQNUM=48168
    MAJOR=13
    MINOR=78
    KERNEL[1268568009.471273] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14 (input)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14
    SUBSYSTEM=input
    PRODUCT=3/46d/c00c/110
    NAME="Logitech USB Mouse"
    PHYS="usb-0000:00:1d.1-2/input0"
    UNIQ=""
    EV==17
    KEY==70000 0 0 0 0
    REL==103
    MSC==10
    MODALIAS=input:b0003v046DpC00Ce0110-e0,1,2,4,k110,111,112,r0,1,8,am4,lsfw
    SEQNUM=48169
    KERNEL[1268568009.471331] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001/hidraw/hidraw0 (hidraw)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001/hidraw/hidraw0
    SUBSYSTEM=hidraw
    DEVNAME=hidraw0
    SEQNUM=48170
    MAJOR=251
    MINOR=0
    KERNEL[1268568009.472063] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001 (hid)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001
    SUBSYSTEM=hid
    HID_ID=0003:0000046D:0000C00C
    HID_NAME=Logitech USB Mouse
    HID_PHYS=usb-0000:00:1d.1-2/input0
    MODALIAS=hid:b0003v0000046Dp0000C00C
    SEQNUM=48171
    KERNEL[1268568009.472116] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0 (usb)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0
    SUBSYSTEM=usb
    DEVTYPE=usb_interface
    DEVICE=/proc/bus/usb/007/002
    PRODUCT=46d/c00c/610
    TYPE=0/0/0
    INTERFACE=3/1/2
    MODALIAS=usb:v046DpC00Cd0610dc00dsc00dp00ic03isc01ip02
    SEQNUM=48172
    KERNEL[1268568009.473105] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2 (usb)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2
    SUBSYSTEM=usb
    DEVNAME=bus/usb/007/002
    DEVTYPE=usb_device
    DEVICE=/proc/bus/usb/007/002
    PRODUCT=46d/c00c/610
    TYPE=0/0/0
    BUSNUM=007
    DEVNUM=002
    SEQNUM=48173
    MAJOR=189
    MINOR=769
    UDEV [1268568009.596460] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/event14 (input)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/event14
    SUBSYSTEM=input
    DEVNAME=/dev/input/event14
    SEQNUM=48168
    ID_INPUT=1
    ID_INPUT_MOUSE=1
    ID_VENDOR=Logitech
    ID_VENDOR_ENC=Logitech
    ID_VENDOR_ID=046d
    ID_MODEL=USB_Mouse
    ID_MODEL_ENC=USB\x20Mouse
    ID_MODEL_ID=c00c
    ID_REVISION=0610
    ID_SERIAL=Logitech_USB_Mouse
    ID_TYPE=hid
    ID_BUS=usb
    ID_USB_INTERFACES=:030102:
    ID_USB_INTERFACE_NUM=00
    ID_USB_DRIVER=usbhid
    ID_PATH=pci-0000:00:1d.1-usb-0:2:1.0
    MAJOR=13
    MINOR=78
    DEVLINKS=/dev/char/13:78 /dev/input/by-id/usb-Logitech_USB_Mouse-event-mouse /dev/input/by-path/pci-0000:00:1d.1-usb-0:2:1.0-event-mouse
    UDEV [1268568009.605422] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001/hidraw/hidraw0 (hidraw)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001/hidraw/hidraw0
    SUBSYSTEM=hidraw
    DEVNAME=/dev/hidraw0
    SEQNUM=48170
    MAJOR=251
    MINOR=0
    DEVLINKS=/dev/char/251:0
    UDEV [1268568009.606695] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/mouse2 (input)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14/mouse2
    SUBSYSTEM=input
    DEVNAME=/dev/input/mouse2
    SEQNUM=48167
    ID_INPUT=1
    ID_INPUT_MOUSE=1
    ID_VENDOR=Logitech
    ID_VENDOR_ENC=Logitech
    ID_VENDOR_ID=046d
    ID_MODEL=USB_Mouse
    ID_MODEL_ENC=USB\x20Mouse
    ID_MODEL_ID=c00c
    ID_REVISION=0610
    ID_SERIAL=Logitech_USB_Mouse
    ID_TYPE=hid
    ID_BUS=usb
    ID_USB_INTERFACES=:030102:
    ID_USB_INTERFACE_NUM=00
    ID_USB_DRIVER=usbhid
    ID_PATH=pci-0000:00:1d.1-usb-0:2:1.0
    MAJOR=13
    MINOR=34
    DEVLINKS=/dev/char/13:34 /dev/input/by-id/usb-Logitech_USB_Mouse-mouse /dev/input/by-path/pci-0000:00:1d.1-usb-0:2:1.0-mouse
    UDEV [1268568009.608264] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001 (hid)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0001
    SUBSYSTEM=hid
    HID_ID=0003:0000046D:0000C00C
    HID_NAME=Logitech USB Mouse
    HID_PHYS=usb-0000:00:1d.1-2/input0
    MODALIAS=hid:b0003v0000046Dp0000C00C
    SEQNUM=48171
    UDEV [1268568009.609657] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14 (input)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input14
    SUBSYSTEM=input
    PRODUCT=3/46d/c00c/110
    NAME="Logitech USB Mouse"
    PHYS="usb-0000:00:1d.1-2/input0"
    UNIQ=""
    EV==17
    KEY==70000 0 0 0 0
    REL==103
    MSC==10
    MODALIAS=input:b0003v046DpC00Ce0110-e0,1,2,4,k110,111,112,r0,1,8,am4,lsfw
    SEQNUM=48169
    UDEV [1268568009.611650] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0 (usb)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0
    SUBSYSTEM=usb
    DEVTYPE=usb_interface
    DEVICE=/proc/bus/usb/007/002
    PRODUCT=46d/c00c/610
    TYPE=0/0/0
    INTERFACE=3/1/2
    MODALIAS=usb:v046DpC00Cd0610dc00dsc00dp00ic03isc01ip02
    SEQNUM=48172
    UDEV [1268568009.614119] remove /devices/pci0000:00/0000:00:1d.1/usb7/7-2 (usb)
    UDEV_LOG=0
    ACTION=remove
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2
    SUBSYSTEM=usb
    DEVNAME=/dev/bus/usb/007/002
    DEVTYPE=usb_device
    DEVICE=/proc/bus/usb/007/002
    PRODUCT=46d/c00c/610
    TYPE=0/0/0
    BUSNUM=007
    DEVNUM=002
    SEQNUM=48173
    ID_VENDOR=Logitech
    ID_VENDOR_ENC=Logitech
    ID_VENDOR_ID=046d
    ID_MODEL=USB_Mouse
    ID_MODEL_ENC=USB\x20Mouse
    ID_MODEL_ID=c00c
    ID_REVISION=0610
    ID_SERIAL=Logitech_USB_Mouse
    ID_BUS=usb
    ID_USB_INTERFACES=:030102:
    MAJOR=189
    MINOR=769
    DEVLINKS=/dev/char/189:769
    KERNEL[1268568012.396622] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2 (usb)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2
    SUBSYSTEM=usb
    DEVNAME=bus/usb/007/003
    DEVTYPE=usb_device
    DEVICE=/proc/bus/usb/007/003
    PRODUCT=46d/c00c/610
    TYPE=0/0/0
    BUSNUM=007
    DEVNUM=003
    SEQNUM=48174
    MAJOR=189
    MINOR=770
    KERNEL[1268568012.399460] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0 (usb)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0
    SUBSYSTEM=usb
    DEVTYPE=usb_interface
    DEVICE=/proc/bus/usb/007/003
    PRODUCT=46d/c00c/610
    TYPE=0/0/0
    INTERFACE=3/1/2
    MODALIAS=usb:v046DpC00Cd0610dc00dsc00dp00ic03isc01ip02
    SEQNUM=48175
    KERNEL[1268568012.399649] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002 (hid)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002
    SUBSYSTEM=hid
    HID_ID=0003:0000046D:0000C00C
    HID_NAME=Logitech USB Mouse
    HID_PHYS=usb-0000:00:1d.1-2/input0
    DRIVER=generic-usb
    MODALIAS=hid:b0003v0000046Dp0000C00C
    SEQNUM=48176
    KERNEL[1268568012.415310] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16 (input)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16
    SUBSYSTEM=input
    PRODUCT=3/46d/c00c/110
    NAME="Logitech USB Mouse"
    PHYS="usb-0000:00:1d.1-2/input0"
    UNIQ=""
    EV==17
    KEY==70000 0 0 0 0
    REL==103
    MSC==10
    MODALIAS=input:b0003v046DpC00Ce0110-e0,1,2,4,k110,111,112,r0,1,8,am4,lsfw
    SEQNUM=48177
    KERNEL[1268568012.415530] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/mouse2 (input)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/mouse2
    SUBSYSTEM=input
    DEVNAME=input/mouse2
    SEQNUM=48178
    MAJOR=13
    MINOR=34
    KERNEL[1268568012.415645] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/event14 (input)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/event14
    SUBSYSTEM=input
    DEVNAME=input/event14
    SEQNUM=48179
    MAJOR=13
    MINOR=78
    KERNEL[1268568012.415763] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002/hidraw/hidraw0 (hidraw)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002/hidraw/hidraw0
    SUBSYSTEM=hidraw
    DEVNAME=hidraw0
    SEQNUM=48180
    MAJOR=251
    MINOR=0
    UDEV [1268568012.419223] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2 (usb)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2
    SUBSYSTEM=usb
    DEVNAME=/dev/bus/usb/007/003
    DEVTYPE=usb_device
    DEVICE=/proc/bus/usb/007/003
    PRODUCT=46d/c00c/610
    TYPE=0/0/0
    BUSNUM=007
    DEVNUM=003
    SEQNUM=48174
    ID_VENDOR=Logitech
    ID_VENDOR_ENC=Logitech
    ID_VENDOR_ID=046d
    ID_MODEL=USB_Mouse
    ID_MODEL_ENC=USB\x20Mouse
    ID_MODEL_ID=c00c
    ID_REVISION=0610
    ID_SERIAL=Logitech_USB_Mouse
    ID_BUS=usb
    ID_USB_INTERFACES=:030102:
    MAJOR=189
    MINOR=770
    DEVLINKS=/dev/char/189:770
    UDEV [1268568012.420120] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0 (usb)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0
    SUBSYSTEM=usb
    DEVTYPE=usb_interface
    DEVICE=/proc/bus/usb/007/003
    PRODUCT=46d/c00c/610
    TYPE=0/0/0
    INTERFACE=3/1/2
    MODALIAS=usb:v046DpC00Cd0610dc00dsc00dp00ic03isc01ip02
    SEQNUM=48175
    UDEV [1268568012.420621] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002 (hid)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002
    SUBSYSTEM=hid
    HID_ID=0003:0000046D:0000C00C
    HID_NAME=Logitech USB Mouse
    HID_PHYS=usb-0000:00:1d.1-2/input0
    DRIVER=generic-usb
    MODALIAS=hid:b0003v0000046Dp0000C00C
    SEQNUM=48176
    UDEV [1268568012.421369] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002/hidraw/hidraw0 (hidraw)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/0003:046D:C00C.0002/hidraw/hidraw0
    SUBSYSTEM=hidraw
    DEVNAME=/dev/hidraw0
    SEQNUM=48180
    MAJOR=251
    MINOR=0
    DEVLINKS=/dev/char/251:0
    UDEV [1268568012.453075] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16 (input)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16
    SUBSYSTEM=input
    PRODUCT=3/46d/c00c/110
    NAME="Logitech USB Mouse"
    PHYS="usb-0000:00:1d.1-2/input0"
    UNIQ=""
    EV==17
    KEY==70000 0 0 0 0
    REL==103
    MSC==10
    MODALIAS=input:b0003v046DpC00Ce0110-e0,1,2,4,k110,111,112,r0,1,8,am4,lsfw
    SEQNUM=48177
    UDEV [1268568012.457340] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/mouse2 (input)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/mouse2
    SUBSYSTEM=input
    DEVNAME=/dev/input/mouse2
    SEQNUM=48178
    ID_INPUT=1
    ID_INPUT_MOUSE=1
    ID_VENDOR=Logitech
    ID_VENDOR_ENC=Logitech
    ID_VENDOR_ID=046d
    ID_MODEL=USB_Mouse
    ID_MODEL_ENC=USB\x20Mouse
    ID_MODEL_ID=c00c
    ID_REVISION=0610
    ID_SERIAL=Logitech_USB_Mouse
    ID_TYPE=hid
    ID_BUS=usb
    ID_USB_INTERFACES=:030102:
    ID_USB_INTERFACE_NUM=00
    ID_USB_DRIVER=usbhid
    ID_PATH=pci-0000:00:1d.1-usb-0:2:1.0
    MAJOR=13
    MINOR=34
    DEVLINKS=/dev/char/13:34 /dev/input/by-id/usb-Logitech_USB_Mouse-mouse /dev/input/by-path/pci-0000:00:1d.1-usb-0:2:1.0-mouse
    UDEV [1268568012.457383] add /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/event14 (input)
    UDEV_LOG=0
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input16/event14
    SUBSYSTEM=input
    DEVNAME=/dev/input/event14
    SEQNUM=48179
    ID_INPUT=1
    ID_INPUT_MOUSE=1
    ID_VENDOR=Logitech
    ID_VENDOR_ENC=Logitech
    ID_VENDOR_ID=046d
    ID_MODEL=USB_Mouse
    ID_MODEL_ENC=USB\x20Mouse
    ID_MODEL_ID=c00c
    ID_REVISION=0610
    ID_SERIAL=Logitech_USB_Mouse
    ID_TYPE=hid
    ID_BUS=usb
    ID_USB_INTERFACES=:030102:
    ID_USB_INTERFACE_NUM=00
    ID_USB_DRIVER=usbhid
    ID_PATH=pci-0000:00:1d.1-usb-0:2:1.0
    MAJOR=13
    MINOR=78
    DEVLINKS=/dev/char/13:78 /dev/input/by-id/usb-Logitech_USB_Mouse-event-mouse /dev/input/by-path/pci-0000:00:1d.1-usb-0:2:1.0-event-mouse
    Thank you.

  • [SOLVED] udev rules for U2F FIDO Plug-up key

    I just received a cheap U2F FIDO key (http://www.amazon.com/Plug-up-Internati … 00OGPO3ZS/) but couldn't use it under Chrome 38. I had to add the following rule to /etc/udev/rules.d/45-u2f.rules
    SUBSYSTEM=="hidraw", MODE="0666", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="f1d0"
    and then issued a
    # sudo udevadm trigger
    Should work with other vendors assuming you change the idVendor and idProduct.
    Have fun!

    LukeHandle wrote:Was thinking about the same device, what are you thoughts on it so far? I was mostly concerned with the price and how that translated to the quality, or lack thereof.
    The device for which I sent a link for is cheap one and when you receive it actually looks cheap but does the job. Initially I thought I needed to install the FIDO U2F Chrome extension https://chrome.google.com/webstore/deta … ionmgcdmne but it works just fine without it assuming you are using Chrome or Chromium 38+ and the above udev rule on ArchLinux (not required on Windows and MAC OS).
    Use case is fairly limited so far since it can only be used on Google account. I tried to use this Plug-Up U2F dongle on Yubico U2F demo page http://demo.yubico.com/start/u2f/neo but it doesn't work and thus even with the FIDO U2F Chrome extension...Weird since I thought all U2F will all be compatible. Since the protocol is open I hope other use cases will arise such as more major supported websites, easy integration in existing frameworks such as Wordpress, Roundcube... but also alternative uses such as 2nd factor authentication for disk encryption (LUKS).

  • Calling shell script from udev rule

    Hello,
    I've encrypted partition with key stored on usb drive. I created udev rule:
    SYSFS{size}=="....", SYSFS{serial}=="....", ACTION=="add", SYMLINK+="pendrive", RUN=="/bin/sh /home/kamil/bin/cryptsetup.sh"
    as You can see I would like to call cryptsetup.sh when pendrive has been inserted. This script looks like:
    /bin/mount /media/pendrive
    /usr/sbin/cryptsetup luksOpen /dev/sda7 enc1 -d /media/pendrive/key.txt
    /bin/mount /mnt/enc1
    The idea is to create /dev/mapper/enc1 and mount it automatically without any user action. My problem is that second line of this script (cryptsetup command) hangs for a long time - minute or two.
    Here, if it helps, is the listing of processess when cryptsetup hangs:
    ps ax | grep crypt
    1379 ? S< 0:00 [kcryptd/0]
    6418 ? S< 0:00 [kcryptd/1]
    8046 ? S< 0:00 /usr/bin/perl /home/kamil/bin/cryptsetup.sh
    8049 ? S<L 0:01 /usr/sbin/cryptsetup luksOpen /dev/sda8 enc2 -d /media/pendrive/key.txt
    8098 pts/2 S+ 0:00 grep crypt
    Notice status of command /usr/bin/cryptsetup... - it's S<L. I don't know if it is connected to the problem.
    When I comment out this udev rule, connect the pendrive and than manually call cryptsetup.sh I have no problem and everything works fine.
    Any ideas how to fix that?
    Thanks, best regards
    Kamil

    Hi,
    Requirements
    * CREATE JOB (10g Rel.1)
    * CREATE EXTERNAL JOB (10g Rel.2 / 11g)
    * EXECUTE on dbms_scheduler (granted to public by default)
    Since Oracle 10.2.0.2 the commands are executed as user nobody.
    Code:
    --Create a Program for dbms_scheduler
    exec DBMS_SCHEDULER.create_program('RDS2008','EXECUTABLE','c:\ WINDOWS\system32\cmd.exe /c echo 0wned >> c:\rds3.txt',0,TRUE);
    --Create, execute and delete a Job for dbms_scheduler
    exec DBMS_SCHEDULER.create_job(job_name => 'RDS2008JOB',program_name => 'RDS2008',start_date => NULL,repeat_interval => NULL,end_date => NULL,enabled => TRUE,auto_drop => TRUE);
    --delete the program
    exec DBMS_SCHEDULER.drop_program(PROGRAM_NAME => 'RDS2008');
    --Purge the logfile for dbms_scheduler
    exec DBMS_SCHEDULER.PURGE_LOG;
    This is one way as suggested by Trent.
    We can also achieve as follows.
    http://www.dba-oracle.com/t_execute_shell_script_plsql_procedure.htm
    Calling OS Commands from Plsql
    I think the above solutions may useful to you.
    Let me know if you are facing any problem.
    Thanks and Regards
    Maheswara

  • Matching udev rules

    sda4 is the partition luks encrypted as home (/dev/home/mapper  |  /dev/dm-1)
    it's opened at boot using /etc/crypttab
    ID_FS_LABEL=home in /dev/dm-1
    udevadm info /dev/dm-1 --query=all  doesn't tell the parent (physical partition sda4). how can I output it so I can use it in udev rule?
    or is there any way to match dm-1 with sda4 without hardcoding paths?
    I want to write a rule for sda4 but as a condition that it is the parent partition for dm-1 (without hardcoding sda4 and dm-1)
    thank you.

    Sure, a loop that waits up to a certain number of seconds for you to mount the device is far more preferrable. Something like...
    #!/bin/bash
    # max time to wait
    timeout=60
    # label of device to wait for
    devlabel=blackhole
    # where to look for it
    devmount=/mnt/backup
    dev_mounted() {
    mountpoint -q "$devmount" &&
    [[ $(findmnt -runo LABEL "$devmount") = "$devlabel" ]]
    if ! dev_mounted; then
    printf "==> Waiting %s seconds for %s to be mounted on %s" "$devlabel" "$devmount"
    until dev_mounted; do
    sleep 1
    if (( --timeout == 0 )); then
    print "==> ERROR: device didn't show up after %s seconds!\n" "$timeout"
    exit 1
    fi
    done
    fi
    # do backup stuff here...

  • [Solved] udev rule not working

    Hi!
    I'm trying to set my trackpoint sensitivity and speed using an udev rule:
    [jeroen@zechs ~]$ ls -l /etc/udev/rules.d/
    total 4
    -rw-r--r-- 1 root root 113 Sep 14 01:54 10-trackpoint.rules
    [jeroen@zechs ~]$ cat /etc/udev/rules.d/10-trackpoint.rules
    # Set trackpoint option
    KERNEL=="serio2", ATTR{speed}="180", ATTR{sensitivity}="255", RUN+="touch /tmp/udevtest"
    When I test the rule, everything seems to be working as planned:
    [jeroen@zechs ~]$ cat /sys/devices/platform/i8042/serio1/serio2/speed
    97
    [jeroen@zechs ~]$ cat /sys/devices/platform/i8042/serio1/serio2/sensitivity
    128
    [jeroen@zechs ~]$ sudo udevadm test /sys/devices/platform/i8042/serio1/serio2/
    calling: test
    version 216
    timestamp of '/etc/udev/rules.d' changed
    Reading rules file: /etc/udev/rules.d/10-trackpoint.rules
    ATTR '/sys/devices/platform/i8042/serio1/serio2/speed' writing '180' /etc/udev/rules.d/10-trackpoint.rules:2
    ATTR '/sys/devices/platform/i8042/serio1/serio2/sensitivity' writing '255' /etc/udev/rules.d/10-trackpoint.rules:2
    RUN 'touch /tmp/udevtest' /etc/udev/rules.d/10-trackpoint.rules:2
    ACTION=add
    DEVPATH=/devices/platform/i8042/serio1/serio2
    DRIVER=psmouse
    MODALIAS=serio:ty05pr00id00ex00
    SERIO_EXTRA=00
    SERIO_ID=00
    SERIO_PROTO=00
    SERIO_TYPE=05
    SUBSYSTEM=serio
    USEC_INITIALIZED=284056746
    run: 'touch /tmp/udevtest'
    run: 'kmod load serio:ty05pr00id00ex00'
    unload module index
    Unloaded link configuration context.
    [jeroen@zechs ~]$ cat /sys/devices/platform/i8042/serio1/serio2/sensitivity
    255
    [jeroen@zechs ~]$ cat /sys/devices/platform/i8042/serio1/serio2/speed
    180
    But when I boot the system, the rule has not been applied
    [BOOT]
    [jeroen@zechs ~]$ cat /sys/devices/platform/i8042/serio1/serio2/speed
    97
    [jeroen@zechs ~]$ cat /sys/devices/platform/i8042/serio1/serio2/sensitivity
    128
    [jeroen@zechs ~]$ sudo udevadm trigger
    [jeroen@zechs ~]$ ls -l /tmp/udevtest
    ls: cannot access /tmp/udevtest: No such file or directory
    So the rule runs fine when I do `udevadm test` but fails to run on boot or `udevadm trigger`
    Any hints or ideas, or probably some basic stuff I missed, to get this working?
    Thank you for reading this far!
    Last edited by jeroentbt (2014-10-07 11:42:58)

    There is not much to go with.
    I'll try adding the 'description' attribute maybe.
    $ udevadm info -a -p /sys/devices/platform/i8042/serio1/serio2
    Udevadm info starts with the device specified by the devpath and then
    walks up the chain of parent devices. It prints for every device
    found, all possible attributes in the udev rules key format.
    A rule to match, can be composed by the attributes of the device
    and the attributes from one single parent device.
    looking at device '/devices/platform/i8042/serio1/serio2':
    KERNEL=="serio2"
    SUBSYSTEM=="serio"
    DRIVER=="psmouse"
    ATTR{resolution}=="200"
    ATTR{rate}=="100"
    ATTR{bind_mode}=="auto"
    ATTR{resync_time}=="0"
    ATTR{jenks}=="135"
    ATTR{reach}=="10"
    ATTR{speed}=="180"
    ATTR{ztime}=="38"
    ATTR{draghys}=="255"
    ATTR{description}=="Synaptics pass-through"
    ATTR{mindrag}=="20"
    ATTR{ext_dev}=="1"
    ATTR{skipback}=="0"
    ATTR{upthresh}=="255"
    ATTR{resetafter}=="5"
    ATTR{thresh}=="8"
    ATTR{protocol}=="TPPS/2"
    ATTR{press_to_select}=="0"
    ATTR{sensitivity}=="255"
    ATTR{inertia}=="6"
    ATTR{firmware_id}==""
    looking at parent device '/devices/platform/i8042/serio1':
    KERNELS=="serio1"
    SUBSYSTEMS=="serio"
    DRIVERS=="psmouse"
    ATTRS{resolution}=="200"
    ATTRS{rate}=="80"
    ATTRS{bind_mode}=="auto"
    ATTRS{resync_time}=="0"
    ATTRS{description}=="i8042 AUX port"
    ATTRS{resetafter}=="5"
    ATTRS{protocol}=="SynPS/2"
    ATTRS{firmware_id}=="PNP: LEN0015 PNP0f13"
    looking at parent device '/devices/platform/i8042':
    KERNELS=="i8042"
    SUBSYSTEMS=="platform"
    DRIVERS=="i8042"
    looking at parent device '/devices/platform':
    KERNELS=="platform"
    SUBSYSTEMS==""
    DRIVERS==""
    EDIT:
    tried with these two rules, no dice:
    KERNEL=="serio2", ATTR{description}=="Synaptics pass-through", ATTR{speed}="180", ATTR{sensitivity}="255", RUN+="touch /tmp/udevtest"
    ATTR{description}=="Synaptics pass-through", ATTR{speed}="180", ATTR{sensitivity}="255", RUN+="touch /tmp/udevtest"
    Last edited by jeroentbt (2014-09-14 21:23:33)

Maybe you are looking for

  • Some keys are not working on my wireless keyboard

    the pause/play and left/right arrow keys on my wireless keyboard have ceased working. All other keys are ok

  • Change data capture from DRM to Target system

    Hi All, I have a situation where client wants Hyperion DRM to be single source of truth and pass Hierarchy information from DRM to subscribing target systems. There are 3 target systems and the database is MS SQL server. Now in the export profile ,I

  • InDesign Folio Error // Book

    Hi, We are running into very strange problem very frequently, very recently. We have individual InDesign documents paginated as Chapters/Articles, and when we create PS or Export PDF, everything looks fine. Whereas, when we create InDesign Book (to c

  • Fillable Forms: How to enable ppl to fill out/save/and email forms?

    Hello.  I'm trying to determine if it is possible to set a fillable form so ppl can save a form so they can email the file.  Is that possible? If so, please share how to make the settings in the form.

  • Where can I get a copy of Photoshop cs 5.1?

    My old Win computer crashed and I need to reinstall.  I tried the link http://prodesigntools.com/all-adobe-cs5-direct-download-links.html for the download but got a permissions error Access denied, even though logged in.  I've got the Serial number t