CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Discussions related to using VirtualBox on Linux hosts.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by Perryg »

Since you are using NAT you will need to use the host ip and the guest port which you should have setup.

Also until you get the hang of all this you should set the authentication to null ( none ). It is not as secure that way but on a NAT connection it will be good enough until you figure all of this out.
GioMBG
Posts: 18
Joined: 28. Jun 2017, 18:46

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by GioMBG »

hi Perryg,
You overlooked me... and here, in fact of virtualbox, the guru it's you...
Since you are using NAT you will need to use the host ip and the guest port which you should have setup.
I've try to see around the guide how to setup the guest port which I should have to setup but I don't find where try to copy the right row...
authentication to null ( none ).
idem
any suggestions ?
always thanks
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by Perryg »

You can find all of the VBoxManage commands in chapter 8.2

Code: Select all

VBoxManage modifyvm <vm name> --vrdeport <hostport>
Typical port should be 3389 by default and it can cause conflicts so any other valid port would do.
GioMBG
Posts: 18
Joined: 28. Jun 2017, 18:46

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by GioMBG »

hi Perryg,
just set with another port with any warning,

Code: Select all

VBoxManage modifyvm "Win7" --vrdeport 3390
VBoxManage modifyvm "Win7" --vrdeauthtype null
VBoxHeadless --startvm "Win7"
Oracle VM VirtualBox Headless Interface 5.1.26
(C) 2008-2017 Oracle Corporation
All rights reserved.
now when I try to connect form apple mac, because I don't found any matches regarding witch client to use from my Linux Fedora I receive

Code: Select all

Connection Refused
there is a way to check that virtualbox running normally ?
always thanks
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by Perryg »

Your connection refused is an authentication issue or permissions issue. It can also mean that the connection path is not found because of the way the error reporting works.
Without the guests log file ( as an attachment ) it will be impossible to tell what might be the cause from a remote location I am afraid.
GioMBG
Posts: 18
Joined: 28. Jun 2017, 18:46

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by GioMBG »

hi Perrig,
yes of course,
I have 4 .log
this is the Vbox.log
VBox.log
(57.44 KiB) Downloaded 15 times
if is needed the others 3

Code: Select all

Vbox.log1
Vbox.log2
Vbox.log3
I will attach...
always thanks
Gio
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by Perryg »

Code: Select all

00:00:00.297105 Installed Extension Packs:
00:00:00.297112   None installed!
00:00:00.297224 Console: Machine state changed to 'Starting'
00:00:00.311202 VRDE: VirtualBox Remote Desktop Extension is not available.
The first thing you need to do is install the extension pack ( on the host ). This is a requirement so you can use vRDP to connect to the guest. Then see if we need to continue this discussion.
GioMBG
Posts: 18
Joined: 28. Jun 2017, 18:46

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by GioMBG »

hi Perryg,

Code: Select all

Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to install "/home/horse/Oracle_VM_VirtualBox_Extension_Pack-5.0.40-115130.vbox-extpack"
VBoxManage: error: The installer failed with exit code 127: Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty'): No such device or address
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ExtPackManagerWrap, interface IExtPackManager
VBoxManage: error: Context: "RTEXITCODE handleExtPack(HandlerArg*)" at line 1201 of file VBoxManageMisc.cpp
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by Perryg »

You must use su/sudo to install the extension pack and manually from a terminal. See example below:

Code: Select all

sudo VBoxManage extpack install <tarball>
GioMBG
Posts: 18
Joined: 28. Jun 2017, 18:46

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by GioMBG »

hi Perryg,
Good Day,
is seems that I've not get the right file or my distro install an older version of VirtualBox,
I've tried to download an older version of the Extension Packs but always the same error
maybe you know witch version of the Extension Packs is recommended for my VirtualBox vers. ?

Code: Select all

License accepted. For batch installaltion add
--accept-license=715c7246dc0f779ceab39446812362b2f9bf64a55ed5d3a905f053cfab36da9e
to the VBoxManage command line.

0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to install "/home/horse/Oracle_VM_VirtualBox_Extension_Pack-5.0.40-115130.vbox-extpack"
VBoxManage: error: VBoxExtPackRegister returned VERR_VERSION_MISMATCH, pReg=0000000000000000 ErrInfo='VirtualBox version mismatch - expected 5.0 got 5.1'
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ExtPackManagerWrap, interface IExtPackManager
VBoxManage: error: Context: "RTEXITCODE handleExtPack(HandlerArg*)" at line 1201 of file VBoxManageMisc.cpp
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by Perryg »

Your version == VirtualBox VM 5.1.26 r117224 linux.amd64
You need http://download.virtualbox.org/virtualb ... ox-extpack
GioMBG
Posts: 18
Joined: 28. Jun 2017, 18:46

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by GioMBG »

