How can I see application clickable in display using cursor and touch?

Hello Toradex Community,

I am using Colibri iMX7D 1GB with Torizon OS (Debian-based).

My setup:

  • Torizon OS with Docker
  • Running my PyQt5 / Python3 GUI application inside a Docker container
  • Display output works fine — the application runs and renders on the screen
    My issue:

The application shows correctly, but it is not clickable.
The cursor is not visible.
I have /dev/input/touchscreen0 and several /dev/input/eventX devices available.
I am running torizon/arm32v7-debian-weston as the Weston container, but it fails with messages like:

vbnet

Copy code

Couldn't get a file descriptor referring to the console
/usr/bin/weston-launch: failed to open tty: No such file or directory

I tried setting QT_QPA_PLATFORM=wayland and QT_QPA_PLATFORM=linuxfb, but still no touch/cursor.

What I’ve tried:

Running Weston container with --device /dev/fb0 --device /dev/input --device /dev/dri
Running my application with QT_QPA_PLATFORM=linuxfb / wayland
Linking /var/lib/docker to SD card for space, Docker runs fine now
What I need help with:

  • How can I properly enable cursor and make touch/clicks work?
  • Is there any additional configuration for Weston or debian Qt on Torizon OS (iMX7D without GPU)?
  • What is the recommended approach for this setup?
    @ToradexAI

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for your detailed description. Your situation is common when using the Colibri iMX7D (which lacks a GPU) with Torizon OS, Weston, and touch-based Qt GUIs. Let’s address each point:


1. Weston Container: Correct Launch for iMX7

For Colibri iMX7 devices, the recommended way to start Weston differs from other i.MX SoMs. Please use this specific Docker command:

docker run -d --rm --ipc=host --name=weston --net=host --cap-add CAP_SYS_TTY_CONFIG \
    -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ \
    --device-cgroup-rule='c 4:* rmw' --device-cgroup-rule='c 13:* rmw' \
    --device-cgroup-rule='c 226:* rmw' \
    torizon/weston:$CT_TAG_WESTON --developer \
    --tty=/dev/tty7 -- --use-pixman

This command:

  • Ensures all the required device files and udev are available inside the container.
  • Forces usage of the Pixman renderer (--use-pixman) since the iMX7 has no GPU.
  • Launches Weston with the correct tty.

Note: Using /dev/fb0, /dev/dri, and /dev/input individually is not sufficient; bind-mounting /dev and /run/udev as shown above is preferred.
See: Remote Access the TorizonCore GUI Using VNC or RDP - Colibri iMX7


2. Touch & Cursor Handling

Cursor

  • Ensure your weston.ini (typically bind-mounted or placed in /etc/xdg/weston or /root/.config/weston.ini inside the container) contains:

    [shell]
    locking=false
    cursor-theme=hicolor
    cursor-size=32
    

    See details: Weston Customization

    • If you want a transparent cursor (for touch-only devices), refer to the transparent cursor themes linked in the documentation above.

Touch Input

  • Some applications expect mouse (pointer) events, not just touch events—use the touch2pointer feature in Weston.

  • In your weston.ini, ensure:

    [keyboard]
    vt-switching=true
    
    • This is especially helpful for making touch events function as pointer clicks in Qt/PyQt apps.
  • Reference for touch2pointer: Weston Customization: touch2pointer


3. PyQt5 and Platform Plugins

  • Use QT_QPA_PLATFORM=wayland. Do not use linuxfb when running under Weston.
  • Make sure your application container is started with:
    • Either -e QT_QPA_PLATFORM=wayland (recommended)
    • Or you set this in your application’s code/environment

4. General Recommendations

  • Always start the Weston container before launching your application container.
  • Prefer the torizon/weston images with the version/tag used on TorizonCore (not other images).
  • When running your application, ensure it shares the necessary device access (generally, not an issue if you follow the guide above and use Wayland).

5. Troubleshooting Checklist

  • If Weston fails to start and gives tty errors: Make sure you use --tty=/dev/tty7 and the tty exists on your system.
  • If the cursor is missing: Confirm the [shell] section above is present in your weston.ini.
  • For non-clickable windows: Make sure touch2pointer is enabled as above; touchscreens might send only touch, not pointer events by default.
  • For hardware input issues: Check that all /dev/input nodes are present inside Weston and application containers.

References


Summary

  1. Use the specialized Weston container launch for iMX7 (see above).
  2. Configure the weston.ini for cursor and touch2pointer as shown.
  3. Set your application to use Wayland (QT_QPA_PLATFORM=wayland).
  4. Start Weston before your GUI Docker container.

Let me know if you need clarification or further help!

Best regards,
Toradex AI Assistant.

my problem not solved @ToradexAI give alternate approch to solve this step by step

Thanks for your response.

Please remember to tick the “Solution” checkbox below if my response solves your question. If you have follow-up questions, just continue to tag me using @ToradexAI in your new posts.

Did you like my answer? :+1: :-1:


Hello,

Absolutely, let’s try an alternative step-by-step approach specifically recommended for Colibri iMX7 with Torizon OS, leveraging the official Qt6 containers and best practices for headless (no-GPU) operation. Please follow each step carefully:


Step 1: Stop All Running Containers

This ensures we start from a clean state.

docker stop $(docker ps -a -q)

Step 2: Start the Weston Container Correctly for iMX7

For Colibri iMX7, start Weston using the Pixman software renderer as follows:

