This is expected and is how many GUI applications work in Ubuntu. You don't mention exactly which applications you are using, but from the screenshot, that one appears to be written using the GTK toolkit. GTK (a.k.a. Gnome) apps do not, by default, including a minimize or maximize icon in the window title area.
Other applications may use other toolkits. For instance, if you install xterm
, you will see a minimize and maximize icon.
You can, however, add minimize and maximize controls to GTK apps by running:
gsettings set org.gnome.desktop.wm.preferences button-layout "close,minimize,maximize:"
See this answer for more details and options.
As for Xming, that is an alternative way of running GUI applications in WSL. Under Windows 11, you don't typically need Xming, since WSL2 includes the WSLg feature for running Ubuntu GUI applications.
However, if you do want to use Xming, yes, you likely did miss a step. You would need to:
Correctly set your DISPLAY
environment variable to point to Xming instead of WSLg:
- Xming:
export DISPLAY=$(hostname).local:0
- WSLg (the default):
export DISPLAY=:0
(automatically configured)
You'll also need to make sure your Windows firewall allows the connection from WSL2 to Windows (since WSL2 is actually on a separate virtual network). Using Windows Defender, you should normally see the "Allow" popup box the first time you use it, but if you miss it, you'll need to set it manually.
gsettings set org.gnome.desktop.wm.preferences button-layout "close,minimize,maximize:"
did work to get the minimize and maximize buttons, but they are on the left. How do I get them on the right? – Gabriel Staples Aug 09 '23 at 03:55gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"
– Gabriel Staples Aug 09 '23 at 03:56