0

I have tried various methods mentioned across many sites, but cant able to run perfectly on newer versions of mac os. I have tried:

sudo -i -u otheruser -H
OR
sudo login -f otheruser

And try running the app in the new prompt using /Applications/Sketch.app/Contents/MacOS/Sketch

Also I have tried:

su otheruser -c "/Applications/Sketch.app/Contents/MacOS/Sketch"

All of these run the app. But as soon as I open something which require system events (such as requesting macos native file picker) the application crashes. The following error is visible when such events are started.

+[NSXPCSharedListener endpointForReply:withListenerName:]: an error occurred while attempting to obtain endpoint for listener 'com.apple.view-bridge': Connection interrupted

I have tried with many applications. Exactly same error occurs. Please help.

3
  • 3
    With the newer versions of macOS, Apple fixed the bug that allowed you to do what you are trying to do. – David Anderson Jun 20 '20 at 8:25
  • I am facing this issue on macOS Catalina 10.15.5, latest stable release at the time of writing. Do you, by any chance, mean that the bug was fixed in macOS 11 beta? – Anirudh Gupta Jun 28 '20 at 10:02
  • The bug was what allowed it to work, the fix prevents what you want to do. – nohillside Jun 28 '20 at 11:06
2

You can‘t run UI applications as user A while being logged in as user B. The easiest way to get something similar is to enable Fast User Switching and then switch between user A and user B as needed. But each user will have its own Finder etc then, you can‘t use applications on the same screen at once.

2
  • I disagree. There are soo may old forums where they have given the ways to do so. Bu they work on on older versions of mac (2010 - 2017). Even linux allows you to do this easily using sudo -u. There must be some way on latest macOS to do this. – Anirudh Gupta Jun 28 '20 at 10:22
  • @AnirudhGupta The windowing system on Linux works completely different than on macOS – nohillside Jun 28 '20 at 11:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .