From 0433b2acea536191388438f6cc0581424d7ccaa4 Mon Sep 17 00:00:00 2001 From: Mario1159 Date: Wed, 6 Sep 2023 01:04:33 -0300 Subject: [PATCH] Add remote option --- scripts/wsl_start.ps1 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/wsl_start.ps1 b/scripts/wsl_start.ps1 index b771c06..a88470d 100644 --- a/scripts/wsl_start.ps1 +++ b/scripts/wsl_start.ps1 @@ -1,14 +1,22 @@ +param($remote) + $imagename = Read-Host -Prompt 'Container image to initialize' $containername = Read-Host -Prompt 'Container instance name [default=$imagename]' if (!$containername) { $containername = $imagename } +if($remote -eq "remote") { + $image = "git.1159.cl/mario1159/$imagename" +} else { + $image = $imagename +} + $command = ("docker run -d " + - "--name "+ $containername + " " + + "--name $containername " + "-v /tmp/.X11-unix:/tmp/.X11-unix " + "-v /mnt/wslg:/mnt/wsl " + "-e WAYLAND_DISPLAY=`$WAYLAND_DISPLAY " + "-e DISPLAY=`$DISPLAY " + "-e XDG_RUNTIME_DIR=/mnt/wslg " + - $imagename) + $image) wsl bash -ic $command \ No newline at end of file