Can each user have their own separate session on macOS?



Yes, if you have a subscription that includes offline licensing. To achieve this setup you need to run multiple User Mode RealVNC Servers with Fast User Switching turned on in macOS itself.

By default, RealVNC Server runs in Service Mode and all connections are made to the console session. Users will be competing for control of the mouse and keyboard.

Under macOS, however, providing Fast User Switching is turned on, more than one user can log on with their own session by running RealVNC 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 RealVNC Server running in User Mode.

Please also note that if a user is connected to a switched-out session, and the user logged in to the console session presses the SHIFT key, then the connected RealVNC Viewer user's typing in their own session will be affected too.

The steps for each user are as follows:

  1. Log in to the user's session/account on the Mac. You can do this while connected to a Service Mode RealVNC Server, if you do not have physical access to the Mac.
  2. Open a Terminal window and type: /Library/vnc/vncserver-root &
  3. This will start a User Mode RealVNC Server running in the user session that you are logged in with.
  4. Open RealVNC Server Options by right clicking the RealVNC 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 RealVNC 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 RealVNC Server > Options > Users & Permissions tab. By default RealVNC Server will only accept the credentials of the user that started the User Mode 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.

RealVNC Server in User Mode can be automatically run on login to the macOS 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 section
  5. Enter the script contents, which is: /Library/vnc/vncserver-root &
  6. Test the script 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?
11 out of 15 found this helpful



Article is closed for comments.