hi Perryg,
maybe seeing the light at the end of the tunnel...
always THANKS for your patience and your precious support...

Code: Select all

License accepted. For batch installaltion add
--accept-license=715c7246dc0f779ceab39446812362b2f9bf64a55ed5d3a905f053cfab36da9e
to the VBoxManage command line.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully installed "Oracle VM VirtualBox Extension Pack".
after

Code: Select all

[horse@swinger ~]$ VBoxHeadless --startvm "Win7"
Oracle VM VirtualBox Headless Interface 5.1.26
(C) 2008-2017 Oracle Corporation
All rights reserved.
VRDE server is listening on port 3389.
I've try to connect from a WIN10 remote desktop
using : horse and the horse passwd of CentOS
on this port 3389 and 3990 but I receive that is impossible to connect...
maybe I have to configure something else ?
always thanks
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by Perryg »

You should use the hosts IP address and the guests port number and there really should not be a need to login and password until you actually connect to the guest. Even then since this is a new install the login and password would not have been set yet so you should see the screen to install. Example below:
  • Host ip == 192.168.0.5
    Guest post == 3390
192.168.0.5:3390 would be the connection string.

Note: you must use the port number you assigned to the guest. You can look at the guests info and verify
  • VBoxManage showvminfo <name>
GioMBG
Posts: 18
Joined: 28. Jun 2017, 18:46

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by GioMBG »

formatting to re-install ALL
GioMBG
Posts: 18
Joined: 28. Jun 2017, 18:46

Re: CentOS Minimal 7.3: Qt FATAL: QXcbConnection: Could not connect to display

Post by GioMBG »

hi Perryg,
REALLY THANKS FOR YOUR SUPPORT !
Today I've see VirtualBox going connecting from my Windows ( not from the mac ) but now I can write that VirtualBox run !
of course there will be to adjust something like more memory to install Win 7, the virtualizer ask at least 8 Gbyte here in the code under I've set 5
also I've to adjust to not see two mouse arrow but these will be material for other forums...

I've created a new vm "Win72" under "virtualbox" user as :

Code: Select all

from root creating a new user virtualbox

adduser virtualbox
passwd mypasswd

...login as virtualbox for preserve the file permissions as virtualbox

[virtualbox@swinger ~]$ sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-5.1.26.vbox-extpack

Do you agree to these license terms and conditions (y/n)? y

License accepted. For batch installaltion add
--accept-license=715c7246dc0f779ceab39446812362b2f9bf64a55ed5d3a905f053cfab36da9e
to the VBoxManage command line.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully installed "Oracle VM VirtualBox Extension Pack".

[virtualbox@swinger virtualbox]$ sudo /usr/lib/virtualbox/vboxdrv.sh setup
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: Starting VirtualBox services.

[virtualbox@swinger ~]$ sudo VBoxManage createvm --name "Win72" --ostype Windows7_64 --register
Virtual machine 'Win72' is created and registered.
UUID: e99e7aca-c69c-4f60-87e4-77c081aca63d
Settings file: '/root/VirtualBox VMs/Win72/Win72.vbox'

[virtualbox@swinger ~]$ sudo VBoxManage modifyvm "Win72" --memory 2048 --acpi on --nic1 nat

[virtualbox@swinger ~]$ sudo VBoxManage createhd --filename "Win72.vdi" --size 5000
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 56e26efa-6491-40f2-aa45-10eb1b6354b3

[virtualbox@swinger ~]$ sudo VBoxManage storagectl "Win72" --name "IDE Controller" --add ide --controller PIIX4

[virtualbox@swinger ~]$ sudo VBoxManage storageattach "Win72" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium "Win72.vdi"

[virtualbox@swinger ~]$ sudo VBoxManage storageattach "Win72" --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium /home/virtualbox/Win7.iso

[virtualbox@swinger ~]$ sudo VBoxManage modifyvm "Win72" --vrde on

[virtualbox@swinger ~]$ sudo VBoxManage modifyvm "Win72" --audio none

[virtualbox@swinger ~]$ sudo VBoxManage modifyvm "Win72" --vrdeport 3990

[virtualbox@swinger ~]$ sudo VBoxHeadless --startvm "Win72"
[sudo] password for virtualbox: 
Oracle VM VirtualBox Headless Interface 5.1.26
(C) 2008-2017 Oracle Corporation
All rights reserved.

VRDE server is listening on port 3390.
as You write I connect by insert IP:3390 after Win ask me the virtualbox user passwd et I've see for my first time VirtualBox RUNNING !
thanks again Perryg
Gio
Post Reply