Automatically append arguments required by Electron to run on wayland
This commit is contained in:
@@ -121,6 +121,20 @@ func getExecArgs(opts *Options, cmdArgs []string) []string {
|
||||
if stdinSignals {
|
||||
args = append(args, "--input-signals")
|
||||
}
|
||||
|
||||
// see https://www.freedesktop.org/software/systemd/man/pam_systemd.html#type=
|
||||
if xdgSessionType := os.Getenv("XDG_SESSION_TYPE"); xdgSessionType == "wayland" && opts.Identifier == "app/portmaster-app.zip" {
|
||||
// we're running the Portmaster UI App under Wayland so make sure we add some arguments
|
||||
// required by Electron
|
||||
args = append(args,
|
||||
[]string{
|
||||
"--enable-features=UseOzonePlatform",
|
||||
"--ozone-platform=wayland",
|
||||
}...,
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
args = append(args, cmdArgs...)
|
||||
return args
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user