4

I have installed the Ubuntu extension for Windows, but I run into troubles when I want to use gnuplot... I am just trying to plot a simple data file, but I get the following error :

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-julien_barbaud'

qt.qpa.screen: QXcbConnection: Could not connect to display 

Could not connect to any X display.

Could not connect to existing gnuplot_qt. Starting a new one.

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to
'/tmp/runtime-julien_barbaud'

qt.qpa.screen: QXcbConnection: Could not connect to display 

Could not connect to any X display.

As you may guess, I am not veryfamiliar with this problem. Is there Something I should set up in my environment to fix this ?

EDIT: after the suggestion in comments, I tried to use set term postscript. The output is different, but still no plot...

plot output after set term postscript

And after trying set term png, the plot command gives me this:

enter image description here

Barbaud Julien
  • 211
  • 1
  • 3
  • 10
  • 2
    It looks like you're not running under an X window environment. Perhaps you should install `gnuplot-nox - Command-line driven interactive plotting program. No-X package` – waltinator Jan 03 '19 at 03:49
  • Thanks for your suggestion. However, I did install gnuplot-nox (`sudo apt install gnuplot-nox`) before trying to run the programm. I also installed gnuplot-qt right after – Barbaud Julien Jan 03 '19 at 03:57
  • What is the output of `show term` (at the gnuplot prompt)? In the absence of an X server, you may need to set the terminal type to something that writes directly to file e.g. `set term postscript` or `set term png` – steeldriver Jan 03 '19 at 04:02
  • I tried `set term png`. I still don get any plot but the output is different : I get `PNG (բ IENDB\`gnuplot>` Postscript is not doing better... – Barbaud Julien Jan 03 '19 at 05:07

2 Answers2

2

I could solve my problem by downloading Xming on my Windows system, so that linux can access X11 The qt terminal works well in this condition.

Thanks for the help !

Barbaud Julien
  • 211
  • 1
  • 3
  • 10
  • By `"downloading Xming on my Windows system"` you mean you're dual-booting windows + ubuntu and you installed Xming on your windows partition? Or you're using Ubuntu on wsl and by Windows you mean your host OS? – Antoine Dahan Oct 15 '21 at 02:51
  • @toinetoine I was in the latter situation, using wsl – Barbaud Julien Oct 15 '21 at 08:12
0

Add

libmali-xlnx
libmali-xlnx-dev
packagegroup-petalinux-x11-dev

in rootfs configure.
Then execute

killall Xorg 

(no need when running Xorg for the first time).
Finally run

export DISPLAY=:0.0
/usr/bin/Xorg -depth 16&

and then run the qt project.

zx485
  • 2,249
  • 11
  • 24
  • 34