I’m new in using Toradex and TorizonCore, I have read forum topics and decided to go to the source. I’m using Apalis IMX8 on Ixora Carrier Board connected to MCT070HDMI-B-CTP touch screen via HDMI. Before I used Apalis TK1 on Ixora. I have made both Quickstart Guides – with building image on TK1 with Yocto, and using containers and Torizon OTA on IMX8 (thank you for them). At this moment I’ve got two different images on my IMX8 boards – one of them is Reference Multimedia Image on IMX8 build with Yocto, and second is .yaml file from your tutorial consisting of two containers – Weston-vivante and kiosk-mode-browser uploaded via Torizon OTA.
I’d like to customize image based on .yaml file and add there something to hide unused cursor. I tried to add unclutter to Weston-vivante image (failed), to kiosk-mode-browser (passed, but nothing has changed), and also tried using “empty cursor” declared in weston.ini, as described here:
I copied the files to Apalis via scp and run just Weston container with customized localizations and files:
At this moment nothing helped and I don’t know how to customize this my .yaml image. I understand that Weston-vivante gives shell to run graphical applications, and kiosk-mode-browser is responsible for open browser, but which of this images should be customized? Weston-vivante I suppose, but try with empty cursor didn’t manage. In the future I’d like to add my applications on the board so I should add to .yaml file 3rd image based on debian with my application inside? System based on containers is quite abstract for me if I need to add something customized.
If we found the correct datasheet for your display, it states that your touch panel is based on the mouse driver program and therefore it may be causing the cursor to appear on weston. Therefore, if you’re using this display for your end project you may need to relay on workarounds such as making a custom invisible cursor. Is this your final display already?
In addition, I’ve been told by our team that running --developer means that you’re running the weston-dev version and your weston_init may not be used. Can you please try removing it to check if your weston init begins to be read?
Hi @gclaudino.tx, I’m fine, thank you for your reply.
It’s my display for my end project, and I suppose that my touch panel is based on the mouse driver program, as you mentioned, because if I take out the USB cable responsible for touching, the cursor disappears. So the invisible cursor should be enough to cover the needs. Unfortunately running container without --developer flag didn’t help.
With this, you should be able to log in to the weston container bash. There, you may try to look if you can find your weston-ini script and also the left_pointer2 that you added. Can you please check if they have correctly been mounted? If so, can you please also share with us your weston-ini?
While waiting for your response we did some tests based on this post (Hide mouse cursor apalis iMX8QM - #15 by anonymouse) and using your container I was able to successfully apply the transparent mouse cursor that you’ve linked. Here is what I did:
Accessed the device via SSH;
In /home/torizon I created 2 directories:
cursors , which has the transparent file from the GitHub link you sent us, named as left_ptr ;
weston , which has the attached weston.ini .
Then, I ran the following command: docker run -e ACCEPT_FSL_EULA=1 -d --rm --name=weston --net=host --cap-add CAP_SYS_TTY_CONFIG -v /home/torizon/cursors/:/usr/share/icons/hicolor/cursors/ -v /home/torizon/weston/:/etc/xdg/weston -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 199:* rmw' --device-cgroup-rule='c 226:* rmw' mlorek/base-vivante:latest weston-launch --tty=/dev/tty7 --user=torizon
Note that this should also work with our torizon/weston-vivante container;
To confirm that the cursor is there I’ve used a program that traces the mouse path in its window called weston-clickdot . To execute it:
Access your running Weston container with docker exec -it weston bash;
Inside there run weston-clickdot ; a window should appear on the screen;
Connect your touch controller and interact with the screen passing through the window; the path will be marked by a white line when that happens.
This was done in TorizonCore 5.6.0. If you haven’t solved your problem yet please let me know if this helps you in any way.
thank you for your replies. After I mentioned that running container without --developer flag didn’t help I noticed the fact that weston.ini wasn’t properly mounted. After fix this the cursor actually disappeared. I made it in the same way as you described above.
@lucas_a.tx thanks for writing about weston-clickdot, I’ll use it to check if the cursor is hidden properly.
So at this moment I suppose that hiding cursor at weston is done, but in my project based on .yaml file from your quickstart guide I’m running kisok-mode-browser after weston-vivante container. And if the weston is running with transparent cursor, after running kiosk-mode-browser it shows again. So I understand that I need to customize kiosk-browser image to hide cursor inside this container also, for example using unclutter? Last time I was working with cursor hiding I got stuck for some time with Torizon OTA, so I need to test things about cursor and my containers more - I’ll confirm my words in a few days (and press solved button if it’s true), but I will be grateful for confirming if I need to hide the cursor in both containers.
That’s great to hear. I’m glad we could help with it.
We tested it on our side and it appears to be a problem linked with Chromium. Usually, you should only customize the cursor on the Weston side. Can you please check if using Cog would you fit your use case? We tested with Cog and the cursor is invisible as intended. To run Cog you can follow this tutorial: Web Browser / Kiosk Mode with Torizon OS | Toradex Developer Center. In the meantime, we can try to check if there would be any other suitable solution.
Finally, as you said you’re using a docker compose file, remember that you also have to include the volumes you monted under the reference to the weston container. It should look like this:
As @gclaudino.tx said we checked in the meantime for other solutions, and it turns out we were able to get the transparent cursor working on Chromium. If someday you or anyone else needs this setup here are the steps:
In addition to the steps made from my last post create a file named index.theme in /home/torizon/default (create the directory if needed) with the following content:
[icon theme]
Inherits=hicolor
Run the Chromium container bind mounting cursors to /usr/share/icons/hicolor/cursors/ and default to /usr/share/icons/default/.
e.g. if using TorizonCore 5.6.0 or earlier on an iMX8 device the docker run command is:
As this problem of hiding the mouse cursor in Weston seems to be a recurrent issue here at our Community we intend to update our Developer page Working with Weston on TorizonCore | Toradex Developer Center with the information found in this and in previous topics. I’ll update this post if that happens.
Best regards,
Lucas Akira
EDIT 05/31: The Developer page has been updated with a new section called changing the mouse cursor. The instructions on Chromium there differ a bit from what is written here, but the end result is the same.