From 5fcd7d1a0398202b4b86090fdfe92592312999b3 Mon Sep 17 00:00:00 2001 From: Chirag Shilwant Date: Wed, 21 Feb 2024 16:10:57 +0530 Subject: [PATCH] seva-launcher: Update launch command Signed-off-by: Chirag Shilwant --- seva-launcher/go.mod | 1 - seva-launcher/go.sum | 2 -- seva-launcher/seva-launcher.go | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/seva-launcher/go.mod b/seva-launcher/go.mod index 156a016..4c29d38 100644 --- a/seva-launcher/go.mod +++ b/seva-launcher/go.mod @@ -6,5 +6,4 @@ require ( github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/melbahja/got v0.7.0 // indirect - github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect ) diff --git a/seva-launcher/go.sum b/seva-launcher/go.sum index 767a500..c1d9932 100644 --- a/seva-launcher/go.sum +++ b/seva-launcher/go.sum @@ -4,5 +4,3 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/melbahja/got v0.7.0 h1:YHbiuNZVS8fIkyV0iXyThQQliwlKZb5h4k80zBVovxg= github.com/melbahja/got v0.7.0/go.mod h1:27cUstWCEfj6HBESMTGzCFY24Qj+QNMWot3+KuxguQU= -github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= -github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= diff --git a/seva-launcher/seva-launcher.go b/seva-launcher/seva-launcher.go index 1f7695d..f1dc2c9 100644 --- a/seva-launcher/seva-launcher.go +++ b/seva-launcher/seva-launcher.go @@ -16,7 +16,6 @@ import ( "syscall" "github.com/gorilla/mux" - "github.com/skratchdot/open-golang/open" ) //latest-tag for seva-browser @@ -81,7 +80,8 @@ func launch_browser() { if *docker_browser { go launch_docker_browser() } else { - err := open.StartWith("http://localhost:8000/#/", "/usr/bin/chromium --no-sandbox") + cmd := exec.Command("su", "weston", "-c", "/usr/bin/chromium", "http://localhost:8000/#/") + _, err := cmd.CombinedOutput() if err != nil { log.Println("Host browser not detected, trying to load & launch seva-browser packaged in default image") go launch_docker_browser()