LibreOffice BASE BASIC SHELL command

My system is Ubuntu 18.04 with Lubuntu desktop. I am running LibreOffice Version: 6.2.5.2

Hello In an lxterminal i can run the command

~/Documents$ /usr/bin/lxterminal   --command="/bin/bash -c --init-file ` /home/neill/bin/chmodx.sh password /home/neill/Documents/doit.sh neill neill`";read

neill@Xeon-host:~/Documents$ ls -l doit.sh
-rwxrwxr-x 1 neill neill 78 Jul 17 11:54 doit.sh

the script file
chmodx.sh

#!/bin/bash

echo “parameter passed are :” “$1” $2 $3 $4

echo “$1” | sudo -S chown $3:$4 $2 2>/dev/null

chmod +x $2

read -n 1 -s

exit

in a basic module i am running

sub readRAWffile

auser				= Environ ("USER")
afolder				= "/Documents/"
afolderbin			= "/bin/"
apasswordraw 		= "Password"
apassword=REPLACE(apasswordraw,"&","\&")

CommandFile = "/home/" & auser & afolderbin & "chmodx.sh"	
Filename = "/home/" & auser & afolder & "doit.sh"

writeafile(Filename)
 
acmdline="/usr/bin/lxterminal"
aarguements =" --command=""/bin/bash -c  `" & CommandFile & " " & apassword  & " " & Filename & " " & auser & " " & auser & "`"
aarguements = aarguements & """"
Shell( acmdline,10,aarguements ,True) 

if i run instead

Shell( acmdline  ,10,"",True) 

Then the terminal window opens and will close when i type exit

Nothing i have tried has run the chmodx.sh script to make doit.sh executable

It has got to be something simple that i am missing

Thank you for your help.

Why are you suprised the Shell() opening a terminal, if you call it using acmdline="/usr/bin/lxterminal"?

Opaque I am in no way surprised that that happens it just proves the lxterminal can be started But I wish to automatically run my command script to change the execution flag on another script file that has just be created. I hope you understand now. Thank you

Please fix your formatting, it’s hard to understand what’s going on in the question.

Hi-Angel I don’t know how to do that there are no tags that i can see…oh trying 101/010

Formatting here is implemented with “markdown” format. But either way, you don’t need to know how it works because there are buttons that do the formatting for you, just select the text you want to format, and press a button.