Closed wjrogers closed 3 years ago
Example: C:\Users\UserName\AppData\Local\wsltty\bin\mintty.exe -e /bin/wslbridge2.exe -e USERPROFILE
Strange enough, this does not seem to work with USERPROFILE for me although it works for other variables.
Anyway, to set up a WSL session, remember to preserve other parameters like -c
and change --WSL
to --wsl
to get mintty features adjusted to WSL.
Thanks for the pointers. So far, I have:
%LOCALAPPDATA%\wsltty\bin\mintty.exe --WSLmode="Ubuntu" --configdir="%APPDATA%\wsltty" -e /bin/wslbridge2.exe -W~ -e TMUX_DISABLED=1 -l
which launches WSL2, but . (edit: This works!)TMUX_DISABLED
is not set
I have my .bashrc
scripted to exec tmux
, which is what I want 99% of the time, but I thought it would be useful to have a second shortcut that disabled the feature via an environment variable. I suppose I could go the other way and have wslbridge launch tmux instead of my shell? I chose this method because I use the same dotfiles to automatically run a persistent remote tmux session via SSH.
The above shortcut command line does work! I had made a typo in my bash script that confused the issue. Thanks again for the help.
Is there a way to pass arguments to wslbridge2 from a wsltty shortcut? I would like to make a custom shortcut that sets an environment variable in the WSL2 session. I can't find any way to do this with wsltty, but I see that wslbridge2 has an
-e
parameter for setting environment variables.