martes, 12 de mayo de 2026

Open web browser from wsl

Add these lines to .bashrc

# Open URLs in the Windows default browser from WSL
export BROWSER=wslview


Run this once (needs your password):
sudo apt-get update && sudo apt-get install -y wslu


Then reload your shell:
source ~/.bashrc


Verify:
wslview https://example.com 
# should open in Windows Firefox 

echo $BROWSER 
# should print: wslview

How this fixes your AWS SSO flow
wslu provides wslview, which hands URLs to Windows' default browser via cmd.exe.

Setting BROWSER=wslview is what the AWS CLI (and most tools) check first when they want to open a URL.

xdg-open on Ubuntu/WSL also delegates to $BROWSER for http(s):// URLs, so your earlier xdg-open error will be gone too.

jueves, 16 de abril de 2026

yamlfmt on wsl

Steps to install yamlfmt and go in wsl

sudo apt update && sudo apt install -y golang
go install github.com/google/yamlfmt/cmd/yamlfmt@latest
echo 'export PATH="$PATH:$HOME/go/bin"' >> ~/.bashrc
source ~/.bashrc

martes, 7 de abril de 2026

Mosquitto post install

 

Mosquitto comes with a password file generating utility called mosquitto_passwd.

mosquitto_passwd -c /etc/mosquitto/passwd <user>

Ensure that the file is managed by the appropriate user and group.

chown mosquitto:mosquitto /etc/mosquitto/passwd

Now restart Mosquitto server.

systemctl restart mosquitto

The command below will show what ports are listening (look for *:1883 (LISTEN))

lsof -i -P -n | grep LISTEN