On my work Mac, which stays physically in my work office, I want to keep my work stuff separate from my personal stuff by using two different user accounts. I normally stay logged in as the 'work' user. But I want to have them visible at the same time, since I have a large screen. I think I could get a nice setup if I could use the built in remote desktop client or a 3rd party VNC client to connect to the login screen of the existing machine, so that I can select a different user. Or if I could connect as a specific user, even though the physical machine is already logged in as someone else.

I normally use my system with "remote management" mode enabled (not just remote desktop), and I often use a VNC client at home to access my Mac desktop at work. Although this is not my daily routine. In this mode the VNC client immediately connects to the existing desktop. Is there a way I can force this connection to go to the login screen instead? When I use a VNC client to connect to the existing screen, I can see it trying (you get the kind of infinite regress that you might expect), so the basic connection works. I just want it to let me select another user.

Edit: I think part of the problem is that the system might be running a VNC server session in the background waiting for me to connect. It connects to the active session. It seems to happen either when I have "remote management" turned on or just "screen sharing". Using an alternate user in an "open" command results in an error about not being able to control your own screen.

To be clear, both accounts are on my work computer. From home I want to connect to my "work user" on my work computer. From my desk at work, logged in as my "work user" I want to be able to connect to the "personal user" on my work computer.

I think my real problem is related to what happens on the server side of the connection. I want the OS to fire up the login window even through there is a user logged in on the main screen/keyboard. I know that is some circumstances a remote-login user can receive the login screen. It might be necessary for me to give up the idea of sometimes connecting to the logged-in user and sometimes connecting with a fresh login. If I can switch completely to the fresh-login mode that would be a start.

How does Mac OS decide whether to show the login-screen for a remote connection versus just connecting you to the running desktop? I thought it was related to having "remote management" turned on vs "screen sharing". But with just "screen sharing" turned on, I still get the connect-to-existing behavior.

ARD into your "work account" and then do the following on the remote computer to open a Screen Sharing window to your "personal account" on the same remote computer.

Create an SSH tunnel. It works for me using 10.9.

Enable Remote Login (SSH) in System Preferences > Sharing, and in Terminal run:

ssh -NL 5901:localhost:5900 localhost

Finally, use Screen Sharing to connect to localhost:5901 (instead of the default port 5900). Instead of port 5901 you can use a much higher port that isn't in use by anything else.

The Screen Sharing application is located here: /System/Library/CoreServices/Screen Sharing.app

  • This just redirects 5901 to 5900 right? It doesn't actually run a new remote login process on the server side. – Chris Quenelle Nov 4 '14 at 1:40
  • SSH manpage:: -L Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. :: -N Do not execute a remote command. This is useful for just forwarding ports (protocol version 2 only). – mindmischief Nov 7 '14 at 23:47
  • Oh my god, that's great! Finally I can quickly check things like localized strings in menus without resorting to virtual machines or logging out and back in! – Asmus Dec 12 '14 at 13:14
  • This indeed is great, finally something like nested X on Linux. It's working on Sierra. Having another user's account opened on second virtual desktop is much better than constantly switching accounts. – Mr. Tao Oct 23 '16 at 20:24

You can specify a specific user using the open command in terminal.

open vnc://user:password@hostname(or IP)

This is also achievable through Go Connect to Server ( cmd + k) from the finder and entering vnc://hostname(or IP)

You can only have two users running on one machine remotely.

  • With 10.9 both of these say, "You can't control your own computer." They both effectively open up Screen Sharing which won't allow it. – mindmischief Oct 18 '14 at 2:05
  • I get the message about "You cannot control your own screen". – Chris Quenelle Oct 18 '14 at 2:10
  • I see from your edit above that that isn't possibly. Have you tried connecting to each user from your home computer separately. – tron_jones Oct 18 '14 at 2:23
  • I was able to get it to work via my explanation – mindmischief Oct 22 '14 at 22:49
  • If you got a fresh-login screen on the same machine, which a user already logged in, please tell me what items you have turned on it the 'Sharing' settings. – Chris Quenelle Nov 4 '14 at 1:43

To clarify @mindmischief answer, here are the steps to set it up:

  1. (optional) Create a new user (e.g. vnc) in Preferences/Users with the password.
  2. In Preferences/Sharing, enabled Screen Sharing and Remote Login (also Allow access for it).
  3. Verify that ssh vnc@localhost works.
  4. Run: ssh -NL 5901:localhost:5900 vnc@localhost (as per this post).

Note: You can use different user than vnc. For debug, add -vvv to your ssh command.

Now open the VNC connection by the following command:

open vnc://localhost:5901/
  • how is creating a new user optional? How can i connect without having a user? It seems you have to specify one under "Allow access for:" – trainoasis Jun 19 at 6:50
  • @trainoasis You could always ssh to another existing user. – kenorb Jun 19 at 9:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.