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.