Windows to Linux: lost VirtualKeyboard
-
Hi all -
I'm in the process of moving an application from Windows to Linux. On application startup, I get an error message:
qt.qpa.wayland: qtvirtualkeyboard currently is not supported at client-side, use QT_IM_MODULE=qtvirtualkeyboard at compositor-side.
I'd never heard of compositors before, but according to the Wayland site, it's sort of a server. So, I'm kind of lost here - the message seems to be suggesting that I do something with the compositor -- do I need to build this compositor for my Linux-based Qt applications?
Thanks...
-
Hi all -
I'm in the process of moving an application from Windows to Linux. On application startup, I get an error message:
qt.qpa.wayland: qtvirtualkeyboard currently is not supported at client-side, use QT_IM_MODULE=qtvirtualkeyboard at compositor-side.
I'd never heard of compositors before, but according to the Wayland site, it's sort of a server. So, I'm kind of lost here - the message seems to be suggesting that I do something with the compositor -- do I need to build this compositor for my Linux-based Qt applications?
Thanks...
@mzimmers said in Windows to Linux: lost VirtualKeyboard:
do I need to build this compositor for my Linux-based Qt applications?
For X11 - no, virtual keyboard works out of the box.
For Wayland - I don't know, I'm not a regular Wayland user (since screen sharing still does not work with Wayland :/). Perhaps it is enough if you add
QT_IM_MODULE=qtvirtualkeyboard
to your.bashrc
or.zshrc
? -
@mzimmers said in Windows to Linux: lost VirtualKeyboard:
do I need to build this compositor for my Linux-based Qt applications?
For X11 - no, virtual keyboard works out of the box.
For Wayland - I don't know, I'm not a regular Wayland user (since screen sharing still does not work with Wayland :/). Perhaps it is enough if you add
QT_IM_MODULE=qtvirtualkeyboard
to your.bashrc
or.zshrc
? -
@sierdzio said in Windows to Linux: lost VirtualKeyboard:
QT_IM_MODULE=qtvirtualkeyboard
add QT_IM_MODULE=qtvirtualkeyboard in main.cpp with qputenv.
#ifndef ANDROID qputenv... #endif
VirtualKeyboard works fine on X11.
-
@JoeCFD OK, so...why am I using Wayland instead of X11? Is it something I selected in my Qt installation?
-
@mzimmers log out and click the settings icon on the login screen to switch to X11. The default setting is wayland. It is a linux setting.
@JoeCFD said in Windows to Linux: lost VirtualKeyboard:
@mzimmers log out and click the settings icon on the login screen to switch to X11. The default setting is wayland.
Log out of what? I'm using WSL - perhaps it uses Wayland instead of X11. In that case, I probably just need to follow your above suggestion.
-
@JoeCFD said in Windows to Linux: lost VirtualKeyboard:
@mzimmers log out and click the settings icon on the login screen to switch to X11. The default setting is wayland.
Log out of what? I'm using WSL - perhaps it uses Wayland instead of X11. In that case, I probably just need to follow your above suggestion.
-
@JoeCFD I don't have a Linux desktop - all I have is the WSL terminal window, and any application I start from it.
Interestingly enough, my main.cpp already has that qputenv statement -- I must have put it in when I was building this app for Windows (or maybe Android -- I can't remember).
-
@JoeCFD I don't have a Linux desktop - all I have is the WSL terminal window, and any application I start from it.
Interestingly enough, my main.cpp already has that qputenv statement -- I must have put it in when I was building this app for Windows (or maybe Android -- I can't remember).
-
@JoeCFD I don't have a Linux desktop - all I have is the WSL terminal window, and any application I start from it.
Interestingly enough, my main.cpp already has that qputenv statement -- I must have put it in when I was building this app for Windows (or maybe Android -- I can't remember).
-
Yeah so Wayland vs. X11 are the "backend" for drawing windows on Linux. Some Linux distributions use Wayland by default, some X11. As @JoeCFD mentioned, both can be installed in parallel and chosen at login time. But, since you are on WSL... that gets complicated. This article suggests how it can be done in terminal: https://trendoceans.com/how-to-enable-x11-and-disable-wayland-window-system/ but if it will work on WSL I have no idea.
Perhaps VirtualKeyboard won't work through WSL anyway, I have never tried it.