Textual doesn't appear to work on MSYS2 terminals
Have you checked closed issues? https://github.com/Textualize/textual/issues?q=is%3Aissue+is%3Aclosed Yes. I only managed to find one issue related to MSYS2 that doesn't appear relevant to the problem encountered.
Please give a brief but clear explanation of the issue. If you can, include a complete working example that demonstrates the bug. Check it can run without modifications.
- Tried installing Textual for use in MSYS2 environments (MINGW64, UCRT64) on a Windows 10 device.
$ pacman -S mingw-w64-ucrt-x86_64-python-pip # Installs python v3.11.10
$ python -m pip install virtualenv
$ python -m virtualenv ~/textual-test # Install Textual in a clean virtual env
$ source ~/textual-test/bin/activate
$ pip install textual
$ python -m textual
- When activating Textual to run the demo (
python -m textual), the UI that appears is non-interactive, although the keyboard shortcuts work- Unable to click on anything in the UI
- Shortcuts to toggle dark mode (
Ctrl + T), to bring up the sidebar (Ctrl + B), etc. are still functional, but the screens they bring up cannot be interacted with.
- This problem doesn't occur with the Cygwin terminal.
It will be helpful if you run the following command and paste the results:
textual diagnose
-
textual diagnosejust brings up the demo UI
If you don't have the textual command on your path, you may have forgotten to install the textual-dev package.
Feel free to add screenshots and / or videos. These can be very helpful!
We found the following entries in the FAQ which you may find helpful:
- Why doesn't Textual look good on macOS?
- No widget called TextLog
- How can I set a translucent app background?
- How do I center a widget in a screen?
- Why do some key combinations never make it to my app?
Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.
This is an automated reply, generated by FAQtory
Does the mouse work in other interactive terminal applications (i.e. something akin to htop)?
I'm not familiar with MSYS2, but have you tried testing other terminals other than the default Mintty?
textual diagnose just brings up the demo UI
I suspect you might have preceded the command with python -m - the textual command should be on your path after installing the textual-dev package.
@TomJGooding , I apologise for the delay in replying to this. I've been able to establish that this is a problem with the mintty terminal implementation for MSYS2 on Windows 10, as I have been able to confirm that the Textual demo works as expected when I run the MSYS2 environment through Windows Terminal, Commnad Prompt, Powershell, and other third party terminals like WezTerm and the aforementioned Cygwin. I have brought up the issue on the MSYS2 repo now. 👍
This seems related to my issue 1462
xref https://github.com/msys2/MINGW-packages/issues/22188