1

error from wxt

I was using gnuplot in Ubuntu with wxt terminal, and when I type in plot sin(x), I get an error message:

Unable to init server: Could not connect: Connection refused 23:00:40: Error: Unable to initialize GTK+, is DISPLAY set properly? Failed to initialize wxWidgets.

6
  • Is this real Ubuntu - or Ubuntu via Windows Subsystem for Linux (WSL)? Commented Nov 25, 2021 at 23:20
  • By default, gnuplot expects a graphical environment. In gnuplot, help set terminal will show other choices. Commented Nov 25, 2021 at 23:37
  • @steeldriver I'm using Ubuntu in a box on windows- I actually didn't know WSL has Ubuntu... Commented Nov 25, 2021 at 23:45
  • @waltinator Yeah, I tried some other terminals, fig and png for example, but they either showed me a block of numbers or some garbled characters, and there's no plotting window. Commented Nov 25, 2021 at 23:48
  • 1
    fig and png are file formats - you will need to redirect their terminal output to a file, which you may then copy to and view in your Windows GUI if your Ubuntu system is CLI only. Commented Nov 26, 2021 at 0:06

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.