Resolved.
Ubuntu subsystem (WSL) could not resolve corporate and non corporate domains while on or off vpn.
Fixed.
Must create /etc/wsl.conf file and add an entry to kill the resolv.conf file from auto generating on reboot. Add the code block to /etc/wsl.conf:
[network]
generateResolvConf = false
Then reboot the ubuntu subsystem by opening powershell as admin and running command:
wsl --shutdown
Now, Re-open ubuntu subsystem
use these commands in order:
cd /etc
ls
This directory should show the 'resolv.conf' file (which is a symbolic link). The link should now be red indicating the link leads to no where. Delete the resolv.conf link and create a new /etc/resolv.conf file
In the new resolv.conf file, write this code block
search your.domain.com
nameserver x.x.x.x
nameserver x.x.x.x
nameserver y.y.y.y
Where X is the DNS address configured in the Cisco Anyconnect VPN adapter. Locate the Cisco VPN adapter in network settings, right click on the Cisco VPN adapter and click 'properties', now highlight IPv4 and click 'properties'. Then note the Preferred DNS and Alternate DNS and copy those into the resolv.conf file.
And Y is your normal IPv4 DNS address
Now restart the subsystem again from Powershell.
NOTE: If this did not work, that means that the resolv.conf file was blown away by the subsystem again. In order for this to work, the wsl.conf file has to be read by the system. If it is not being read, try reinstalling the subsystem or upgrading to 20.04.
Best Answer
According to microsoft/WSL:
But the given link for Windows Console points to Windows Terminal:
There's no (usable) documentation, so your question has to be answered by pointing into its source-code.
The relevant chunk (which you'd like to exercise) is here, in
windowio.cpp
:Half of the conditions (to reach that
Paste()
) appear likely to be met (barring some bug in this program). The ones that aren't apparent:ShouldTakeOverKeyboardShortcuts()
— but this is used in the ctrl+shift+plus/minus codepSelection->IsKeyboardMarkSelection()
— we're assuming the mouse was used for selection.But that's assuming that this
HandleKeyEvent
method is treating the two different key sequences equally. The^[[2;2~
comes from another part of the program, interminalInput.cpp
, using a built-in tableand applied here:
From reading the code, it appears that this is all upstream from the
windowio.cpp
logic, so that combination will never be reached. The developers provided no way to override or modify this behavior.As suggested in a comment by @Rody-Oldenhuis:
(which is derived from mintty).