That message is because you do not have permissions from that shell (root) to display GUI windows to the X server that I presume is running as your normal user.
In another window as your normal user:
$ xhost +
Then try it again. If it still does not work then you can try explicitly setting the $DISPLAY
variable in root's shell:
$ export DISPLAY=:0.0
Then repeat your command, display ...
.
I've logged into a remote server via SSH
If you've logged into some distant server using something like ssh root@remote
you'll likely get something like this:
$ ssh -x root@skinner xeyes
Error: Can't open display:
$
Now if you use the switch -X
:

You should get the GUI app remotely displayed back to you.
MobaXterm
and problem solved – JP Zhang Mar 22 '20 at 19:41