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

Install for more shells than Bash #31

Closed Xideta closed 3 years ago

Xideta commented 4 years ago

Starts systemd through /etc/fish/conf.d/ if fish is opened in an interactive terminal. enter-systemd-namespace isn't copied over as a .fish file, as that would have meant it would execute seperately from the start-systemd-namespace.fish

Visual Studio Code terminals have access to snap, and remote development for WSL works. Tabs in Windows Terminal also work.

lucyllewy commented 4 years ago

I'd rather chain into the existing scripts for fish shells, if possible, than maintaining duplicated code in different dialects. This might work with a fish equivalent of exec /usr/sbin/start-systemd-namespace.

lucyllewy commented 4 years ago

Alternatively it might be possible to port "just" the start-systemd-namespace script, which is a smaller amount of code to maintain duplicates of, and leave the rest as-is.

lucyllewy commented 4 years ago

I'd like to get input from @DamionGans on this to solidify or alter my thoughts. I like your work, though :-) You've put a lot of effort into this and it shows!

Xideta commented 4 years ago

Indeed, I just wanted it to work on my machine, and got a bit carried away porting all the scripts. The start-systemd-namespace.fish file would likely be the only thing actually required to get it up and running with Fish.

Xideta commented 4 years ago

I moved over the .fish file, and tried adding a bit of shell detecting. (I haven't been able to test it proper, as my ZSH PC only runs WSL 1)