Error: Unable to initialize GTK+

Hi everyone,

I am working through the Elixir tutorial and try to spin up the the observer in iex:

$ iex -S mix
iex> :observer.start

and I get the following error message:

Error: Unable to initialize GTK+, is DISPLAY set properly?

I am working on a Cloud9 instance and GTK 2 and 3 seem to be installed. Any ideas how I could fix this?

Thanks in advance!

1 Like

What distribution is c9 running on? Are you connecting through SSH or do you have an X-Session available? How did you install Erlang and elixir? How did you install wx-Widgets and GTK?

2 Likes

my 2 cents.

For a quick test to know if you have wx module installed:

  1. open a terminal:
  2. open erlang terminal typing: erl
  3. then execute the demo wx:demo(). you should see an Erlang window with some examples. If this does not work then you probably need to install wxWidgets.

I have installed it with asdf my issue was with ssh