iniciar automáticamente un programa o acción cuando un disco duro externo o disco está conectado

apple.stackexchange https://apple.stackexchange.com/questions/5988

Pregunta

Tengo un disco duro externo. ¿Es posible poner en marcha un programa o realizar una acción cuando lo conecto o enchufarlo?

¿Fue útil?

Solución

Marco Polo can perform actions (you specify) based on attached USB devices.

Edit: MarcoPolo isn't supported anymore, but there is a maintained fork of it: ControlPlane

Otros consejos

The likely most robust solution is to create a launchd job with the StartOnMount property set to -boolean YES:

StartOnMount <boolean>
This optional key causes the job to be started every time a filesystem is mounted.

This is how Time Machine does it (see /System/Library/LaunchDaemons/com.apple.backupd-attach.plist).

You need to check if the desired /Volume/... is available, but in my experience, it's faster than using Folder Actions.

A similar question has been posted in the MacRumors forum here:

http://forums.macrumors.com/showthread.php?t=1029207

The specific suggestion there is to use the application MarcoPolo.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a apple.stackexchange
scroll top