Skip to content

Dev container: clone path, QT_XCB_NO_MITSHM, vim - #106

Merged
fjp merged 1 commit into
noetic-develfrom
fix/devcontainer-followups
Oct 11, 2026
Merged

fjp merged 1 commit into
noetic-develfrom
fix/devcontainer-followups

Conversation

@fjp

@fjp fjp commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Code fixes found while reviewing the comments in #105.

  • setup.sh: repositories cloned into src/src/. vcs import --skip-existing src < src/diffbot/diffbot_dev.repos passed src as the base folder, but the paths in diffbot_dev.repos already start with src/. So rplidar_ros and remo_description ended up in ~/catkin_ws/src/src/. The build still worked because catkin searches subfolders. vcs import now runs without a base folder, as in the manual setup in the README.
  • devcontainer.json: QT_XCB_NO_MITSHM=1 replaces QT_X11_NO_MITSHM=1. The old variable came from the ROS Docker GUI tutorial, but only Qt 4 reads it; Noetic's Qt 5.12 reads QT_XCB_NO_MITSHM. Without it, Qt 5 tries to share memory with the X server (MIT-SHM). That fails because the container has its own IPC namespace; Qt then gives up and draws normally.
  • Dockerfile: vim next to nano. The ARG lines for the user's name and IDs sit next to the step that creates the user. find no longer filters .git, which .dockerignore already keeps out of the build context.
  • host-x11.sh: the script's folder gets its own variable, script_dir.

A container created before this change has the two repositories in src/src/. Rebuild it (Dev Containers: Rebuild Container) before running the new vcs import command in it, or catkin finds each package twice.

The docs get the same vcs import fix and a paragraph on QT_XCB_NO_MITSHM in a separate PR in ros-mobile-robots.github.io.

Testing

  • The image builds. vim is installed, the user ros has UID 1000, and the manifests stage copies the same 10 package.xml files as before.
  • setup.sh in a container from the new image, with the clone mounted as in devcontainer.json: the repositories land in src/rplidar_ros and src/remo_description, there's no src/src, and all 13 packages build. A second run skips the existing repositories, builds again, and leaves a single source line in .bashrc.
  • MIT-SHM: an Xvfb X server in one container and a Qt 5 window in another, sharing only the X socket folder, like the host and the dev container. With QT_X11_NO_MITSHM=1, Qt's debug log is the same as with no variable: xcb_shm_attach() failed, then disabling SHM. With QT_XCB_NO_MITSHM=1, Qt doesn't try. In all three cases the X server shows the window correctly.
  • host-x11.sh called from another folder still writes .x11/xauth next to itself, with modes 700 and 600, and turns a test cookie into a ffff (wild) entry. Without an Xauthority file, as on WSLg, it leaves the file empty and exits with 0.

@fjp
fjp force-pushed the docs/dev-container-readme branch from cf268e4 to 496ebdb Compare October 11, 2026 14:37
@fjp
fjp force-pushed the fix/devcontainer-followups branch from 84f78d0 to bb43fcb Compare October 11, 2026 14:37
Base automatically changed from docs/dev-container-readme to noetic-devel October 11, 2026 18:17
- setup.sh: vcs import cloned rplidar_ros and remo_description into
  src/src/, because the paths in diffbot_dev.repos already start with
  src/. It now runs without a base folder, so they land in src/ as in
  the manual setup.
- devcontainer.json: QT_XCB_NO_MITSHM=1 replaces QT_X11_NO_MITSHM=1,
  which only Qt 4 reads. Qt 5 would try to share memory with the X
  server, which fails because the container has its own IPC namespace.
- Dockerfile: vim next to nano; the user's ARG lines sit next to the
  step that creates the user; find no longer filters .git, which
  .dockerignore already keeps out of the build context.
- host-x11.sh: the script's folder gets its own variable, script_dir.
@fjp
fjp force-pushed the fix/devcontainer-followups branch from bb43fcb to c46633c Compare October 11, 2026 18:18
@fjp
fjp merged commit 8a39cae into noetic-devel Oct 11, 2026
9 checks passed
@fjp
fjp deleted the fix/devcontainer-followups branch October 11, 2026 18:35
@fjp fjp added the bug Something isn't working label Oct 14, 2026
@fjp fjp self-assigned this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant