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_DEBUG
environment variable set.WAYLAND_DEBUG=1 ./your-application
Look for the
set_app_id
request in the output. For example, you might see something like:[123456.789] -> wl_surface@4.set_app_id("app1")
Here,
app1
is the app ID. -
Configure
weston.ini
:
Edit theweston.ini
file 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-2
In this example:
HDMI-A-1
andHDMI-A-2
are the names of the displays.app1
andapp2
are 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.ini
file. You can bind mount theweston.ini
file 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.ini
file match those set by your applications. - Display Names: Verify the display names (e.g.,
HDMI-A-1
,HDMI-A-2
) usingweston-info
inside 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: