I've spent a lot more time than I was expecting and was hoping I could get some help debugging.
My goal is to sync files between my documents and my usb drive as soon as it is mounted.
I've consulted a lot of posts on this, but these two have been the most beneficial.
Autorun a script after I plugged or unplugged a USB device
How to run a script when a specific flash-drive is mounted?
My scripts work. I have executed them by hand, and they create log files which tell me they are running and performing the files I tell them to.
What I don't know if the rules from udev are executing the RUN command. Here's all the stuff.
typing usb reveals the following of the device of interest:
Bus 003 Device 015: ID 0930:6545 Toshiba Corp. Kingston DataTraveler 102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
File: /etc/udev/rules.d/00-usb-kingston.rules
ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6545"
ACTION=="add", RUN+="sh /home/holiestcow/.bin/usb-kingston-in_dev"
Typing udevadm rules /etc gives me the following:
parse_file: reading '/etc/udev/rules.d/00-usb-kingston.rules' as rules file
File: /home/holiestcow/.bin/usb-kingston-in_udev
#!/bin/bash
echo "in_udev" > progress.txt
/home/holiestcow/.bin/usb-kingston-in &
File: /home/holiestcow/.bin/usb
#!/bin/bash
sleep 1
DISPLAY=":0.0"
HOME=/home/holiestcow/
XAUTHORITY=$HOME/.Xauthority
export DISPLAY XAUTHORITY HOME
echo "kingston-in part dos" >> progress.txt
rsync -auv --delete -n /media/CARLO\ GEN/ /home/holiestcow/Documents/ >> progress.txt
rsync -auv --delete -n /home/holiestcow/Documents/ /media/CARLO\ GEN/ >> progress.txt
Future thanks for your help.