terminal commands not working in shell

[quote=13310:@Sean Clancy]Well, I plan not to. If I can get a solution for doing this sudo command, Everything will be as it should with my app :slight_smile:
Anybody else with a solution for this?[/quote]
There was some code release a while ago (by Jon Johnson, modified by Tim Jones) that can call authorized commands and it displays the familiar username, password dialog in order to do it. “AuthorizationShell” is it’s name.

Well, I came up with something that works.
I made a plain text file called “Mama.sh” (it doesn’t seem to work if i build it using textoutputstream)
I put in it

cd ~/Library/Application\ Support/Guitar\ SightReader\ Toolbox/ABC/MACconvert
./abcm2ps -v -s 0.3 -B2 SReader.abc
qlmanage -t -s 900 -o. Out001.svg

which is cool, because the ~ means that that this will work on any user’s computer!
that works great.

Then. I got the method to run this Mama.sh shell by doing
sh.Execute “chmod 700 “+ffff.ShellPath+”/Mama.sh”
sh.Execute ffff.ShellPath+"/Mama.sh"

and, like magic it works! Sudo isn’t needed and I know this because I never did the sudo on Mama.sh!

I really hope this helps anybody else out!!!
Thanks guys for helping me out!

Not solved - I uploaded my software onto another MAC. It didn’t work.
So, I think when I used that sudo command, I stuffed up my mac - as it works really well on my MAC.
So, shell commands using

cd ~/Library/Application\\ Support/Guitar\\ SightReader\\ Toolbox/ABC/MACconvert ./abcm2ps -v -s 0.3 -B2 SReader.abc qlmanage -t -s 900 -o. Out001.svg
in a .sh file aren’t going to cut it - especially if I want to run on other MACs,

Have you considered that sudo usually asks the user for a password? I’m not entirely sure that you’ll be able to give the script permission to run even if the shell is set to interactive mode.

Also, my personal opinion would be that if any app could run a shell command using sudo without my permission, that would be a huge security risk. Have you considered using the Permissions class to change the executable bit instead?

I tried the permission route - that before I came across sudo. Nothing works (and it’s so darn easy to do with windows (no sudo neede)).

Eventually, I did a workaround and use the HTMLviewer to display my graphics!