From 75d8639aa55d77ecd0884260e311acdcb38a1b2c Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 19 Aug 2022 10:45:07 +0200 Subject: [PATCH 1/2] Enable WaylandWindowDecorations feature for electron run on wayland --- cmds/portmaster-start/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/portmaster-start/run.go b/cmds/portmaster-start/run.go index 97dd38f7..963c3e84 100644 --- a/cmds/portmaster-start/run.go +++ b/cmds/portmaster-start/run.go @@ -129,7 +129,7 @@ func getExecArgs(opts *Options, cmdArgs []string) []string { // required by Electron args = append(args, []string{ - "--enable-features=UseOzonePlatform", + "--enable-features=UseOzonePlatform,WaylandWindowDecorations", "--ozone-platform=wayland", }..., ) From e9598520f098943d20cb1c9007fb5bdb59dc08cb Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 19 Aug 2022 10:46:47 +0200 Subject: [PATCH 2/2] Disable restarting on failure for UI components --- cmds/portmaster-start/run.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmds/portmaster-start/run.go b/cmds/portmaster-start/run.go index 963c3e84..cf7aabf4 100644 --- a/cmds/portmaster-start/run.go +++ b/cmds/portmaster-start/run.go @@ -46,6 +46,7 @@ type Options struct { AllowDownload bool // allow download of component if it is not yet available AllowHidingWindow bool // allow hiding the window of the subprocess NoOutput bool // do not use stdout/err if logging to file is available (did not fail to open log file) + RestartOnFail bool // Try restarting automatically, if the started component fails. } func init() { @@ -56,6 +57,7 @@ func init() { AllowDownload: true, AllowHidingWindow: true, PIDFile: true, + RestartOnFail: true, }, { Name: "Portmaster App", @@ -77,6 +79,7 @@ func init() { AllowDownload: true, AllowHidingWindow: true, PIDFile: true, + RestartOnFail: true, }, }) } @@ -213,7 +216,7 @@ func runAndRestart(opts *Options, args []string) error { log.Printf("%s exited without error", opts.Identifier) } - if !tryAgain { + if !opts.RestartOnFail || !tryAgain { return err }