I'm working on some Raspberry Pi's and I need serial communications to the units to determine IP address.

I've installed Putty via HomeBrew and with some assistance from this link. I also installed MacPorts via this link.

When I run $ putty, I get the error message: (putty:36407): Gtk-WARNING **: cannot open display:

Anybody know what's going on? Is there a better way to communicate with a remote device via USB - FTDI Serial Adapter and putty?

Note: I'm using MacOS Sierra (10.12.5)


2 Answers 2


So I gave up on Putty and MacPorts.. I've now removed both programs due to breakage around gtk dependencies.

For normal ssh communications, The built in terminal app and screen command line interface programs do everything putty is needed to do on windows or other os.

For a while my USB to FTDI serial communications used a program called Cornflake. Choose ettings = device with USB in the title, baud: 115200, packet: none-8-1 and flow: none)

Hint: You want to have the USB/FTDI device plugged in with Cornflake running BEFORE you power up the Raspberry Pi.

In the end Cornflake worked fine, kinda, sorta initially but has issues with some things you may want to do.

  1. It didn't hide my login password which is not normally a problem, but I'm teaching others realtime with screen broadcast so those credentials leaked.
  2. Any command line tool that does fancy stuff (e.g. nano) fails in Cornflake.

Instead I've now migrated to using the native command line terminal and the screen command, per this reference.

Open Terminal.

$   ls /dev/tty.*          # to see all available ports.

You can now use the screen command to to establish a simple serial connection.

$    screen <port_name> <baud_rate>          # to create a connection.

In my particular case:

$    screen /dev/tty.usbserial-AE00BS5L 115200

This works quite well for all my needs.


Putty can be installed on MAC OSX in three easy steps as shown below:

  1. Open Terminal
  2. Install homebrew with the following command:

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null

  3. Run the following command to install putty:

    brew install putty

  • This is a great answer for someone that needs putty auxiliary tools only installed. The problem here seems to be that non current versions of putty error out after installing. Can you edit this to show how it addresses the X11 / gtk error OP faced? This should probably just be deleted unless a substantial edit makes it relevant to the problem at hand.
    – bmike
    May 16, 2020 at 1:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .