# Shell() function crashes

This may be an OS problem, but I'm starting here because I'm very puzzled. I have an established database with many macros that I've had to restore to a new computer after a hard drive failure. OS is Ubuntu 18.04, same as original.

Only now, Shell() function always returns "file not found"

A simple line like

Shell("/usr/bin/mousepad")


works fine on the old installation but not the new. The command works fine from the command line, but the function always causes a runtime error.

I guess somehow Libreoffice doesn't understand the path. Have I neglected to set some parameter to tell it how to find file paths? I don't remember having to do that before, but it was 3 years ago.

Any suggestions appreciated.

edit retag close merge delete

works fine on the old installation but not the new

And which LibreOffice version is this new? (and preferably also old, too)

And why "crashes" in the title, when you say it only refuses to execute/shows an error?

( 2019-08-09 06:03:31 +0200 )edit

New one is 6.2.5.2. Not sure what the old one was, since it was on a hard drive that failed.

I do have another, older, computer that is running 6.0.7.3 and it does not have this problem.

The function "crashes" my macro, i.e. causes a run-time error that makes it stop working. Would you prefer "blows up"? Why split hairs?

( 2019-08-09 11:12:23 +0200 )edit

Why split hairs?

Not sure what could that mean (not a native English speaker); but suspect that you somehow managed to apply some emotions to my clarification request ("why "crashes" in the title") meant to understand if there's actually some software crash (a term which has quite clear meaning in SW) that you just forgot to mention in the description (and then it's a crasher bug), or was that just using a wrong term...

( 2019-08-09 11:46:20 +0200 )edit
1

Have checked using

Sub MousePad

Version: 6.2.5.2, Build-ID: 1:6.2.5-0ubuntu0.18.04.1~lo1,CPU-Threads: 4;

and this doesn't crash anything, nor show any file not found error. This just opened "mousepad* application. I do get a runtime error and file not found error, if I remove mousepad application using apt remove mousepad. Thus and your mention of "but not the new* make me feel, that you are on a new Ubuntu 18.04 system, which indeed hasn't installed packahge "mousepad*, which in fact is not on Ubuntu's default packages installed during base installation (Manual installation has been required before doing my test above).