Capture and share your WSL 2 terminal sessions with terminalizer
Prerequisites:
.
- Set up Node JS on WSL 2: https://docs.microsoft.com/en-us/windows/nodejs/setup-on-wsl2
- curl
- Node Version Manager
nvm
- Terminalizer: https://terminalizer.com/, https://terminalizer.com/docs, https://terminalizer.com/install, https://github.com/faressoft/terminalizer
Install curl:
Install NVM:
Open a new WSL terminal and verify NVM install:
Install the current (stable) version of Node, which is most likely what would be in use in my production environment:
Verify node install:
Install terminalizer:
.
.
Here come the permission issues
.
In case terminalizer does not allow you to record, ensure that your current WSL user has write permissions to the directory where you are saving the recording to.
For example, my WSL user currently can’t write to the Window’s user home directory:
However if I change directory to a location that the WSL user has WSL write permissions to, the recording is successful.
Notice that the nogroup
group in my case has full rwx
permissions to my ~/Sites
directory inside WSL.
These are the contents of my /etc/wsl.conf
:
My current WSL user, whom I named wsl
, is part of the nogroup
WSL group with GID 65534
:
And since the nogroup
group has write permissions to my ~/Sites
, everything works.
To add group write perms to the directory where I’m doing the recording, I just did a sudo chmod g+w .
:
You can see here that my wsl
user is part of the nogroup
group:
If you need to add your WSL user to a group, you can do so via sudo usermod -a -G [group] [wsl user]
:
.
Happy Dockerizing !