Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Windows to Linux: lost VirtualKeyboard
Forum Updated to NodeBB v4.3 + New Features

Windows to Linux: lost VirtualKeyboard

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
11 Posts 3 Posters 1.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    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...

    sierdzioS 1 Reply Last reply
    0
    • mzimmersM mzimmers

      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...

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @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?

      (Z(:^

      JoeCFDJ 1 Reply Last reply
      1
      • sierdzioS sierdzio

        @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?

        JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by JoeCFD
        #3

        @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.

        mzimmersM 1 Reply Last reply
        1
        • JoeCFDJ JoeCFD

          @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.

          mzimmersM Offline
          mzimmersM Offline
          mzimmers
          wrote on last edited by
          #4

          @JoeCFD OK, so...why am I using Wayland instead of X11? Is it something I selected in my Qt installation?

          JoeCFDJ 1 Reply Last reply
          0
          • mzimmersM mzimmers

            @JoeCFD OK, so...why am I using Wayland instead of X11? Is it something I selected in my Qt installation?

            JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by JoeCFD
            #5

            @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.

            mzimmersM 1 Reply Last reply
            0
            • JoeCFDJ JoeCFD

              @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.

              mzimmersM Offline
              mzimmersM Offline
              mzimmers
              wrote on last edited by
              #6

              @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.

              JoeCFDJ 1 Reply Last reply
              0
              • mzimmersM mzimmers

                @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.

                JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on last edited by JoeCFD
                #7

                @mzimmers log out your login in Linux. Click the power icon and select logout

                mzimmersM 1 Reply Last reply
                0
                • JoeCFDJ JoeCFD

                  @mzimmers log out your login in Linux. Click the power icon and select logout

                  mzimmersM Offline
                  mzimmersM Offline
                  mzimmers
                  wrote on last edited by
                  #8

                  @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).

                  JoeCFDJ 2 Replies Last reply
                  0
                  • mzimmersM mzimmers

                    @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).

                    JoeCFDJ Offline
                    JoeCFDJ Offline
                    JoeCFD
                    wrote on last edited by
                    #9

                    @mzimmers https://itsfoss.com/switch-xorg-wayland/
                    b003104c-fe04-4b2d-9917-3b21ae92ff8d-image.png

                    Not sure how it works on WSL.

                    1 Reply Last reply
                    0
                    • mzimmersM mzimmers

                      @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).

                      JoeCFDJ Offline
                      JoeCFDJ Offline
                      JoeCFD
                      wrote on last edited by
                      #10

                      @mzimmers Android does not need it.

                      sierdzioS 1 Reply Last reply
                      0
                      • JoeCFDJ JoeCFD

                        @mzimmers Android does not need it.

                        sierdzioS Offline
                        sierdzioS Offline
                        sierdzio
                        Moderators
                        wrote on last edited by
                        #11

                        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.

                        (Z(:^

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved