by nickjj · 1y ago · 0 comments
Many years ago I added an install script to https://github.com/nickjj/dotfiles to get set up in basically 1 command because I wanted a quick way to bootstrap my own system. I used the official Debian and Ubuntu images to test things.
Over the last few days I refactored things further to support Arch Linux which has an official Docker image too.
This enables being able to do full end to end tests in about 5 minutes. The container spins up in 1 second, the rest is the script running its course. Since it's just a container you can also use volume mounts and leave the container running in case you want to incrementally test things without wiping the environment.
Additionally it lets folks test it out without modifying their system in 1 command. Docker has enabled so many good things over the last 10+ years.
Never stop tweaking. No computer can be called home until it runs your own set of aliases/commands.
I just pushed an update to remove VcXsrv at: https://github.com/nickjj/dotfiles/commit/fdc1ddd95c2defb791...
As for why I was using it:
I've been using WSL since nearly the beginning (2017 / 2018) and used VcXsrv back then to get bi-directional clipboard sharing before WSLg was available. For a brief time I even ran Sublime Text in WSL 1 way back in the day.
Then I used WSL 2.
Then I tried WSLg when it first came out and it was really bad. Clipboard sharing didn't work for me which was the only reason I wanted to use it. I set `guiApplications=false` and never looked back.
I just tried it again now by closing VcXsrv and removing any DISPLAY related settings I had in my zsh profile. Then I shutdown WSL and started up my instance.
Bingo, clipboard sharing "just works" and I also installed xcalc which ran flawlessly. This simplifies things so much.
This unfortunately makes pasting text from Windows into WSL a problem. The ^M isn't present when pasting with CTRL+SHIFT+v because I guess the Microsoft Terminal converts it but that's a big pain to hit compared to "p".
I opened a bug report, let's see: https://github.com/microsoft/wslg/issues/1326
I never used Incus before to know if it has other benefits but Docker solves my use case. Before Docker existed I used to do this with LXCs back when I ran my entire dev environment in a Linux VM.