Robotics StackExchange | Archived questions

Turtlesim LXD Container

Hello,

I have ROS 2 set up on Ubuntu 22.04 in an LXD container according to the following tutorial/guide: https://canonical.com/blog/install-ros-2-humble-in-ubuntu-20-04-or-18-04-using-lxd-containers

I set up ROS 2 according to the installation guide: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html

Since by default the LXD containers do not have GUI support, I used this guide to try and enable such property: https://ubuntu.com/blog/ros-development-with-lxd

However, after going through the appropriate steps as outlined in the above guide, I am faced with the following error when attempting to run turtlesim as part of the beginner tutorial on ROS 2 (https://docs.ros.org/en/humble/Tutorials/Beginner-CLI-Tools/Introducing-Turtlesim/Introducing-Turtlesim.html):


No protocol specified qt.qpa.xcb: could not connect to display :0 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.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.


After searching online for a solution and have trying multiple (including the most popular which is to simply reinstall libxcb packages), none have seemed to work for me and I still end up with the same error.

Is there anyone who has experienced this and would like to share their solution?

Much appreciated.

Asked by messiah on 2022-07-09 16:41:44 UTC

Comments

Answers