DamionGans / ubuntu-wsl2-systemd-script

[Does not work anymore!] Script to enable systemd support on current Ubuntu WSL2 images
1.56k stars 383 forks source link

Update scripts for ZSH and Ubuntu 20.04 compatibility #4

Closed lucyllewy closed 4 years ago

lucyllewy commented 4 years ago

Many many changes here. ZSH now works when set as default user shell. Ubuntu 20.04 now works with changed daemonize location: fixes #3

Signed-off-by: Daniel Llewellyn daniel@bowlhat.net

onomatopellan commented 4 years ago

Thanks for the script. I just tested it with Ubuntu 18.04 (had to use --force) and this happened when calling code-insiders .

Also now there are 2 lines source /usr/sbin/start-systemd-namespace in /etc/bash.bashrc.

Anotación 2020-05-09 124416

lucyllewy commented 4 years ago

double-check that your file /usr/sbin/enter-systemd-namespace is the same as the version in this PR. Note that your error message indicates it's failing in the printf which it says is line 30; that printf is actually on line 34 which suggests you might have an incorrect script.

onomatopellan commented 4 years ago

Ok I found the problem. This line needs to be #!/bin/bash

After that change everything works again and VSCode launches in Remote mode in Ubuntu 18.04 and Ubuntu 20.04.

lucyllewy commented 4 years ago

Can you test the commit I've just added, please, which reverts to bash but adds an extra commandline flag to not read the rcfile. This should fix a problem I had, which I thought using /bin/sh would fix, when using zsh with yadm causing subshells to be spawned.

lucyllewy commented 4 years ago

Also, Thank you for spotting the problem and getting me to think harder :-)

onomatopellan commented 4 years ago

Yep, with your latest commit VSCode Remote Mode launches correctly. 👍

DamionGans commented 4 years ago

@diddledan I am making a mess with the repository now, trying to get a grip of it. Can you please redo the pull request? Thank you

lucyllewy commented 4 years ago

It looks like you successfully merged the PR - your master branch and my fork are in-sync now..