Score:0

Ubuntu 20.04.6 on Virtualbox: Error - can't open display

bq flag

Currently using Ubuntu installed on Virtualbox with Windows 7 as the main system. Was going through some ROS basics with rosrun turtlesim turtelsim_node and got errors like:

qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

After googling and trying a lot of different options suggested have had no luck fixing it. But for me, it looks like it's not QT problem, but something related to a virtual machine, because when I'm trying to run

sudo apt-get install x11-apps
xeyes

I have almost the same issue

Error: Can't open display:

Maybe someone had the same issue or idea of what to look at.

Hugo avatar
mx flag
If not already run the Virtual Box Guest Tools installer and try again. When the VM is running click on the Devices tab at the top and Insert Guest Additions CD Image, then run the installer on the disk that is mounted.
IanGraham avatar
bq flag
@Baa tried this one, it helped to xeyes, but for ROS it still shows the same qt.qpa.xcb: could not connect to display issue :(
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.