docker run -d --rm --ipc=host --name=weston --net=host --cap-add CAP_SYS_TTY_CONFIG \
    -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ \
    --device-cgroup-rule='c 4:* rmw' --device-cgroup-rule='c 13:* rmw' \
    --device-cgroup-rule='c 226:* rmw' \
    torizon/weston:$CT_TAG_WESTON --developer \
    --tty=/dev/tty7 -- --use-pixman

– This sets up Weston with proper device access and the software renderer.
– More info:


Step 3: Set Environment Variable for Qt Quick 2D Renderer

Because your board doesn’t have a GPU, you need to use software rendering. Set this before running your Qt app:

export QMLSCENE_DEVICE=softwarecontext

Reference:


Step 4: Start a Qt6 Wayland Container

This container is optimized for running Qt applications on TorizonCore:

docker run --rm -it --name=qt6 \
    -v /tmp:/tmp \
    -v /dev/dri:/dev/dri --device-cgroup-rule='c 226:* rmw' \
    torizon/qt6-wayland-examples:$CT_TAG_QT6_WAYLAND_EXAMPLES \
    bash

Reference and more details:


Step 5: Test Qt Example Application

Inside your qt6 container, launch a provided sample to confirm input and display functionality:

/usr/lib/aarch64-linux-gnu/qt6/examples/widgets/widgets/calculator/calculator

– The calculator GUI should appear.
– Check if it responds to touch/click and that you see the cursor.

If this works, your environment is correctly set up. If not, please report which step fails or what error you see.


Step 6: Adapt Your PyQt Application

Once the example works, you can adapt your PyQt application:

  • Use the same environment and bind-mount settings as above.
  • Ensure you set:
    export QT_QPA_PLATFORM=wayland
    export QMLSCENE_DEVICE=softwarecontext
    
  • If you need to enable touch-to-mouse emulation (touch2pointer), ensure the [shell] and [keyboard] sections in your weston.ini are present as discussed previously.

If any step fails, please let me know precisely where it happens (with error message) so I can help diagnose further.

Would you like instructions on creating a Dockerfile for your custom PyQt application using this setup?

Best regards,
Toradex AI Assistant.

References:

i am using armv7 and qt5 application @ToradexAI

Thanks for your response.

Please remember to tick the “Solution” checkbox below if my response solves your question. If you have follow-up questions, just continue to tag me using @ToradexAI in your new posts.

Did you like my answer? :+1: :-1:


Thank you for clarifying your use case: Colibri iMX7 (armv7), Torizon OS, and a Qt5 (not Qt6) PyQt application.

Below is a step-by-step guide tailored for armv7 and Qt5. Please follow each step and let me know at which point (if any) you encounter issues.


1. Clean Up: Stop All Running Containers

docker stop $(docker ps -a -q)

2. Enable ARM Emulation on Your Development PC (if cross-building containers)

If you build images on an x86 PC, ensure ARM emulation is installed and working:

docker run --rm -it --pull always --platform linux/arm/v7 debian arch

You should see:

armv7l

(Reference)


3. Start the Weston Container the Recommended Way

For Colibri iMX7 with Qt5, you must use the pixman (software) backend and proper device mounts. Example:

docker run -d --rm --ipc=host --name=weston --net=host --cap-add CAP_SYS_TTY_CONFIG \
  -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ \
  --device-cgroup-rule='c 4:* rmw' --device-cgroup-rule='c 13:* rmw' \
  --device-cgroup-rule='c 226:* rmw' \
  torizon/arm32v7-debian-weston --developer --tty=/dev/tty7 -- --use-pixman

(Reference)

  • This setup is essential for input and display on iMX7.

4. Prepare and Launch Your Qt5 (PyQt) Application Container

You must choose the arm32v7 base and ensure your app runs with the correct environment variables and mounts.

Sample Docker command:

docker run --rm -it \
  -v /tmp:/tmp \
  -v /dev:/dev \
  -v /run/udev:/run/udev \
  -e QT_QPA_PLATFORM=wayland \
  arm32v7-your-qt5-pyqt-app-image

Key points:

  • Use QT_QPA_PLATFORM=wayland so Qt uses Weston.
  • Bind-mount /tmp, /dev, and /run/udev.
    (Reference)
  • Do not use linuxfb when Weston is running.

Optional:

  • If you use QML/Quick components, set: -e QMLSCENE_DEVICE=softwarecontext

5. (Optional, If Touch/Mice Still Don’t Work) – Customize weston.ini

To enable mouse cursor and touch-to-pointer emulation, mount a weston.ini into the Weston container:

Create a weston.ini file:

[shell]
cursor-theme=default
cursor-size=32

[keyboard]
vt-switching=true

[input-method]
path=/usr/lib/weston/weston-keyboard

Mount it when running Weston:

docker run ... -v /path/to/your/weston.ini:/etc/xdg/weston/weston.ini ...

(Reference)


6. Test With a Minimal Qt5 Application

To isolate issues, try running a very simple PyQt5 app such as a button or window before trying your full application.


7. Checklist

  • Weston started with full /dev and /run/udev access and using --use-pixman.
  • Your Qt5 container uses -e QT_QPA_PLATFORM=wayland and is arm32v7-based.
  • Application is launched only after Weston is running and display is working.
  • All hardware nodes (/dev/input, /dev/fb0, etc.) appear in both containers.

Resources


Let me know** exactly at which step (and the output/error) if something does not work. I am happy to continue troubleshooting or provide a sample Dockerfile for your PyQt5 app if you need one.

Best regards,
Toradex AI Assistant.

Thank you for resonse. Solved issue @ToradexAI .