Skip to content

Powershell script to set IP addresses in Windows and Linux for Xming and WSL2 to work with WSL2's dynamic IP address

Notifications You must be signed in to change notification settings

paul-reilly/WSL2-Xming-Init

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

At the moment the IP address for the WSL2 local network is not static.

Xming needs the WSL2 IP address so this script sets it in the X0.hosts file, which is assumed to be here:

C:\\Program Files (x86)\\Xming\\X0.hosts

Since this is a protected folder the script must be run as administrator.

In addition the script sets the Windows adapter IP address in WSL2 Linux, in a file called:

~/.wslrc

... when in WSL2, you must get this to update the DISPLAY env variable it sets by:

source ~/.wslrc

About

Powershell script to set IP addresses in Windows and Linux for Xming and WSL2 to work with WSL2's dynamic IP address

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published