How do I automatically run an application on USB attach or CD insert on Mac OS X?

后端 未结 5 895
灰色年华
灰色年华 2020-12-30 00:14

Is there any way to automatically launch an application on USB attach or CD insert on Mac OS X? it\'s easy on Windows, but I found that AutoRun.Inf does not wor

5条回答
  •  不知归路
    2020-12-30 00:40

    I agree with JavaCoderEx. I would crontab a task that looks for /Volumes/*/autorun.sh, then runs it once. Maybe touch a file in /tmp/ so you know its already been run, then remove it if the volume disappears.

提交回复
热议问题