Question

Sometimes, I need to create a login session (create windowserver instance, run login items / launchagents) of an admin user, because a lot of software cannot be run under root (but can be run as another user using sudo -u <admin user> <path to app executable> (which requires a windowserver instance of that user or else it will hang every few seconds)), and I don't want to spend a minute logging into another user, waiting for everything to load, and then log back to root. How would I simulate a real user login in command-line?

Was it helpful?

Solution

To quickly switch between accounts/logins, enable and use Fast User Switching. First login will (of course) take a while as usual, but afterwards switching is very quick. And unless you run big CPU-hogging applications in several accounts at once the additional resource needs are minimal.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top