autorun script on usb stick
Posted: Wed Apr 20, 2016 1:37 pm
I am trying to solve this problem, but I need help:
I want to run a script (a simple cp script to copy the files from a folder of the usb stick to the home directory) every time an usb stick is inserted.
I use raspian jessie and lxde.
I have try to add this rule in /etc/udev/rules.d/100.mymount.rules
but it does not work. So I need help on 3 points:
1) How to execute a script when usb drive is insert (we only have the label of the drive, not the IDs)
2) How to disable the dialog that is showned in LXDE when a new drive is mounted ? (see picture)
3) How to change the action to take when LXDE find a new drive ? (see picture)
I want to run a script (a simple cp script to copy the files from a folder of the usb stick to the home directory) every time an usb stick is inserted.
I use raspian jessie and lxde.
I have try to add this rule in /etc/udev/rules.d/100.mymount.rules
Code: Select all
ACTION=="add", SUBSYSTEM=="block", RUN+="/home/pi/testauto.sh"1) How to execute a script when usb drive is insert (we only have the label of the drive, not the IDs)
2) How to disable the dialog that is showned in LXDE when a new drive is mounted ? (see picture)
3) How to change the action to take when LXDE find a new drive ? (see picture)