All, I'm trying to launch a new OSX user session from the command line (terminal), so that when I hit enter, the entire user desktop -- dock settings and all -- changes to that of another user. What's interesting is that it looks like I can launch loginwindow.app from the command-line by issuing:
open -n /path/to/loginwindow.app
Looks sorta funny to see a login window literally as my desktop. Doesn't seem to do much though. If I try to log in to another user with it, it seems to try to log in forever.
I suspect I need to use launchctl and LaunchAgents in the context (su or sudo) of another user, I can get their desktop to show up on screen. Am I on the right path, or is there no way around loginwindow.app?
Long story as to WHY I'm doing this BTW.