fixed configuration issues

This commit is contained in:
2023-03-01 10:41:37 +00:00
parent 08a48b46dc
commit ad303c963e
2 changed files with 93 additions and 61 deletions

View File

@@ -110,7 +110,7 @@ func main() {
if *headless {
// Running starting a browser as a background process
go func() {
Config, err := config.ConfigInit()
Config, err = config.ConfigInit()
if err != nil {
log.Fatalln(err)
}
@@ -134,10 +134,8 @@ func main() {
TaskExecute = Config.ScriptToExecute
}
fmt.Println(addr)
// Starting screen share headless
cmd := exec.Command("chromium-browser", "--no-sandbox", "--auto-select-desktop-capture-source=Entire screen", "--url", "https://"+*addr+":"+*port+"/?mode=headless", "--ignore-certificate-errors")
cmd := exec.Command(Config.BrowserCommand, "--no-sandbox", "--auto-select-desktop-capture-source="+Config.ScreenName, "--url", "https://"+*addr+":"+*port+"/?mode=headless", "--ignore-certificate-errors")
if err := cmd.Start(); err != nil {
log.Fatalln(err)
}