You are not logged in.
Tried the rule:
SUBSYSTEM=="usb", ATTR{serial}=="serialnumber", SYMLINK+="myusb", RUN+="/home/user/bin/usb-on.sh", ACTION=="add"with the script usb-on.sh
#!/bin/bash
echo "usb is online " >> /tmp/usb.out
/bin/date >> /tmp/usb.out
xdg-open /tmp/usb.out # no effect
/usr/bin/nautilus # no effectbut despite the fact the tmp file appears as expected, the xdg and nautilus calls have no effects. Did I miss something?
Last edited by thomasbb (2021-07-04 13:07:23)
Offline
udev rules are not being run as your user, and especially do not know about your graphical setup.
You should probably be using systemd, see this thread for more.
Offline
Thanks for the link
Offline
i still go the hacky way since years;
worked for cron, it would work from udev too:
https://bbs.archlinux.org/viewtopic.php … 0#p1709570
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
This week end I give it a try
@kokoko3k Perfect, thank you very much
Last edited by thomasbb (2021-07-14 09:50:11)
Offline