I'm attempting to emulate how a volume is normally mounted for my NTFS volume that I've added to
/private/etc/fstab. Normally, when a volume is found, like an external hard drive, it is mounted and then a shortcut to that volume is put on the Desktop and in the Finder left-hand sidebar. However, since to mount a NTFS volume as read-write in
fstab, the flag
nobrowse must be added, this prevents it from showing up on the desktop and in Finder's sidebar.
My research has pointed me to
diskarbitrationd as the program that listens for new volumes and mounts them. I'd like to emulate the automatic adding of shortcuts to the desktop and Finder and removal on volume unmounting, and I'd like to make a script that listens for information from
diskarbitationd and do the processing for me.
How would I hook into
diskarbitrationd and listen for new events, then add the shortcuts to the desktop and Finder after the volume is mounted?
Thanks for your help!