OS X, How To Perform an Action During Fast User Switch
OS X: How To Perform an Action During Fast User Switch | Radiotope
Update 2020-11-12
The above mentioned method has not been working for years - as has the link, which is dead… But stackoverflow knows more.