1

I installed LxQt on WSL2 under Windows 11. I have several questions:

  1. the LxQt screen doesn't fit the whole monitor screen, as shown in the figure, how could customize it?

enter image description here

  1. the toolbar panel is hidden, press the WIN key is dominated by Windows 11, so I couldn't find the start menu of LxQt

  2. can start LxQt by command line startlxqt, but how could add LxQt to the Windows 11 start menu?

1

1 Answer 1

0

The answer here should be very similar to the one I gave on Ask Ubuntu regarding WSLg and Xfce4.

WSGg uses Wayland/Weston/Xwayland (via RDP extensions and a separate Mariner "System" distro) to display GUI apps in Windows 11.

The Weston Window Manager is already running in the current Wayland session, so it's difficult to launch a separate fullscreen desktop/window manager over the top of that.

The solution here seems to be the same as for Xfce4 -- Launch a fullscreen Xwayland session. While it will be running under WSLg's Weston instance, it can have its own desktop and window manager.

Assuming you are on Ubuntu (which I am assuming, since you posted there), first:

sudo apt install xwayland

I've updated my launch technique for desktops under WSLg's Xwayland slightly since my Ask Ubuntu answer. I currently recommend creating something like:

lxqt-weston.sh:

#!/usr/bin/env bash
Xwayland :1 &
xw_pid=$!
WAYLAND_DISPLAY= DISPLAY=:1 startlxqt
kill $xw_pid

A few important notes:

  • I'm assuming that you installed the openbox package when installing LxQt. If not, make sure you do, and select it as your window manager when launching LxQt for the first time.

  • It's really important to remember that a lot of desktop services rely on either Systemd or physical hardware that might not exist in WSL2 (or both). You may run into issues with some features as a result.

  • I run into a regular issue when Alt-tabbing (Windows) between Windows Terminal and Xwayland where mouse clicks won't register. Tapping the Alt key, the Shift key, and the Ctrl key (not together) seems to "unstick" whatever is causing the problem.

4
  • thank you very much. I run your script, but the new top window is completely dark, only the mouse is visible, and I think the LxQt is not started Jan 18, 2022 at 8:54
  • @JohnPaulQiangChen I'd agree that a "completely dark window" likely means that Xwayland is running, but LxQt is not. Try it from the command-line, but in two separate WSL windows (or using tmux or equivalent). First start Xwayland :1 (without the background &), then in a separate window start WAYLAND_DISPLAY= DISPLAY=:1 startlxqt. Is there any indication in the output as to the problem? Jan 18, 2022 at 15:07
  • @JohnPaulQiangChen Just to confirm, not even the "Please select your default Window Manager" dialog appears for you, right? Have you tried exiting the WSL instance, issuing wsl --shutdown and restarting? I just tried again on a completely fresh instance, sudo apt update -y && sudo apt upgrade -y && sudo apt install -y xwayland lxqt openbox. That's all I did, and at that point the script works. It opens the "Welcome to LxQt - Please select your default Window Manager" dialog. I select "OpenBox", then I get the desktop. Jan 18, 2022 at 15:33
  • Thank you very much, both your answer and comments work. I checked, and found copy and paste to vim in WSL2 produces^M at each newline, so I need to manually remove them Jan 19, 2022 at 6:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .