Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
To run applications on two displays using Weston on Torizon, you need to ensure that each application is directed to the correct display. Here’s a step-by-step guide to achieve this setup:
Prerequisites
- Weston Container: Ensure you have the Weston container running.
- App1 Container: Your first application container.
- App2 Container: Your second application container.
Steps to Configure Multi-Display Setup
-
Identify the App IDs:
Each Wayland application can set an app ID. You need to find out the app ID for each of your applications. You can do this by running the application with theWAYLAND_DEBUGenvironment variable set.WAYLAND_DEBUG=1 ./your-applicationLook for the
set_app_idrequest in the output. For example, you might see something like:[123456.789] -> wl_surface@4.set_app_id("app1")Here,
app1is the app ID. -
Configure
weston.ini:
Edit theweston.inifile to specify which display each application should use. Here’s an example configuration:[core] shell=kiosk-shell.so [output] name=HDMI-A-1 mode=1920x1080 [output] name=HDMI-A-2 mode=1920x1080 [kiosk-shell] app-id=app1 output=HDMI-A-1 [kiosk-shell] app-id=app2 output=HDMI-A-2In this example:
HDMI-A-1andHDMI-A-2are the names of the displays.app1andapp2are the app IDs for your applications.- Each
[kiosk-shell]section directs an application to a specific display.
-
Run the Weston Container:
Ensure the Weston container is running with the updatedweston.inifile. You can bind mount theweston.inifile if you are in the prototyping phase:docker run -d --rm --name=weston --net=host -v /path/to/your/weston.ini:/etc/xdg/weston/weston.ini torizon/wayland-weston -
Run Your Application Containers:
Start your application containers, ensuring they are set to use Wayland and have the correct app ID.docker run -d --rm --name=app1 --net=host -e WAYLAND_DISPLAY=wayland-0 -e WAYLAND_DEBUG=1 your-app1-image docker run -d --rm --name=app2 --net=host -e WAYLAND_DISPLAY=wayland-0 -e WAYLAND_DEBUG=1 your-app2-image
Troubleshooting
- Check App IDs: Ensure the app IDs in the
weston.inifile match those set by your applications. - Display Names: Verify the display names (e.g.,
HDMI-A-1,HDMI-A-2) usingweston-infoinside the Weston container. - Logs: Check the logs of the Weston container and your application containers for any errors or warnings.
By following these steps, you should be able to run app1 on one display and app2 on another display using Weston on Torizon.
Please, also check if these links can help you solve your problem: