Bug 153719 - 7.5 BASIC shell function fails (flatpak and snap versions)
Summary: 7.5 BASIC shell function fails (flatpak and snap versions)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.5.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-VBA LibreOffice-Snap
  Show dependency treegraph
 
Reported: 2023-02-18 22:57 UTC by Steve Sibelman
Modified: 2025-03-05 16:22 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Sibelman 2023-02-18 22:57:05 UTC
Description:
BASIC Macros that invoke executuables via the shell function throw a "BASIC runtime error. File not found." Same macros work fine in the current (K)Ubuntu 7.3.7.2 package.

(I haven't previously run LibreOffice as a snap or flatpak.)

Steps to Reproduce:
1. Execute a macro with this shell command: shell("/usr/bin/konsole",2)
2.
3.

Actual Results:
Macro editor launches, highlighting the "shell" line of the macro, and a box shows the error message: BASIC runtime error. File not found.

Expected Results:
The software should have launched the desired application, in this case konsole (but, in my use case, a LibreOffice program).


Reproducible: Always


User Profile Reset: Yes

Additional Info:
I hope that, when Ubuntu ships 7.5, this will be gone.  Maybe it's an artifact of using snap or flatpak -- something I haven't done with LibreOffice before.  Best of luck, and thanks for all you do to make LibreOffice great!
Comment 1 Stéphane Guillou (stragu) 2023-03-05 21:12:29 UTC
Hi Steve, thanks for the report and the kind words!

I can confirm that a macro of the type:

Sub Main

shell("/usr/bin/konsole",2)

End Sub

... will run in LibreOffice installed from debs but gives a BASIC runtime error from the Snap.

Rerpoduced with:

Version: 7.5.1.2 (X86_64) / LibreOffice Community
Build ID: 81bce3cd17f5e01886721863a4fa0d99f91033a6
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

I checked the permissions granted to the snap (everything allowed except for Bluetooth devices).

snap version
snap    2.58.2
snapd   2.58.2
series  16
ubuntu  20.04
kernel  5.15.0-67-generic

As a workaround, please install from debs: https://www.libreoffice.org/download/download-libreoffice/

Similar issue on ask.libreoffice: https://ask.libreoffice.org/t/shell-function-crashes/43866
Comment 2 QA Administrators 2025-03-05 03:13:31 UTC Comment hidden (obsolete)
Comment 3 Steve Sibelman 2025-03-05 16:22:25 UTC
This bug is still present in the latest *snap* of LibreOffice, v. 24.8.5.2, per my testing today.

The E-mail I received 3/4/25 from the bugzilla-daemon asks me to verify whether it's a problem with the latest version from libreoffice.org, but that's irrelevant as this is an issue with the snap version.  Or with snap itself.

It seems likely this particular problem arises from the sandboxing/isolation that enclose snaps.  Possibly, editing the "connections" of the libreoffice snap could resolve the problem.  Sadly, I'm not knowledgeable in that area.