application.executeProgram in Linux as 'sudo'

Hi!

I’m using this code in Linux (Ubuntu 10.04) to open files:

application.executeProgram('gnome-open', vFullFileName)

This code is working properly with images, OpenOffice files, … However, if I try to open a .pdf file (I have Adobe Reader 9 installed), I get this error:

“Adobe Reader does not need to be run as a privileged user. Please remove ‘sudo’ from the beginning of the command.”

I found out Servoy is executing this command as “super user” (sudo) always… it isn’t? If yes, exists some way to execute programs without executing as sudo???

Thanks in advance!

Servoy isnt doing that, we are not doing anything special for linux or what ever os. We just call:

Process myProcess = Runtime.getRuntime().exec(cmdArgsArray, envArgsArray, startDir);

with exactly the stuff you give us.

So do you run the main process (do you test this in developer?) as root/super user?

jcompagner:
Servoy isnt doing that, we are not doing anything special for linux or what ever os. We just call:

Process myProcess = Runtime.getRuntime().exec(cmdArgsArray, envArgsArray, startDir);

with exactly the stuff you give us.

So do you run the main process (do you test this in developer?) as root/super user?

Thanks Johan! It’s just what was happening!

From Developer I get the error because Developer is executed as super user… And against a server, I was launching from a browser executed as super user too… :oops: