←back to thread

193 points dopple | 3 comments | | HN request time: 0.816s | source
Show context
nickjj ◴[] No.43745493[source]
Regular containers also happen to work great for testing dotfiles.

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.

replies(4): >>43746133 #>>43747184 #>>43748049 #>>43749807 #
bagatelle ◴[] No.43747184[source]
Just glancing through your dotfiles, I was wondering why you use VcXsrv. WSLg has always been fine for me, and I've never heard of anyone trying to use a different X server.
replies(1): >>43747433 #
1. nickjj ◴[] No.43747433[source]
Thanks a lot for the reminder.

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.

replies(1): >>43748158 #
2. bagatelle ◴[] No.43748158[source]
Glad to hear this, I was worried I was missing something.
replies(1): >>43750897 #
3. nickjj ◴[] No.43750897[source]
I did notice a very bad side effect. Yesterday I only pasted 1 line. When you paste in multiple lines using Neovim's normal paste key (p), it adds a Windows line ending to each line which you can see as ^M.

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