Skip to content

Instantly share code, notes, and snippets.

View benduran's full-sized avatar

Ben Duran benduran

View GitHub Profile
@benduran
benduran / Set MTU size in WSL to fix discrepancies between VPN clients on Windows Host and the WSL machine.md
Created March 15, 2022 20:49
Set MTU size in WSL to fix discrepancies between VPN clients on Windows Host and the WSL machine

Update MTU without entering a password¶

This corrects issues you might have with various VPN Clients having discrepancies with MTU size between WSL and the Windows Host.

Create a file /usr/local/sbin/mtu and add the following:

#!/bin/bash

ip link set dev eth0 mtu 1400
@benduran
benduran / Expose X 11 Display IP from WSL to the Windows Host.md
Created March 15, 2022 20:51
Expose X 11 Display IP from WSL to the Windows Host

Add this to your .bashrc, .zshrc (or equivalent)

# Get the IP address of the host from /etc/resolv.conf
export WSL_HOST=$(tail -1 /etc/resolv.conf | cut -d' ' -f2)

# Set the display path
export DISPLAY=$WSL_HOST:0.0