Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Koinu

macrumors newbie
Original poster
Nov 13, 2006
18
9
Greetings,

Using MacOS Mojave, I wish to be logged in as one user (on my primary account) but run a second instance of the MAIL application as a separate user. My use case is that I temporarily need to manage a new EMAIL account for a few months -- but I do not wish to simply add this account to my existing set of Mail mailboxes - I want it in a separate application and window. I could install a totally different mail client (like Thunderbird, or whatever), but I happen to like Apple Mail, so would be happy to use it -- but I would need to use it as two different users in the two instances that would be running (after setting up the new mail account in the second user's login account).

I understand the notion of Fast User Switching -- I do not wish to do this. I want to have two copies of the Mail application running -- one as my own (primary) user, and another instance as a secondary user (with different accounts) within the same User Interface Framework -- not by switching back and forth between accounts.

This seems to be a thread that has died off in the past. There are many online items about running a GUI application as a different user, but none of these seems to work any more.

Is there a reasonable way to invoke a GUI application but have it run as a user other than the one logged in to the Finder Desktop session? I'm thinking of something along the lines of a terminal command that would look like:

% open -n -asuser seconduser -a Mail

(which, if such a command existed, would open a new instance of the given application ("Mail" in this case), but in such a way that it was started by "seconduser").

Is there any collective MacOS wisdom available that could help accomplish this?

Many Thanks,
 

NoBoMac

Moderator
Staff member
Jul 1, 2014
6,245
4,934
Don't think open command allows uid changes.

Now, can open Terminal, then issue: su otheridhere

Terminal is now other user. Can then try to launch Mail via open command.

Maybe an issue: Mail might not allow two concurrent windows. Seen other programs behave that way. And or some other startup issue.
 

Koinu

macrumors newbie
Original poster
Nov 13, 2006
18
9
Don't think open command allows uid changes.

Now, can open Terminal, then issue: su otheridhere

Terminal is now other user. Can then try to launch Mail via open command.

Maybe an issue: Mail might not allow two concurrent windows. Seen other programs behave that way. And or some other startup issue.
Thanks -- I have tried this - I simply get an error. It probably has to do with the other user not being able to open a GUI window in the Desktop session owned by my primary user.

I'm hoping that someone has managed to actually get this to work and can share the secret recipe!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.