How to display your Raspberry Pi’s desktop on a Mac

Additional Check out how to view a Pi desktop on an iPad in this post.

I typically connect to my Raspberry Pis via SSH from my main machine, a Mac. This is fine for pretty much all of the tasks I perform on the Pis, but it only provides access to the commmand line. That’s not a problem for me, but I nonetheless wondered whether I might be able to access the Pi’s desktop UI remotely too.

Pi screen sharing
My Pi Zero’s desktop within my Mac desktop

It turns out that you can, using VNC (Virtual Network Computing). VNC is a standard, widely supported way of securely presenting a GUI remotely over a network connection. You need a suitable server running on the machine that will be sharing its desktop, and a client app to present that desktop on the computer you’re accessing the remote machine from. The client relays your mouse and keyboard input back to the remote computer.

The Raspberry Pi Foundation recommends a specific VNC server, tightvncserver, written by TightVNC Software. You can install in the usual way:

sudo apt-get install tightvncserver

When the software has downloaded and installed, it’s ready to run:


You will be asked to set up an remote access control password and to enter it a second time, as verification. You’ll also be asked if you’d like to enter a password for view-only access. This is optional; I just entered ‘n’ for no.

The server is now running and, if you set it up using SSH, you can log out of the Pi if you wish.

TightVNC doesn’t supply a client for Mac OS X, though it does offer a client for Windows and a cross-platform client that runs under Java. I’m not a fan of cross-platform tools — you tend to lose the benefits of your preferred OS — so I wondered if there was a native Mac OS X VNC client. There is and it comes free with your Mac, though you might never have seen it before.

Apple has long provided Apple Remote Desktop (ARD), a tool for remotely accessing Mac desktops. Over the years, it has gained support for a variety of remote access technologies, including VNC.

ARD doesn’t live in the Applications folder — it’s actually buried deep in the System folder — but it can be launched via finder: just hit Command-K to invoke the standard Mac ‘Connect to Server’ dialog. Here, enter


and click on ‘Connect’. The ‘vnc’ at the start sets the protocol you’ll use to connect to your remote Pi, which is identified here by its Bonjour (mDNS) name: its hostname (typically set using raspi-config followed by .local). The number after the colon is the port through which the communication takes place. tightvncserver defaults to VNC port 1. 5900 is the base VNC port, hence 5901.

Pi Screen Sharing
Point to your Pi using the standard ‘Connect to Server’ dialog

You’ll now be asked for the remote desktop’s access password. This is the password you set through tightvncserver, not your regular Pi password (they can be the same, of course, though it’s perhaps best to use different ones, for tighter security). You can choose to save the password in the keychain for faster access next time.

Pi Screen Sharing
Connect Screen Sharing to your Pi desktop server

All going well, you’ll now see your Pi’s X desktop appear in a window provided by an ARD app called Screen Sharing. Depending on your Pi (the faster the better) and the quality of your network connection (ditto), the desktop is quite useable. You might not want to do all of your Pi work this way, but it’s acceptable for occasional use.

When you’re done, you can open shut down your Pi (using the Terminal or the Pi menu) or select ‘Close’ from Screen Sharing’s Connection menu.

By default tightvncserver establishes an 800 x 400 desktop, but you can change that using the -geometry switch. You can set the colour depth using the -depth switch too. For example:

tightvncserver -geometry 1920x1080 -depth 24

Of course, the bigger the desktop and the higher the colour depth, the more data that needs to be sent to Pi to Mac, and the slower and less responsive the remote system will feel. Experiment to find the size you prefer. I usually stick with the default. I also set my Pis to boot to the command line and not to auto log in, so they don’t run separate X sessions in the background.

More Pi

More on VNC

24 thoughts on “How to display your Raspberry Pi’s desktop on a Mac

  1. fake one

    Please make sure that Screen Sharing (in the Sharing section of System Preferences) is enabled on the computer to which you are attempting to connect. Also make sure your network connection is working properly.
    ^this is what its saying

  2. Roy

    I have vnc working now . I use tightvncserver on the picture and Realvnc viewer on the Mac. I run up tightvncserver via ssh command and then use Realvnc viewer with the connection ‘raspberrypi.local:5901’
    Cheers for all of the previous clues😀

  3. Jerry Isdale

    trying it on a pi zero w … the pi gives its name on net (arp -a) as raspberrypi.lan with ip however none of the .lan .local or ip address work with ARD. I get Unable to resolve “;5901” drat. as I’m trying to run the pi0w headless with a camera to do a wearable project. Will try some other things

  4. Peklo

    Not sure if the info on Raspberry Pi foundation has changed from the time of writing, but they recommend RealVNC as of now.

  5. Jeff in TX

    Beautiful. This is SIGNIFICANTLY better than VNC Viewer (which is very good, mind you, but kinda proprietary and limited) when used on my home network. My Pi Zero W (the first of many) is now happily headless and no longer boots into a desktop, freeing up resources for other stuff. Thanks to you for showing the way!

  6. Wm. Cerniuk

    Would not recommend this approach. Java is a very inefficient system and tightvncserver relies upon Java to run on the Pi. Since there is not much of a processor on the Pi, you have to be conscious of what you run.

    Instead use the built-in RealVNC server and simply turn off the proprietary account system, switching it as:

    Security > Authentication: VNC password
    Security > Encryption: Prefer off

    and set up 1 or more VNC users as shown in the snapshots..

    See: – menu item – RealVNC Server Config menu – RealVNC Server security settings – RealVNC Sever User Settings

    And then you can use macOS’s native “Screen Sharing” **without** installing **anything** on your Mac. That is in fact how I captured those images linked above.

    1. K Lindberg

      On Mac it’s just to open the included app; press the keys cmd + space, search for “Screen” and then enter this address into the input field vnc://raspberrypi.local:5901

  7. eduncan911

    thanks for this!

    I originally followed the directions on another site for VNCServer, and wow they need a license? blah. uninstalled.

    and then found this info. worked perfectly!

    Raspberry Pi 3
    OS: Raspberry PIXEL Feb 2017

  8. Norm Peacey

    Why does my Mac loose the tightvncserver connection?
    Once I loose it I have great difficulty getting back in, what am I doing wrong?
    Please note that I am a beginner to all of the Raspberry Pi things.

  9. Beefcake9000

    In minibian I can remote VNC, however it doesn’t ‘share’ the root desktop user screen (i.e. gives me a new instance) any ideas how to solve this? X11 config mods or etc?? Great posting, thanks for sharing!

  10. Thomas

    the default bonjour name is ‘raspberrypi’ so you need to put in “vnc://raspberrypi.local:5901” or “vnc://[ip address of pi]:5901”

    the ip address is likely to be

    1. S. Chambers

      On The rasbperry pi do a : hostname -I in the command window, that’s a – capitol I as in Internet. it will tell you your DHCP IP address. On the Mac Side, in terminal command window: open vnc://pi@ Of course, use the IP address you got in the hostname -I on the raspberry pi.

      1. Howie

        I tried this and it worked the second time after setting up SSH – TY for posting 🙂

Comments are closed.