0

I have a shortcut on my taskbar that opens a WSLTTY terminal. When I click on it, it flickers open and immediately closes. I suspect there is an error message being printed but it closes too fast for me to read. How can I temporarily prevent a WSL WSLTTY terminal from automatically closing?

When I open an Ubuntu terminal (the one that the Ubuntu distro installs), there is no issue, but I don't want to use that terminal.


This question is similar to How can I open WSL terminal with a command without it automatically closing? Here are the differences:

  1. The original post was asking about WSL1, not 2.
  2. The original post was not using WSLTTY.
  3. The original post was asking how to open the terminal from the command line; whereas I'm clicking a taskbar shortcut.

Notes:

Daniel Kaplan
  • 725
  • 1
  • 10
  • 26

1 Answers1

0
  1. Right click on the WSLTTY shortcut and click Properties
  2. Let's assume that the target field looks something like this: %LOCALAPPDATA%\wsltty\bin\mintty.exe --tabbar=4 -o "KeyFunctions=t:new-window-cwd;w:close" --WSL="Ubuntu" --configdir="%APPDATA%\wsltty" -
  3. Modify the target field by replacing the last - with -h always -. Given the above example, the target field will now look like this: %LOCALAPPDATA%\wsltty\bin\mintty.exe --tabbar=4 -o "KeyFunctions=t:new-window-cwd;w:close" --WSL="Ubuntu" --configdir="%APPDATA%\wsltty" -h always -
  4. Double click on the shortcut to open the terminal. It will no longer close on its own.

Notes:

Daniel Kaplan
  • 725
  • 1
  • 10
  • 26