From fe847339e4e1b10c870290dc34adc98aa0e5a1cc Mon Sep 17 00:00:00 2001 From: 2mal3 <56305732+2mal3@users.noreply.github.com> Date: Fri, 28 Nov 2025 22:51:43 +0100 Subject: [PATCH] chore(display): use seperate libreoffice profie --- display/pkg/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/display/pkg/main.go b/display/pkg/main.go index 9813182..d34ac20 100644 --- a/display/pkg/main.go +++ b/display/pkg/main.go @@ -48,7 +48,12 @@ func GetDeviceMac() (string, error) { } func OpenPresentation(path string) error { - cmd := exec.Command("soffice", "--show", path, "--nologo", "--norestore") + tempDirPath, err := os.MkdirTemp("", "plg-mudics-libreoffice-profile-") + if err != nil { + return fmt.Errorf("failed to create temporary profile directory: %w", err) + } + + cmd := exec.Command("soffice", "--show", path, "--nologo", "--norestore", fmt.Sprintf("-env:UserInstallation=file:///%s", tempDirPath)) result := shared.RunShellCommand(cmd) if result.ExitCode != 0 { return errors.New(result.Stderr)