Home > Mac administration, Mac OS X > Opening screensharing connections on OS X using pre-set usernames

Opening screensharing connections on OS X using pre-set usernames

I use screensharing quite a bit, both at home and at work, to connect to machines. As part of this, my process for connection has looked something like this:

1. Verify I’m on the right network.

2. On the Mac I’m connecting from, under the Go menu, select Connect to Server…

Screen Shot 2015 06 03 at 7 29 10 AM

3. In the Server Address: line, enter the address of the Mac which I want to remotely connect to:


Screen Shot 2015 06 04 at 8 30 29 AM

4. Logging in by entering my authentication credentials into the screensharing login window’s username and password blanks.

Screen Shot 2015 06 04 at 7 09 27 AM

5. Assuming username and password are accepted, the remote Mac’s screen is displayed.

Screen Shot 2015 06 04 at 7 11 52 AM

As with any task I perform frequently, I wanted to shave some time off of this process but I didn’t want to save the screensharing authentication info to my keychain (personal preference).

Fortunately, there’s an easy way to pre-define the username for the screensharing login window by adding username@ to the vnc:// address:


Screen Shot 2015 06 04 at 7 09 43 AM

The username should now be filled in when the screensharing login window appears.

Screen Shot 2015 06 04 at 7 10 03 AM

Since you can also make bookmarks in the Connect to Server window, my next step was saving a bookmark for the updated screensharing address.

Screen Shot 2015 06 04 at 7 16 43 AM

It’s simple enough to do, but not having to manually enter the username will save me at least a few seconds every time I connect to a remote machine’s screen.

  1. John Haffner
    June 4, 2015 at 5:12 pm

    Good tip for time saving. How do you get around the “ask the user for permission” window in OS X screen sharing?

  2. Schnurps
    June 4, 2015 at 10:28 pm

    You can also provide a password within this scheme.
    Like vnc://username:password@servername

    • June 11, 2015 at 6:42 am

      But wouldn’t your password then be visible on the creek for every passer by to see?

      • June 11, 2015 at 6:43 am

        and by “creek”, I mean “screen”! (iOS autocorrect🙂

  3. Hank
    June 5, 2015 at 3:13 am

    Note that Screen Sharing.app also creates a link in ~/Library/Application Support/Screen Sharing/

    These are .vncloc files. I do not believe Screen Sharing.app saves the username in the file. You could create your own by selecting all of the text in the Server Address: box in the Connect to Server dialog and dragging the text to the desired spot (dragging the text to the Desktop will create the .vncloc file on your desktop, for example)

  4. Simon Andersen
    June 5, 2015 at 8:49 am

    Wouldn’t it be even faster to pin Screen Sharing.app to the Dock, check the “Remember this password in my keychain” box and for future connections just right click the Dock icon and choose one of the recent connections from the Dock icon?

  5. June 6, 2015 at 10:29 am

    I prefer making shortcut files, which can be sorted in folders and launched with a application launcher like Alfred.
    Use your text editor of choice and write the connection address like you would in the Connect to server window: vnc://optional_username:optional_password@servername_or_ip_address
    select this text and drag it to the desktop or a folder in Finder.

    You now have a double-clickable shortcut for screensharing connections. Rename the file to something sensible, and sort it in your own liking.

  6. Sam Fox
    June 29, 2015 at 9:57 pm

    You can also add a label tag at the end for those who connect via IP instead of machine name. e.g. vnc://admin@
    My question is, I would like to have a way to sort the ‘favorite server’ list. I was hoping I could just drag/drop entries in the list window to manually re-arrange, but no joy. I have about 40 systems so it would just be easier to have them sorted by #label name. Any idea how to do this?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: