Gtk-WARNING - cannot open display error.
by ddenial from LinuxQuestions.org on (#5EPKY)
Hi
Distro: Debian 10 Gnome
I'm trying to install a guest virtual machine in KVM virtualization. But I'm getting this 'Gtk-WARNING - cannot open display' error.
Following is the command I issued in gnome-terminal:
Code:$ sudo virt-install --name cnt --memory 1024 --vcpus 1 --disk path=/var/lib/libvirt/images/cnt.qcow2,format=qcow2,bus=virtio,size=10 \
--location /dc/os/CentOS-8.3.2011-x86_64-dvd1.iso --network default --os-variant rhel8.0
Starting install...
Retrieving file .treeinfo... | 1.5 kB 00:00:00
Retrieving file vmlinuz... | 9.1 MB 00:00:00
Retrieving file initrd.img... | 70 MB 00:00:00
Allocating 'cnt.qcow2' | 10 GB 00:00:01
No protocol specified
Unable to init server: Could not connect: Connection refused
(virt-viewer:3812): Gtk-WARNING **: 18:16:43.052: cannot open display: :0
Domain installation still in progress. You can reconnect to
the console to complete the installation process.If I enter gedit or virt-manager from gnome-terminal, they all open without any issue. Problem is only with virt-viewer.
What should I do?
Thanks


Distro: Debian 10 Gnome
I'm trying to install a guest virtual machine in KVM virtualization. But I'm getting this 'Gtk-WARNING - cannot open display' error.
Following is the command I issued in gnome-terminal:
Code:$ sudo virt-install --name cnt --memory 1024 --vcpus 1 --disk path=/var/lib/libvirt/images/cnt.qcow2,format=qcow2,bus=virtio,size=10 \
--location /dc/os/CentOS-8.3.2011-x86_64-dvd1.iso --network default --os-variant rhel8.0
Starting install...
Retrieving file .treeinfo... | 1.5 kB 00:00:00
Retrieving file vmlinuz... | 9.1 MB 00:00:00
Retrieving file initrd.img... | 70 MB 00:00:00
Allocating 'cnt.qcow2' | 10 GB 00:00:01
No protocol specified
Unable to init server: Could not connect: Connection refused
(virt-viewer:3812): Gtk-WARNING **: 18:16:43.052: cannot open display: :0
Domain installation still in progress. You can reconnect to
the console to complete the installation process.If I enter gedit or virt-manager from gnome-terminal, they all open without any issue. Problem is only with virt-viewer.
What should I do?
Thanks