Can each user have their own separate VNC Session on Mac OS?

Follow

Yes - you need to run multiple user-mode servers with Fast User Switching turned on.

By default, VNC Server runs in Service mode and all connections are made to the console. Users will be competing for control of the mouse and keyboard. Under Mac OS X, providing Fast User Switching is turned on, more than one host computer user can log on at a time by running VNC Server in User Mode.

Later versions of Mac OS (10.13 / High Sierra and later) have enforced a maximum of 5 concurrent "switched" users.

Note that all instances, in either mode, must listen on different ports and you will require a license for each instance of VNC Server running in User Mode.

The steps for each user are as follows:

  1. Log in to the User's session/account on the Mac (This can be done while connected using Service Mode VNC Server, if you do not have physical access to the Mac)
  2. Open a Terminal window and type: /Library/vnc/vncserver-root -newinstance &
  3. This will start a User Mode VNC Server running on the user session that you are logged in with.
  4. Open VNC Server Options by right clicking the VNC Server icon (User Mode) in the top right, and then:
    • Change Expert tab > StopUserModeOnSwitchOut to False
    • Change Connections tab > Allow VNC connections over TCP to 5901
      Note: a different port is required for each User Mode server
  5. In VNC Viewer, enter IP:Port where IP is the IP address of the server, and Port is the port that you set for the User Mode server.
    • You may need to add in the other user(s) to the VNC Server > Options > Users & Permissions tab. By default VNC Server will only accept the user that started the user mode VNC Server.
  6. Users must make sure that they do not Log Out, as this will terminate their user mode server

Perform steps 1 - 6 for each user session you want to create on the Mac. Please ensure that Terminal is enabled in System Preferences, Privacy and Security, Accessibility section.

The User Mode server can be automatically run on login to the Mac user account. To do this:

  1. Open the Automator application from Launchpad/Finder
  2. Select "Application"
  3. Click "Show library" in the toolbar (if hidden)
  4. Add "Run shell script" (from the Actions/Utilities)
  5. Enter your script into the window, from Step 2 at the beginning of this article
  6. Test, by clicking the Run button in Automator
  7. Save the app using File -> Save
  8. Go to System Preferences -> Accounts -> Login items
  9. Add the app created by Automator
  10. Log out and back in to test the Login Item
Was this article helpful?
0 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.